Skip to content

dancolta/claude-cleanup-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

/cleanup β€” macOS Deep Clean for Claude Code

One command. Gigabytes back. Zero risk to your actual files.

Your Mac accumulates gigabytes of cache junk from browsers, editors, package managers, and apps you forgot you had. This Claude Code skill wipes it all in seconds β€” safely.

What it cleans

Category What gets nuked
System ~/Library/Caches/*, ~/Library/Logs/*, system caches, .DS_Store files, DNS cache
Package managers npm, npx, pip, Homebrew (old versions + cache)
Editors VS Code, Cursor β€” cached data, extensions cache, code cache
AI tools Claude Desktop β€” VM bundles, GPU cache, service workers
Browsers Chrome β€” service workers, GPU/shader cache (never touches bookmarks, history, or extensions)
Chat apps Slack, Discord, Zoom β€” cache and auto-updater bloat
Media Spotify persistent cache
Containers Docker dangling images and build cache (only if daemon is idle)

After cleaning, it deep-scans for remaining space hogs over 500 MB and asks before touching them.

What it NEVER touches

  • Your files β€” Documents, Desktop, Downloads, Work, Projects, Code
  • App configs β€” settings, preferences, profiles, bookmarks
  • App state β€” Local Storage, IndexedDB, databases
  • Credentials β€” Keychain, SSH keys, GPG keys, tokens, .env files
  • Dev environments β€” git repos, node_modules, nvm versions
  • Anything not on the explicit allow-list β€” it doesn't improvise

Example output

πŸ“Š Disk before: 42 GB available of 460 GB

🧹 Cleaning...

| Category           | Freed    |
|--------------------|----------|
| User Caches        | 3.2 GB   |
| User Logs          | 180 MB   |
| npm / npx          | 420 MB   |
| Homebrew           | 890 MB   |
| pip                | 65 MB    |
| VS Code            | 310 MB   |
| Cursor             | 275 MB   |
| Claude Desktop     | 140 MB   |
| Chrome             | 520 MB   |
| Spotify            | 1.1 GB   |
| Slack              | 380 MB   |
| Discord            | 210 MB   |
| Docker             | 2.4 GB   |
| System caches      | 450 MB   |
| .DS_Store files    | 2 MB     |

βœ… Total freed: 10.5 GB
πŸ“Š Disk after: 52.5 GB available of 460 GB

Install

One-liner (recommended):

mkdir -p ~/.claude/skills/cleanup && curl -fsSL https://raw.githubusercontent.com/dancolta/claude-cleanup-skill/main/SKILL.md -o ~/.claude/skills/cleanup/SKILL.md

Or clone:

git clone https://github.com/dancolta/claude-cleanup-skill.git
mkdir -p ~/.claude/skills/cleanup
cp claude-cleanup-skill/SKILL.md ~/.claude/skills/cleanup/SKILL.md

Or project-level β€” drop SKILL.md into .claude/skills/cleanup/ to share with your team via git.

Usage

/cleanup

That's it. Typical results: 2–15 GB freed.

Requirements

  • macOS (tested on Sonoma, Sequoia)
  • Claude Code CLI
  • Optional: sudo for system-level caches and DNS flush (skipped gracefully if unavailable)

Customization

It's just a markdown file β€” fork and add your own targets (Xcode DerivedData, JetBrains, Android Studio, Conda, Yarn/pnpm). Follow the same pattern: explicit paths, 2>/dev/null, and add to the safety rules if needed.

How it works

Claude Code skills are markdown instructions. When you type /cleanup, Claude reads the SKILL.md and executes each step in your terminal. No binaries, no background processes, fully transparent.

License

MIT

Contributing

Found a cache worth cleaning? Open a PR. Rules: only expendable caches, never user data, never configs.

About

🧹 /cleanup β€” macOS deep clean skill for Claude Code. One command, gigabytes back, zero risk to your files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors