disk-tidy
Installation
SKILL.md
Disk Tidy
Find out where a nearly full disk went, then free space without losing anything the owner still needs. You measure and propose; the user decides per item; you clean and prove the gain.
TIDY=<this skill's directory>/scripts/disk_tidy.py (Python 3.9+, standard library only) does the parts that must be exact: free space, well-known locations, and build output that is safe to delete. Use absolute paths.
Ground rules
Each rule protects something that is hard to get back.
- Survey read-only. Nothing is deleted, moved or emptied before the user picks it from the cleanup list. A cleanup the user approved stays within what they picked.
- Never empty the Trash, and say so. Apps and user files go to the Trash so the owner can put them back; the space returns only when the owner empties it.
- Never open credential, token, cookie or chat content. Judge app data, profiles and session folders by name, size and date. If a config points at a key file (for example
GOOGLE_APPLICATION_CREDENTIALS), report the path, never the contents, and leave the file where it is. - Check what is in use right before deleting: process working directories (
lsof -d cwd), the binary each running session executes, and dev servers. Keep any version a running process uses, the version a launcher links to, and the one before it. - Delete build output only when git ignores it (
git check-ignore). A folder that merely looks like a cache but is tracked or outside git is real work until shown otherwise. - Prefer each tool's own cleaner (
uv cache prune,pnpm store prune,npm cache clean --force,brew cleanup, in-app storage managers) overrm, because it knows what is still referenced. duoverstates what deletion frees: APFS clones (pnpm, uv and Next.js copy files that way) and hard links are counted once per path. Quotedusizes as estimates and report only thefreedifference as the result.