clean

Orchestrates purify and refactor subagents sequentially to clean target code.

1|Updated May 12, 2026
One-click install
npx skills add https://github.com/mystilleef/spae-framework --skill clean-mystilleef
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clean
Source: https://github.com/mystilleef/spae-framework/tree/main/skills/clean
Command: npx skills add https://github.com/mystilleef/spae-framework --skill clean-mystilleef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Coordinating code purification and refactoring passes manually is error-prone and can interleave concerns. This Skill automates the orchestration of purify and refactor subagents in strict sequence, looping until no further changes are needed. ## Core Features & Use Cases - Sequential Subagent Orchestration: Runs purification loops to completion before starting refactoring loops, never interleaving or parallelizing them. - Status-Driven Looping: Repeats each subagent pass until it returns a No Changes status, and halts immediately on any Failed status or process error. - Read-Only Safety: The orchestrator never edits code, tests, or documentation itself; all changes come from the spawned subagents. - Use Case: Point the Skill at a legacy module with accumulated code smells, and it will drive repeated purify passes followed by refactor passes until the code stabilizes, then report a terse execution summary. ## Quick Start Ask the agent to run the clean skill on a target file or folder, for example: clean the src/legacy module using the purify and refactor agents.

Frequently Asked Questions about clean

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean smelly code automatically with AI agents?▼

Invoke the clean skill with an optional file or folder path. It spawns purify subagents in a loop until no changes remain, then runs refactor subagents the same way, returning a terse execution summary.

How does the clean skill decide when to stop looping?▼

Each loop terminates when the spawned subagent returns a No Changes status. If a subagent returns Complete, another pass is spawned; a Failed status or process error halts execution immediately.

Can purification and refactoring run in parallel or interleaved?▼

No. The skill enforces strict sequential execution: purification must run to completion before refactoring begins, subagents never run concurrently, and the two phases are never interleaved.

Does the clean orchestrator edit code files directly?▼

No. The orchestrator operates in read-only mode and only spawns subagents, tracks their status, and reports results. All code modifications are performed exclusively by the purify and refactor subagents.

What happens when a purify or refactor subagent fails?▼

Execution halts immediately on a Failed status or any process failure such as a crash, timeout, or AgentError. The error is surfaced to the user rather than retried or skipped.