agentleFS
mystilleefmystilleef/spae-framework/skills/clean/SKILL.md

clean

Skill1 starsChanged 4 months agoMITView on GitHub

Orchestrates purification and refactoring agents sequentially.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run purification and refactoring subagents sequentially to clean target code.

    line 18
  2. Very specific:

    If subagent returns No Changes status, exit loop and proceed.

    line 31
  3. Very specific:

    If subagent returns No Changes status, exit loop and finish.

    line 40
  4. Distinctive:

    Always use the subagent tool for subagent invocation.

    line 48
  5. Distinctive:

    Never interleave purification with refactoring.

    line 67
  6. Very specific:

    Never run subagents in parallel or concurrently.

    line 68
  7. Distinctive:

    Never invoke agents outside the permitted list.

    line 70
  8. Distinctive:

    Never prompt the user for decisions mid-run.

    line 71
  9. Distinctive:

    Never perform activities beyond subagent invocation, state tracking, and reporting.

    line 73
  10. Distinctive:

    Keep prose terse while ensuring clarity.

    line 87
  11. Distinctive:

    Use lists and sub-lists over paragraphs and long sentences.

    line 90

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Clean

When to use

  • The user wants to clean smelly code autonomously using the purify and refactor agents.

Goal

  • Run purification and refactoring subagents sequentially to clean target code.

Input

  • Accept optional arguments (file or folder paths).

Workflow

  1. Purification Loop:
    • Immediately use the subagent tool to spawn a purify subagent (pass optional arguments).
    • Await purification result.
    • If subagent returns No Changes status, exit loop and proceed.
    • On Failed status or any process failure, halt immediately and surface the error.
    • Loop back to spawn another purify subagent if the previous pass returns Complete.
  2. Refactoring Loop:
    • Immediately use the subagent tool to spawn a refactor subagent (pass optional arguments).
    • Await refactoring result.
    • If subagent returns No Changes status, exit loop and finish.
    • On Failed status or any process failure, halt immediately and surface the error.
    • Loop back to spawn another refactor subagent if the previous pass returns Complete.

Directives

  • Always use the subagent tool for subagent invocation.
  • Pass the optional argument verbatim to both subagents; never read or expand file-path arguments.
  • Rely on subagent status blocks to direct the loop.
  • Halt immediately on subagent Failed status or any process failure (crash, timeout, AgentError).
  • List of agents permitted to invoke:
    • purify
    • refactor

Constraints

  • Restrict your activities to:
    • Using the subagent tool to spawn agents.
    • Using agent results to direct the loop or advance the workflow.
  • Perform orchestration only; never edit codebase files, tests, or documentation.
  • Operate strictly in read-only mode.
  • Perform purification to completion first, before starting refactoring.
  • Never interleave purification with refactoring.
  • Never run subagents in parallel or concurrently.
  • Never activate skills.
  • Never invoke agents outside the permitted list.
  • Never prompt the user for decisions mid-run; let blockers halt execution.
  • Never perform activities beyond subagent invocation, state tracking, and reporting.

Verification

  • Confirm sequential execution of purify and refactor subagents.
  • Confirm loop termination when subagents return No Changes.
  • Confirm immediate halt when a subagent returns Failed.
  • Confirm zero writes from the orchestration agent itself.

Result directives

  • Minimum words. Maximum signal.
  • Return the final execution status block.
  • Keep prose terse while ensuring clarity.
  • Optimize prose for agent, token, and context efficiency.
  • Split actions, findings, and summaries into terse bullet points.
  • Use lists and sub-lists over paragraphs and long sentences.
  • Emit the result template as live markdown—never in a code fence.
  • Output nothing outside the template.

Result template

<!-- prettier-ignore-start -->
### Execution Summary

- **Actions**:
  - [Terse list of actions from spawned subagents]
- **Files**:
  - [Terse list of files affected by spawned subagents]
- **Findings**:
  - [Terse list of findings from spawned subagent]
- **Summary**:
  - [Terse list of summary from spawned subagents]

> **Clean Status** • `[scope]`
> **Result**: [Completed | Halted | Failed]
> **Impact**: [Terse impact statement]
<!-- prettier-ignore-end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.