cleanup-artifacts

cleanup-artifacts is a skill for Claude Code, Codex from ethanaubuchon/dossier-tradecraft. It costs 69 tokens per session (473 once invoked), scanned A, original, MIT.

A cleanup skill that removes temporary plan and specification files from the current branch before a change is published. A branch is a separate line of development in Git.

In plain words
What is it for?
Use it at the draft-to-ready stage of implementation and before squashing a pull request, especially when the project stores branch plans under .claude/plans/.
Why use it?
It keeps private working notes and scratch files out of the final pull request and its history.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it at the draft-to-ready stage of implementation and before squashing a pull request, especially when the project stores branch plans under .claude/plans/.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ethanaubuchon/dossier-tradecraft --skill cleanup-artifacts
Clone the repo
git clone --depth 1 https://github.com/ethanaubuchon/dossier-tradecraft

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cleanup-artifacts

README.md
[![agentmods](https://agentmods.dev/badge/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts/github.svg)](https://agentmods.dev/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts)
Your own site
<a href="https://agentmods.dev/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts"><img src="https://agentmods.dev/badge/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cleanup-artifacts

Your own site · 80×15
<a href="https://agentmods.dev/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts"><img src="https://agentmods.dev/badge/skills/ethanaubuchon/dossier-tradecraft/cleanup-artifacts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 473 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00473
Opus 5 $0.00034 $0.00236
Sonnet 5 $0.00014 $0.00095
Haiku 4.5 $0.00007 $0.00047

Measured 11d ago against content hash 906a96c3b879, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cleanup-artifacts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cleanup-artifacts/SKILL.md · 37 lines

What it actually says

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.)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 37 lines · 69 tokens per session scan A 906a96c3b879

Subscribe to this mod's changes

cleanup-artifacts is a skill published in the GitHub repository ethanaubuchon/dossier-tradecraft (3 stars, last pushed 2mo ago), licensed MIT. It adds 69 tokens to every session and 473 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

aidex-worktree

Use when the user wants to create, run or tear down a git worktree with its own isolated environment (database, ports, containers), or when a project has no worktree setup yet and one needs bootstrapping by investigating the repo topology and verifying the compose stack can run twice — "set up a worktree for X"…

yacb2/aidex · 186 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

changelog-gen

A changelog generator that turns Git history into a version-by-version record of project changes. A changelog is a readable summary of new features, fixes, breaking changes, documentation, and other updates.

laolaoshiren/claude-code-skills-zh · 19 tokens

resolve-pr-comments

Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…

tobihagemann/turbo · 95 tokens

create-pr

Create a GitHub pull request with a drafted title and description. Use when the user asks to "create a PR", "create a pull request", "open a PR", or "submit a PR".

tobihagemann/turbo · 44 tokens

update-pr

Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".

tobihagemann/turbo · 56 tokens