clean-targets
/clean-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.
- Autor
- socai-io ↗
- Repozytorium
- socai ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 27.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 27.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/clean-targets.sh
Co robi i kiedy
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.
Wyzwalacze z opisu
Oryginalny opis (EN)
Reclaim disk space by deleting cargo target/ build directories across the main checkout and every git worktree of this repo. Use whenever the user wants to clean up build artifacts, free disk space, run "cargo clean" everywhere, prune worktree build caches, or complains that the repo or its worktrees are eating gigabytes of disk. Safely skips any target dir that a running build or dev session (cargo, rustc, tauri dev) is using.
Jak działa
- How to run
- What the script does
- Notes
Podgląd SKILL.md
--- name: clean-targets description: Reclaim disk space by deleting cargo target/ build directories across the main checkout and every git worktree of this repo. Use whenever the user wants to clean up build artifacts, free disk space, run "cargo clean" everywhere, prune worktree build caches, or complains that the repo or its worktrees are eating gigabytes of disk. Safely skips any target dir that a running build or dev session (cargo, rustc, tauri dev) is using. --- # clean-targets Delete cargo `target/` directories across every checkout of this repo — the main checkout and all git worktrees — in one pass. Deleting `target/` is exactly what `cargo clean` does; the difference is this covers every checkout at once and refuses to touch a target that a live build is writing to. ## How to run From anywhere inside any checkout of the repo: ```bash bash "$(git rev-parse --show-toplevel)/.claude/skills/clean-targets/scripts/clean-targets.sh" --dry-run ``` Run with `--dry-run` first and show the user what would be deleted and what is being kept (and why). If the plan looks as expected, run it again without the flag to actually delete. Report the total freed at the end, plus current free disk (`df -h /`). ## What the script does - Discovers all checkouts with `git worktree list --porcelain` — nothing is hardcoded, so it works on any machine and any worktree layout. - Detects target dirs by cargo's `CACHEDIR.TAG` marker file, not by directory name, so unrelated directories that happen to be called `target` are never touched. - Skips any target whose path appears in a running process's command line (active `rustc`/`cargo` compile, a dev binary running out of `target/debug`, a `tauri dev` session). Tell the user which ones were kept and that they can re-run after stopping those sessions. ## Notes - A skipped "in use" target usually means an active `pnpm exec tauri dev` in that worktree. Never work around the skip by killing the process yourself — surface it and let the user decide. - Everything deleted is a rebuildable cache; the next `cargo build` in that checkout just starts cold. No source files, git state, or `node_modules` are touched.
Pliki w paczce (2)
- SKILL.md 2 KB
- scripts/clean-targets.sh 3 KB
Wersje
W bazie nie ma innych skilli o nazwie clean-targets.
Migawka bazy z 13.11.2026 · wersja paczki 8895112593f9 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 4 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100cargo-steward
Czyści katalogi budowania w projektach Rust, zwalnia miejsce na dysku i zarządza drzewami roboczymi gita. - 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. - 81cleanup
Zwalnia miejsce na dysku, usuwając nieużywane worktree gita i foldery cache Next.js, z zachowaniem tych, z których korzystają sesje. - 100clean-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. - 100disk-space-cleaner
Odzyskuje miejsce na dysku, usuwając odtwarzalne katalogi buildów i zależności, takie jak node_modules, .next czy target, od największych, z pominięciem tych z aktywnym procesem, domyślnie w trybie dry-run. - 100cleanup
Bezpiecznie analizuje i czyści worktrees git Claude Code przy pomocy Bonsai: usuwa nieaktualne worktrees agentów, katalogi .claude/worktrees i odzyskuje miejsce na dysku.