terrylica/cc-skills/disk-hygiene
Claude Code and agent skill by terrylica/cc-skills
- community
Checking that the SKILL.md file is still in the repository.
macOS disk cleanup, cache pruning, stale file detection, and Downloads triage. TRIGGERS - disk space, cleanup, disk usage
Install
npx vskill@latest install terrylica/cc-skills/disk-hygieneSKILL.md
Disk Hygiene
Audit disk usage, clean developer caches, find forgotten large files, and triage Downloads on macOS.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
When to Use This Skill
Use this skill when:
- User asks about disk space, storage, or cleanup
- System is running low on free space
- User wants to find old/forgotten large files
- User wants to clean developer caches (brew, uv, pip, npm, cargo)
- User wants to triage their Downloads folder
- User asks about disk analysis tools (dust, dua, gdu, ncdu)
TodoWrite Task Templates
Template A - Full Disk Audit
Template B - Cache Cleanup Only
Template C - Downloads Triage
Template D - Forgotten File Hunt
Phase 1 - Disk Overview
Get the lay of the land before diving into specifics.
Phase 2 - Cache Audit & Cleanup
Cache Size Reference
| Cache | Location | Typical Size | Clean Command | |
|---|---|---|---|---|
| uv | ~/Library/Caches/uv/ or `~/.cache/uv/` | 5-15 GB | uv cache clean | |
| Homebrew | ~/Library/Caches/Homebrew/ | 3-10 GB | brew cleanup --prune=all | |
| pip | ~/Library/Caches/pip/ | 0.5-2 GB | pip cache purge | |
| npm | ~/.npm/_cacache/ | 0.5-2 GB | npm cache clean --force | |
| cargo | ~/.cargo/registry/cache/ | 1-5 GB | cargo cache -a (needs cargo-cache) | |
| rustup | ~/.rustup/toolchains/ | 2-10 GB | rustup toolchain uninstall <name> (list with rustup toolchain list) | |
| proto | ~/.proto/tools/<tool>/<version>/ | 0.2-2 GB each | proto uninstall <tool> <version> (list with proto versions <tool> --installed), or proto clean tools | |
| Docker | Docker.app | 5-30 GB | docker system prune -a | |
| Playwright | ~/Library/Caches/ms-playwright/ | 0.5-2 GB | npx playwright uninstall | |
| sccache | ~/Library/Caches/Mozilla.sccache/ | 1-3 GB | rm -rf ~/Library/Caches/Mozilla.sccache | |
| go-build | ~/Library/Caches/go-build/ | 5-25 GB | go clean -cache (or rm -rf if go not on PATH) | |
| huggingface | ~/.cache/huggingface/ | 1-10 GB | rm -rf ~/.cache/huggingface/hub/<model> | |
| Claude Code plugins | ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ | 5-30 GB | Delete versions not in ~/.claude/plugins/installed_plugins.json, keeping the 3 newest (sort -V) for already-running sessions |
Safe Cleanup Commands (Always Re-downloadable)
Troubleshooting Cache Cleanup
| Issue | Cause | Solution | |
|---|---|---|---|
uv cache lock held | Identify the holder first | See "uv cache lock" below — --force can be actively dangerous | |
brew cleanup skips formulae | Linked but not latest | Safe to ignore, or brew reinstall <pkg> | |
pip cache purge permission denied | System pip vs user pip | Use python -m pip cache purge | |
| Docker not running | Docker Desktop not started | Start Docker.app first, or skip |
⚠️ uv cache lock — never reach for --force before naming the holder
uv cache clean waits 300 s for an exclusive lock, then errors. Earlier revisions of this skill said "use --force". That advice is wrong when the lock holder is a long-running service, and it is the same class of mistake as the api-gateway incident: mutating a cache underneath a live daemon.
Measured 2026-08-24: uv cache clean timed out, and the holders were
— both children of the launchd job `com.search-svc.serve`, up 1 h 37 m. These are persistent daemons, so the lock is never released and clean can never succeed on its own. Always identify the holder before deciding:
Then pick by holder:
| Holder | Action | |
|---|---|---|
Transient (uv sync you just ran) | Wait for it, or --force — genuinely safe | |
| Long-running launchd/daemon | Do NOT `--force`. Either skip, or launchctl bootout → clean → bootstrap → verify | |
| Unknown / can't identify | Skip. The cache is never worth an outage |
Prefer `uv cache prune` over `uv cache clean` in routine hygiene. prune removes only _unused_ entries and leaves everything a live environment depends on, so it is the correct periodic-maintenance verb; clean nukes everything and forces a full re-download.
uv archive-v0 silently accumulates whole virtual environments
The uv cache's headline number is misleading, so classify before you judge it. archive-v0 is documented as unpacked _wheel_ bodies that get hardlinked into each .venv — that part earns its keep. But it also accretes complete virtual environments (build envs / tool envs) that are never garbage-collected, and those are pure dead weight. Measured 2026-08-24 on a 69 GB uv cache:
| Entry shape | Count | Size | |
|---|---|---|---|
Full venvs (contain pyvenv.cfg) | 210 | 39 GB | |
| Genuine unpacked wheels | 1,577 | 10 GB |
So 78 % of archive-v0 was orphaned environments, not the dedup layer. Classify it — the split changes both the diagnosis and the remedy (prune, not clean):
Also check hardlink counts before promising a number. uv hardlinks cache files into live .venvs, so deleting a cache entry with links>1 reclaims _nothing_:
Don't let "Python is bloated" be the conclusion. In the same audit, Rust's per-repo target/ dirs totalled 57 GB against ~7 GB of Python .venvs — 8× more — because target/ is per-repo with no sharing while uv's archive is shared across every project. Report the measured split, not the folk wisdom.
Phase 2.5 - Project Build Artifacts (in-repo, regenerable)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/devops-tools/skills/disk-hygiene/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 10
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/terrylica/cc-skills/disk-hygiene)