cleanup-artifacts
Skill3 starsChanged 49 days agoMITView on GitHub
Use in /implement at the draft→ready boundary, before publish-pr's squash, to delete this branch's transient plan/spec artifacts so they don't ship in the PR. Deletes .claude/plans/<branch>.md (flattened name). Distinct from repo-setup's prune of previously-merged branches' artifacts.
In this repository8 other files it gives its agents.
- agent-reviewSkill
- capture-to-vaultSkill
- dispatch-explorationSkill
- load-contextSkill
- open-draft-prSkill
- plan-fileSkill
- publish-prSkill
- repo-setupSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 21
Delete this branch's plan file: rm -f .claude/plans/<branch>.md, using the /→- flattened branch name (feat/foo → .claude/plans/feat-foo.md, …
- Distinctive: line 22
Delete any other transient spec/scratch artifacts the project marks for this branch.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Cleanup Artifacts
Deletes this branch's transient working artifacts — the plan file and any spec scratch — at the draft→ready boundary, so they don't ship in the PR. One of /implement's two distinct cleanups:
repo-setupprunes previously-merged branches' worktrees + plan files (at setup).cleanup-artifactsdeletes this branch's plan file (at finalize).
Runs before publish-pr's squash.
Input
- branch — the current feature branch.
Steps
- Delete this branch's plan file:
rm -f .claude/plans/<branch>.md, using the/→-flattened branch name (feat/foo→.claude/plans/feat-foo.md, matchingplan-file). - Delete any other transient spec/scratch artifacts the project marks for this branch.
Output / contract
- In: the branch.
- Out: working tree with this branch's plan/spec artifacts removed.
- Side effects: deletes the plan file. With the default gitignored plan location the deletion isn't part of the diff (pure housekeeping); if a project tracks plan files, the deletion is a real change — which is why it must run before
publish-pr's squash, so it folds into the single commit (no plan file in PR history).publish-prstages this deletion withgit add -Abefore committing — without that staging thereset --softindex would re-commit the tracked plan file.
Project overrides
- Plan-artifact location — a repo that stores plans/specs elsewhere (e.g.
docs/plans/) overrides the path; keep the flatten rule consistent withplan-fileandrepo-setup.
Future scope
- (none beyond per-project artifact locations.)
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.

