housekeeping
Skill78 starsChanged 4 months agoMITView on GitHub
Use when macOS disk space is low, "disk full", 硬碟空間不夠, startup disk almost full, or before installing something large — diagnoses what is eating space and reclaims it safely
Files
macOS Disk Housekeeping
Overview
Diagnose → reclaim safe targets → verify. Known-safe cleanup only; never touch personal data. reference/prune.sh automates the whole flow (dry-run by default).
Diagnosis
df -h /System/Volumes/Data # the REAL usage (df / shows the sealed system snapshot)
du -sh ~/Library/* | sort -rh | head # usual suspects
du -sh ~/* ~/.[a-z]* 2>/dev/null | sort -rh | head
tmutil listlocalsnapshots / # MSUPrepareUpdate = staged macOS updateKnown hogs on this machine (2026-07 findings)
| Target | Typical size | Action |
~/Library/Application Support/Claude/vm_bundles | ~10G | delete if VM not running (pgrep -fl claudevm); rebuilds on demand |
~/Library/pnpm store | 7G+ | pnpm store prune |
~/Library/Caches/{com.spotify.client,BraveSoftware,Google,com.brave.Browser,pip,go-build,node-gyp} | ~4G | delete outright |
~/.cache/uv | 2G+ | uv cache prune (remainder is referenced by live venvs — leave it) |
/opt/homebrew | 20G+ | brew cleanup --prune=all && brew autoremove |
MSUPrepareUpdate snapshot | few GB | finish the pending macOS update (reboot) — softwareupdate -l to see it |
Do NOT delete
~/Library/Caches/ms-playwright*— breaks E2E untilplaywright install~/.cache/codex-runtimes— Codex plugin runtime~/Pictures,~/Library/Group Containers, Mail — personal data- leftover
~/.cache/uvafter prune — hardlinked into venvs
Gotchas
ripdoes not free space. It moves files to/tmp/graveyard-$USERon the same volume. After ripping large targets runyes | rip --decomposeand re-checkdf.brew cleanupfrees nothing when packages are outdated — it only deletes versions older than the installed-latest. Upgrade first if you want real savings.uv cache prunevsclean: prune keeps in-use entries (correct); clean wipes all (pointless — hardlinked files free nothing).
Automation
reference/prune.sh # dry-run report of known-safe targets
reference/prune.sh --apply # actually clean them
# Find NEW candidates: large + old + cold, ranked by "storage rent"
# (score = size_GB × idle_days; gates on created>180d AND atime>90d;
# top hits cross-checked with Spotlight kMDItemLastUsedDate)
reference/clean-large-and-olds.sh # scan $HOME, top 20
reference/clean-large-and-olds.sh --root DIR --min-size 50 --top 30clean-large-and-olds.sh is report-only — review, then rip <paths> + yes | rip --decompose.
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- langfuse/langfuse★ 37ksame name
- alexeykrol/claude-code-starter★ 194same name
- valpere/session-indexer★ 42same name
- ARCASSystems/FounderOS★ 7same name
- ImpactMojo/ImpactMojo★ 3same name
- buttjer/n8n-decanter★ 2same name
- bpappin/skills★ 1same name
- detroitwtf/claude-housekeeping★ 1same name
- elfrost/ai-patchlab★ 1same name
- My-Stacks/claude-code-skills★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- claude.symlink/CLAUDE.mdCLAUDE.md
- hammerspoon.symlink/CLAUDE.mdCLAUDE.md
- pyscripts.symlink/CLAUDE.mdCLAUDE.md
- shellscripts/CLAUDE.mdCLAUDE.md
- start/CLAUDE.mdCLAUDE.md
- tmux/CLAUDE.mdCLAUDE.md
- zsh/CLAUDE.mdCLAUDE.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

