plan-cleanup
Skill14 starsChanged 4 months agoApache-2.0View on GitHub
Post-execution cleanup — remove planning artifacts and tech debt left behind after a plan runs. Trigger when the user runs /plan-cleanup, says 'clean up artifacts', 'remove the plan file', or 'no tech debt'. Not /plan-evolve (plans the next version) — plan-cleanup only removes leftovers and adds no new work.
In this repository70 other files it gives its agents.
- llms.txtllms.txt
- agent-mailboxSkill
- agent-outputSkill
- ask-gateSkill
- audit-coupled-constantSkill
- budget-checkSkill
- caller-optionsSkill
- cold-reviewSkill
- defuddleSkill
- design-an-interfaceSkill
- diff-recapSkill
- directives-auditSkill
- domain-checkSkill
- double-checkSkill
- extract-signalSkill
- freshness-contractSkill
- github-syncSkill
- handoff-executeSkill
- handoffSkill
- human-drawSkill
- human-mergeSkill
- human-outputSkill
- human-rewriteSkill
- improve-codebase-architectureSkill
- insight-adversarialSkill
- insight-anglesSkill
- insight-assessSkill
- insight-critiqueSkill
- insight-cross-examineSkill
- insight-exploreSkill
- insight-retroSkill
- insight-skill-gapSkill
- investigateSkill
- json-canvasSkill
- map-checkSkill
- map-initSkill
- map-maintainSkill
- map-rulesSkill
- map-thisSkill
- monorepo-depsSkill
- multi-agent-modeSkill
- new-skill-creatorSkill
- next-skillsSkill
- obsidian-basesSkill
- obsidian-cliSkill
- obsidian-markdownSkill
- orchestrate-modeSkill
- orient-gapsSkill
- orient-mapSkill
- orient-roadmapSkill
- orient-statusSkill
- plan-createSkill
- plan-deep-diveSkill
- plan-evolveSkill
- plan-executeSkill
- plan-phasesSkill
- prime-expandSkill
- prime-fetchSkill
- prime-sweepSkill
- prose-auditSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Remove planning artifacts and tech debt after a plan has been executed.
- Distinctive: line 66
Remove each confirmed artifact
- Distinctive: line 68
Never remove files outside the current project scope
- Distinctive: line 70
Gate: do not remove any file not explicitly identified in Phase 1.
- Very specific: line 75
If in a git repo and files were tracked: commit with message chore: remove planning artifacts.
- Distinctive: line 86
MUST list artifacts before removing — never silently delete
- Distinctive: line 87
MUST verify each candidate is a planning artifact, not a project file
- Distinctive: line 88
MUST NOT remove files outside the current project scope
- Distinctive: line 89
MUST NOT remove files the user explicitly skipped
- Distinctive: line 90
MUST end with a terminal declaration
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/plan-cleanup
Remove planning artifacts and tech debt after a plan has been executed. No new work. No scope additions. Just cleanup.
Structured execution spec:
protocol.yon. Read it for the canonical rules and step sequence; this file is explanation. The two must stay in sync — if you edit one, update the other and refresh the@STAMPdate.
Phase 1 — Identify Artifacts
Scan for artifacts left behind by the planning and execution cycle:
Planning docs (created by /plan-create, /plan-phases, /plan-deep-dive):
PLAN.mdimplementation_plan.mdtask.md(if created as a plan artifact, not a pre-existing project file)- Any
*-plan.mdfiles in the project root
Execution scaffolding (created by /plan-execute or setup steps):
- Temp files, stub files, or files explicitly marked as temporary in the plan
- Any file whose sole purpose was to scaffold or support the plan run
Tool artifacts:
.claude/directories created incidentally in skill or tool folders (not the user's project.claude/)
For each candidate, verify: is this file needed by the project going forward? If yes, leave it. If it exists only because of the planning cycle, it's an artifact.
Gate: list every artifact found before removing anything. If none found, declare "No artifacts found — workspace is clean" and stop.
Phase 2 — Confirm and Remove
Present the artifact list to the user:
"Found the following planning artifacts:
- [file 1]
- [file 2]
Remove all? (y / skip [filename] / cancel)"
On confirmation:
- Remove each confirmed artifact
- For git repos: use
git rmif the file is tracked,rmif untracked - Never remove files outside the current project scope
Gate: do not remove any file not explicitly identified in Phase 1. Do not remove files the user skipped.
Phase 3 — Verify and Commit
- Confirm each artifact is gone — list what was removed.
- If in a git repo and files were tracked: commit with message
chore: remove planning artifacts. - Push if the user's workflow includes pushing (check if prior commits in this session were pushed).
Terminal declaration (required):
Cleanup complete — [N] artifacts removed.Cleanup complete — workspace was already clean.Cleanup halted — [reason]. Removed: [list]. Skipped: [list].
Rules
- MUST list artifacts before removing — never silently delete
- MUST verify each candidate is a planning artifact, not a project file
- MUST NOT remove files outside the current project scope
- MUST NOT remove files the user explicitly skipped
- MUST end with a terminal declaration
Human output. This skill's handler-facing output obeys the human-output contract (
human-output/SKILL.md).
Self-improvement. On completion, run the Self-Improvement Protocol (
self-improve/SKILL.md): if this run surfaced a concrete, blocking-or-recurring weakness in this skill, propose a specific fix for the handler to approve. Conservative — silent otherwise. Never auto-apply.
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
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.

