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.
git clone --depth 1 https://github.com/MadAppGang/claude-codeWrote 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.
[](https://agentmods.dev/commands/madappgang/claude-code/cleanup-artifacts)<a href="https://agentmods.dev/commands/madappgang/claude-code/cleanup-artifacts"><img src="https://agentmods.dev/badge/commands/madappgang/claude-code/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.
<a href="https://agentmods.dev/commands/madappgang/claude-code/cleanup-artifacts"><img src="https://agentmods.dev/badge/commands/madappgang/claude-code/cleanup-artifacts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01704 |
| Opus 5.5 | $0.00007 | $0.00682 |
| Sonnet 5.5 | $0.00003 | $0.00341 |
| Haiku 4.5 | $0.00002 | $0.00170 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mission
Analyze the current project state, identify temporary artifacts and development files, then run the cleaner agent to clean them up safely while preserving important implementation code and documentation.
Workflow
STEP 1: Analyze Current Project State
-
Gather Project Context:
- Run
git statusto see current state - Run
git diff --statto see what's been modified - Use Glob to find common artifact patterns:
- Test files:
**/*.test.{ts,tsx,js,jsx} - Spec files:
**/*.spec.{ts,tsx,js,jsx} - Temporary documentation:
AI-DOCS/**/*-TEMP.md,AI-DOCS/**/*-WIP.md - Development scripts:
scripts/dev-*.{ts,js},scripts/temp-*.{ts,js} - Build artifacts:
dist/**/*,build/**/*,.cache/**/* - Coverage reports:
coverage/**/* - Log files:
**/*.log,**/*.log.* - Editor files:
**/.DS_Store,**/*.swp,**/*.swo
- Test files:
- Run
-
Identify Current Task:
- Check for AI-DOCS/ folder to understand recent work
- Look for recent commits to understand context
- Analyze modified files to determine what's being worked on
-
Categorize Files:
- Artifacts to Clean: Temporary files that can be safely removed
- Files to Preserve: Implementation code, final tests, user-facing docs, configs
- Uncertain Files: Files that might need user input
STEP 2: Present Findings to User
Present a clear summary:
# Cleanup Analysis
## Current Project State
- Git Status: [clean/modified/staged]
- Recent Work: [description based on git log and AI-DOCS]
- Modified Files: [count and summary]
## Artifacts Found
### Will Clean (if approved):
- Temporary test files: [count] files
- Development artifacts: [count] files
- Intermediate documentation: [count] files
- Build artifacts: [count] files
- [Other categories found]
### Will Preserve:
- Implementation code: [list key files]
- Final tests: [list]
- User-facing documentation: [list]
- Configuration files: [list]
### Uncertain (need your input):
- [List any files where classification is unclear]
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.
- 1mo ago First seen · 221 lines · 17 tokens per session scan A a7b0f4414a75
cleanup-artifacts is a command published in the GitHub repository MadAppGang/claude-code (285 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 1,704 once invoked, about $0.0001 per session on Opus 5.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-09-03.
Other commands, from other repositories
status
Show the Salesforce project banner — connected org, edition, API, project metadata stats, and MCP server status.
red-team
Stress-test a plan, strategy, PRD, or launch with a room of hostile expert personas before you commit.
instinct-import
Import a portable YAML instinct pack with confidence-gated merge (Instinct Engine).
acos-checkpoint
Create checkpoints before risky operations. Rollback if things go wrong.
approve-proposed
Atomically persist every file marked PROPOSED in the most recent prior assistant turn's ### Artifact changes block, promoting staged content to real files. Invoked on request only. Use when that block contained files marked PROPOSED and you have accepted the inline content of each. Do not use when the prior turn had…
hygiene-status
Disk hygiene snapshot for this Mac — free space, caches, stale worktrees, LaunchAgent state.