clean-dev-caches
/clean-dev-caches
Zwalnia miejsce na dysku komputera programisty przez usuwanie odtwarzalnych pamięci podręcznych i starych buildów, jeśli prace są już scalone.
- Autor
- Adrian-stuff ↗
- Repozytorium
- clean-dev-caches ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 28.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 28.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/devclean.sh
Co robi i kiedy
Zwalnia miejsce na dysku komputera programisty przez usuwanie odtwarzalnych pamięci podręcznych i starych buildów, jeśli prace są już scalone.
Oryginalny opis (EN)
Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.
Jak działa
- Workflow
- Things to know
Podgląd SKILL.md
---
name: clean-dev-caches
description: Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.
---
# Clean dev caches
Everything here is about deleting files, so the job is mostly judgment: delete only what
rebuilds itself, skip anything in use, and report what actually got freed.
The bundled script does the measuring and deleting. Run it with `bash`, not as a zsh snippet:
`scripts/devclean.sh` (relative to this skill's folder).
```bash
bash scripts/devclean.sh scan # what can be freed; deletes nothing
bash scripts/devclean.sh clean --yes # delete every "ready" cache in the default tier
bash scripts/devclean.sh clean --only npm,gradle --yes
bash scripts/devclean.sh scan --deep # also Maven, Go modules, Cargo sources, NuGet
bash scripts/devclean.sh builds ~/projects # .next/.turbo/... under a folder (add --yes to delete)
bash scripts/devclean.sh builds ~/projects --older-than 30 # only outputs not rebuilt in 30 days
bash scripts/devclean.sh builds ~/projects --older-than 90 --node-modules # + deps of idle projects
bash scripts/devclean.sh worktrees ~/projects/my-repo # report only
bash scripts/devclean.sh suggest # bigger wins beyond caches; report only
bash scripts/devclean.sh tools # AI coding CLIs and global tools you stopped using; report only
bash scripts/devclean.sh list # every cache id
```
If `devclean` is on PATH (installed by the repo's `install.sh` or Homebrew), it's the same
script, so `devclean scan` works too.
`clean` and `builds` are dry runs until `--yes` is passed.
## Workflow
1. **Measure.** Run `df -h ~` for the starting free space, then `devclean.sh scan`. Show the
user the table: each row is a cache, its size, and `ready` or `skip` with the reason.
2. **Agree on scope.** If the user already asked you to clean, go ahead with the default
tier. Otherwise list the big rows and ask. Always ask before `--deep` (those take a long
time to download again) and before anything in the "Not touched" section.
3. **Clean.** `devclean.sh clean --yes`, or `--only id,id` to clean less. Rows marked `skip`
are skipped on their own. Don't work around them by deleting the path yourself.
4. **Build outputs (optional).** Ask which folder holds their projects (common ones:
`~/projects`, `~/code`, `~/dev`, `~/src`, `~/Developer`). Prefer
`builds DIR --older-than 30`: deleting the `.next` of a project they work on today only
makes the next dev start slow. Show the list, then re-run with `--yes`. Projects with any
running process inside them are skipped. That covers dev servers, editors' terminals and
other agents. `--node-modules` (only with `--older-than`) also removes the dependencies of
projects where nothing changed for that many days. `bun install` or `npm install` brings
them back.
5. **Worktrees (optional).** `worktrees REPO` labels each linked worktree:
- `SAFE`: no uncommitted changes, and every commit is in the default branch (or its PR
was merged and every commit is pushed).
- `KEEP`: open PR, commits that exist only locally, or a process running in it.
- `REVIEW`: uncommitted changes or unmerged commits. Look before you suggest anything.
For uncommitted changes, check whether the default branch already has the same lines.
Show the table and remove only what the user approves. Right before removing, re-check
that nothing is running in that worktree, because agents and terminals start up all the
time. Use `git worktree remove --force <path>` and keep the branches.
6. **Suggest the bigger wins.** `devclean.sh suggest [DIR...]` looks past caches:
- installers and old large files in Downloads
- idle `node_modules` and build outputs
- unused Docker images
- Colima, OrbStack and other VMs, and a second container runtime
- Ollama, Hugging Face and LM Studio models
- Android emulators, iOS DeviceSupport, Xcode Archives and extra Xcode versions
- extra Node, Rust, Python and Java versions
- Conda packages and orphaned Homebrew packages
- big app caches, files over 1 GB, and Time Machine snapshots
It deletes nothing. Each line is a size, what it is, and how to act. Pass these to the
user as suggestions, biggest first, in plain words. Act on one only when they pick it,
and use the command on its line. A VM disk or a model is someone's working environment,
not junk. Never `colima delete`, `docker image prune -a` or `ollama rm` without a
specific yes.
7. **Unused tools.** `devclean.sh tools [--older-than DAYS]` (default 60) has two parts.
- **AI coding tools and model runners:** Claude Code, OpenCode, Codex, Gemini, Qwen,
Kilo, Aider, Goose, Amp, Crush, Cursor, Windsurf, Droid, Copilot CLI, Cline, Auggie,
Continue, Kiro, OpenHands, Plandex, Antigravity, Ollama and LM Studio. Each gets:
- a verdict: `IN USE` (running now), `USED`, `UNUSED` (idle that many days) or
`LEFTOVER` (uninstalled, but its data is still there)
- its install size and data size
- the exact uninstall command for how it was installed (brew, npm, bun, pnpm, app
bundle or native binary), then how to remove its data
- **Other global command-line tools idle that long:** Homebrew formulae you installed
yourself (not dependencies), plus npm, Bun, pnpm, pipx, uv, `cargo install` and
`go install` tools.
"Last used" is the later of the command's last-run time (file access time) and when it
last wrote sessions, logs or settings. Never run a tool to check it, because even
`--version` resets that date. Data folders hold sessions, settings and logins, so
suggest deleting them only together with the uninstall. Never touch the harness you are
running in. Ask before each removal.
8. **Report.** Run `df -h ~` again and give the change in free space as the result. Also
list what was skipped and why.
## Things to know
- **`du` overstates what deleting frees on APFS.** Package managers (Bun, pnpm, npm via
clonefile) and copied worktrees share disk blocks. Removing a 1.7 GB worktree can free
50 MB. Never promise a number from `du` alone. The `df` change after cleaning is the truth.
- **Never delete these without an explicit request for that item:** Docker images or
volumes (volumes often hold local databases), Android AVDs, iOS DeviceSupport, Xcode
Archives (shipped builds), simulator devices, browser profiles, `node_modules`, the
Trash, or `~/Library/Caches` as a whole. Spotify and browser caches aren't dev caches.
- **Check that nothing uses it first.** The script skips Gradle while a daemon runs, Xcode,
VS Code and JetBrains caches while those apps are open, package-manager caches during an
install, and Docker when the daemon is down. If the user wants a skipped one cleaned,
ask them to quit the app (or run `gradle --stop`) and scan again.
- **Shell traps the script avoids** (keep this in mind when running your own commands):
zsh aborts the whole command on an unmatched glob such as `AndroidStudio*`. zsh expands a
bare `=word` (`echo ====` fails). Some machines put a non-coreutils `head`/`du` early on
PATH (XAMPP ships a perl `head`). Use `/usr/bin/head` or run under `bash`.
- After a big cache clean, the next `npm install`, `bun install`, Gradle build or Docker
build is slower while it downloads again. Mention that once.
Pliki w paczce (2)
- SKILL.md 8 KB
- scripts/devclean.sh 40 KB
Wersje
W bazie nie ma innych skilli o nazwie clean-dev-caches.
Migawka bazy z 13.11.2026 · wersja paczki 837fc92d94c9 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100cleanup
Odzyskuje miejsce na dysku i czyści gałęzie po agentach kodujących AI: worktrees, scalone gałęzie, artefakty buildów, cache pakietów i stare logi sesji. - 98disk-cleanup
Zwalnia miejsce na dysku C w Windows przez czyszczenie odtwarzalnych pamięci podręcznych, po wcześniejszym skanie i potwierdzeniu. - 100xcode-disk-cleanup
Audytuje i bezpiecznie czyści miejsce zajęte przez narzędzia Xcode na macOS, w tym DerivedData, symulatory i archiwa. - 100clean-targets
Zwalnia miejsce na dysku, usuwając katalogi budowania cargo target/ w głównym checkoutcie i w każdym worktree repozytorium, pomijając te używane przez trwający build. - 90free-up-disk-space
Zwalnia miejsce na dysku Maca bezpiecznie: pokazuje, co zajmuje przestrzeń, czyści pamięci podręczne i symulatory oraz ocenia, czy folder można usunąć. - 86cleanup
Zwalnia miejsce na dysku w projekcie, usuwając nieużywane git worktrees i foldery cache Next.js, a oszczędzając worktrees używane przez sesje i cache działających serwerów.