agentleFS
ethanaubuchonethanaubuchon/dossier-tradecraft/skills/cleanup-artifacts/SKILL.md

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.

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
  1. Very specific:

    Delete this branch's plan file: rm -f .claude/plans/<branch>.md, using the /→- flattened branch name (feat/foo → .claude/plans/feat-foo.md, …

    line 21
  2. Distinctive:

    Delete any other transient spec/scratch artifacts the project marks for this branch.

    line 22

≈ “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.

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

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-setup prunes previously-merged branches' worktrees + plan files (at setup).
  • cleanup-artifacts deletes this branch's plan file (at finalize).

Runs before publish-pr's squash.

Input

  • branch — the current feature branch.

Steps

  1. Delete this branch's plan file: rm -f .claude/plans/<branch>.md, using the /→- flattened branch name (feat/foo → .claude/plans/feat-foo.md, matching plan-file).
  2. 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-pr stages this deletion with git add -A before committing — without that staging the reset --soft index 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 with plan-file and repo-setup.

Future scope

  • (none beyond per-project artifact locations.)

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.