Claude Code Templates is a command-line tool and catalogue for configuring Anthropic’s Claude Code with agents, commands, settings, hooks, integrations, skills, and project templates. Developers use it to browse and install reusable components for their coding workflows. The catalogue includes many of these Claude Code components.
Borrowing it
Nothing to install: this file belongs to davila7/claude-code-templates. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/davila7/claude-code-templates/main/.claude/commands/cleanup-cache.mdgit clone --depth 1 https://github.com/davila7/claude-code-templatesWrote 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/davila7/claude-code-templates/cleanup-cache)<a href="https://agentmods.dev/commands/davila7/claude-code-templates/cleanup-cache"><img src="https://agentmods.dev/badge/commands/davila7/claude-code-templates/cleanup-cache/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/davila7/claude-code-templates/cleanup-cache"><img src="https://agentmods.dev/badge/commands/davila7/claude-code-templates/cleanup-cache.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.00000 | $0.01311 |
| Opus 5.5 | $0.00000 | $0.00524 |
| Sonnet 5.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 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.
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.
- 1mo 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 (32,814 stars, last pushed today), 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
research-verify
Verify existing research findings against independent primary sources. Upgrades confidence from 'sources agree' to 'independently verified.'.
story-continue
Resume an interrupted story from where you left off.
review-skills
Review changed skills: automated bash checks + 9 structural dimensions (D1-D9) + 5 intent checks (M1-M5). PASS/FAIL verdict. Fix in-place.
ccc-orchestrate
Run a sequential multi-agent workflow (feature, bugfix, refactor, security or custom chain) with structured handoffs, plus optional tmux and worktree workers for long-running sessions. Use when a task needs planner, implementer and reviewer stages in order.
ccc-theme
List, preview or switch the Commander terminal color theme (Claude, OLED Black, Matrix, or a random palette) used by hooks and terminal art. Use when the user asks to change the theme, colors or skin.
ccc-audit
Audit the current project for dependency vulnerabilities, oversized bundles, type errors, dead code, hardcoded secrets, undocumented env vars and a missing CLAUDE.md. Use when you want a health score before a release or review.