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.
npx agentmods add commands/davila7/claude-code-templates/cleanup-cachegit clone --depth 1 https://github.com/davila7/claude-code-templatesWhat 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 | $0.00000 | $0.01311 |
| Opus 5 | $0.00000 | $0.00656 |
| Sonnet 5 | $0.00000 | $0.00262 |
| Haiku 4.5 | $0.00000 | $0.00131 |
Grade C, and why
cleanup-cache scanned grade C with 1 finding 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 3d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf ~/Library/Caches/Yarn How it starts
The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
System Cache Cleanup
Clean temporary files and caches to free disk space: $ARGUMENTS
Current Disk Usage
- Disk space: !
df -h / | tail -1 - npm cache: !
du -sh ~/.npm 2>/dev/null || echo "Not found" - Yarn cache: !
du -sh ~/Library/Caches/Yarn 2>/dev/null || echo "Not found" - Homebrew cache: !
brew cleanup -n 2>/dev/null | head -5 || echo "Homebrew not installed"
Cleanup Options
Based on the arguments provided, execute the appropriate cleanup level:
Option 1: Conservative Cleanup (default)
Safe cleanup of package manager caches that can be easily rebuilt:
# Record starting disk space
echo "Starting cleanup..."
df -h / | tail -1 | awk '{print "Before: " $4 " free"}'
# Clean npm cache
echo "Cleaning npm cache..."
npm cache clean --force
# Clean Homebrew
echo "Cleaning Homebrew..."
brew cleanup
# Clean Yarn cache
echo "Cleaning Yarn cache..."
rm -rf ~/Library/Caches/Yarn
# Show results
df -h / | tail -1 | awk '{print "After: " $4 " free"}'
Option 2: Aggressive Cleanup (--aggressive flag)
Includes all conservative cleanup plus browser and development tool caches:
# Run conservative cleanup first (from Option 1)
npm cache clean --force
brew cleanup
rm -rf ~/Library/Caches/Yarn
# Clean browser caches
echo "Cleaning browser caches..."
rm -rf ~/Library/Caches/Google
rm -rf ~/Library/Caches/com.operasoftware.Opera
rm -rf ~/Library/Caches/Firefox
rm -rf ~/Library/Caches/Mozilla
rm -rf ~/Library/Caches/zen
rm -rf ~/Library/Caches/Arc
# Clean development tool caches
echo "Cleaning development caches..."
rm -rf ~/Library/Caches/JetBrains
rm -rf ~/Library/Caches/pnpm
rm -rf ~/.cache/puppeteer
rm -rf ~/.cache/selenium
# Clean Python/ML caches
echo "Cleaning Python/ML caches..."
rm -rf ~/.cache/uv
rm -rf ~/.cache/huggingface
rm -rf ~/.cache/torch
rm -rf ~/.cache/whisper
# Show results
df -h / | tail -1 | awk '{print "After aggressive cleanup: " $4 " free"}'
Option 3: Maximum Cleanup (--maximum flag)
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.
- 3d ago First seen · 177 lines · 21 tokens per session scan C 5c0703fe7fc0
cleanup-cache is a command published in the GitHub repository davila7/claude-code-templates (30,476 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,311 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
README
Git workflow and quality assurance commands for the claude-skills repository.
five
Apply the Five Whys root cause analysis technique to investigate an issue.
analyze
Post-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
research-verify
Verify existing research findings against independent primary sources. Upgrades confidence from 'sources agree' to 'independently verified.'.
status
Show current Craft progress — cycles, stories, backlog in a rich dashboard view.
story-implement-auto
Autonomous story implementation — auto-picks stories, chains through cycle, no interactive prompts.