| name | dev-clean-mac |
| description | Reclaim disk space on a Mac dev machine by deleting regenerable dev caches (Cargo/zfb build output, node_modules, pnpm/npm caches, OS/app caches) and thinning APFS local snapshots so the space actually frees. Manual-only — invoke with /dev-clean-mac when a Mac is low on disk. |
| disable-model-invocation | true |
| argument-hint | [--keep-node-modules] |
Dev Clean Mac
Frees disk on a Mac dev machine by deleting caches and build artifacts that
regenerate on demand. Tuned for this layout — $HOME/repos (with myoss/zfb),
a shared Cargo target dir, pnpm/npm caches — but every step is existence-guarded,
so it runs safely on any Mac with a similar structure (e.g. a second machine).
Why a script and not ad-hoc rm: on APFS, deleting files frees nothing while
local Time Machine snapshots still reference the data — df keeps showing the old
number. The script ends by thinning those snapshots (tmutil thinlocalsnapshots),
which is what makes the reclaimed space materialize. Skipping that step is the #1
reason a cleanup "does nothing."
Workflow
The script lives at scripts/clean-mac.sh in this skill directory.
-
Dry run first — show the user what will be freed, delete nothing:
bash "/.claude/skills/dev-clean-mac/scripts/clean-mac.sh" --dry-run