create-blog-article
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/cleanup-cacheContext preview
What this command does when you run it.
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
allowed-tools: Bash(df:*), Bash(du:*), Bash(npm cache clean:*), Bash(brew cleanup:*), Bash(rm:*), Bash(find:*), Bash(docker system prune:*) argument-hint: [--aggressive] | [--maximum] description: Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Clean temporary files and caches to free disk space: $ARGUMENTS
Based on the arguments provided, execute the appropriate cleanup level:
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"}'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"}'Includes all aggressive cleanup plus Docker and old node_modules:
# Run aggressive cleanup first (from Option 2)
npm cache clean --force
brew cleanup
rm -rf ~/Library/Caches/Yarn
rm -rf ~/Library/Caches/{Google,com.operasoftware.Opera,Firefox,Mozilla,zen,Arc,JetBrains,pnpm}
rm -rf ~/.cache/{puppeteer,selenium,uv,huggingface,torch,whisper}
# Clean Docker (if installed)
echo "Cleaning Docker..."
docker system prune -af --volumes 2>/dev/null || echo "Docker not running or not installed"
# List node_modules directories for manual review
echo "Finding node_modules directories..."
echo "Note: Not auto-deleting. Review and delete manually if needed."
find ~ -name "node_modules" -type d -prune 2>/dev/null | head -20
# Show results
df -h / | tail -1 | awk '{print "After maximum cleanup: " $4 " free"}'1. **Determine Cleanup Level**
2. **Safety Checks**
3. **Execute Cleanup**
4. **Report Results**
**Conservative Cleanup** (default):
**Aggressive Cleanup** (--aggressive):
**Maximum Cleanup** (--maximum):
All cleaned caches are temporary and will rebuild automatically:
# Conservative cleanup (default) /cleanup-cache # Aggressive cleanup /cleanup-cache --aggressive # Maximum cleanup /cleanup-cache --maximum
After cleanup, verify the results and inform the user of: 1. Space freed 2. Current free space 3. What was cleaned 4. Whether additional cleanup is recommended
Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image