cleanup
/cleanup
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.
- Autor
- sauravpanda ↗
- Repozytorium
- bonsai ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.08.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.08.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
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.
Oryginalny opis (EN)
Safely analyze and clean up Claude Code git worktrees with Bonsai. Use when the user asks to clean, prune, remove, audit, or reclaim disk space from Claude Code worktrees, stale agent worktrees, or .claude/worktrees directories.
Jak działa
- Workflow
- Safety rules
Podgląd SKILL.md
--- name: cleanup description: Safely analyze and clean up Claude Code git worktrees with Bonsai. Use when the user asks to clean, prune, remove, audit, or reclaim disk space from Claude Code worktrees, stale agent worktrees, or .claude/worktrees directories. --- # Clean up Claude Code worktrees Use Bonsai's saved plan/apply protocol. Keep deletion decisions in the binary so the workflow remains deterministic and resistant to stale state. ## Workflow 1. Verify that `bonsai` is available. If it is missing, stop and give the user the installation command from the project README. Do not install it without permission. 2. Run `bonsai prune --global --claude --json`. Bonsai searches bounded development roots such as `~/Github`, `~/Projects`, and `~/Developer`. If the user names a different location, add a repeatable `--root <directory>`. 3. Read the JSON and summarize: - number of worktrees scanned; - every `safe` worktree and why it is safe; - every `review` and `protected` worktree and why it will be preserved; - `reclaimable_bytes` in a human-readable unit. 4. If `safe` is empty, report that nothing is safe to prune and stop. 5. Ask the user to approve applying the displayed plan. Mention the exact number of safe worktrees and reclaimable space. 6. After approval, apply that exact plan with: ```bash bonsai prune --apply <plan_id> --yes --json ``` 7. Report `removed`, `branches_deleted`, and `reclaimed_bytes`. Call out any branch deletion failures. ## Safety rules - Never use `--force`, `git worktree remove`, or `git branch -D` directly. - Keep `--global --claude` on the planning command unless the user explicitly limits cleanup to the current repository. - Never apply a different plan ID from the one the user approved. - Never delete `review` or `protected` entries. - If applying reports that the plan expired or a worktree changed, create a new plan, show the differences, and ask for approval again. - Keep JSON stdout intact for parsing. Do not merge progress or explanatory text into it. - Trust Bonsai's classification. A failed local inspection or an explicit unknown PR state is protected; do not work around it. If GitHub is entirely unavailable, Bonsai may still prove recovery from local Git metadata.
Pliki w paczce (2)
- SKILL.md 2 KB
- agents/openai.yaml 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · sauravpanda/bonsai | 100 | MIT |
| civitai/civitai | 100 | Apache-2.0 |
| davepoon/buildwithclaude | 100 | MIT |
| rubycatco/herdr-fleet | 100 | MIT |
| CMMD-Center/cmmdstack | 100 | MIT |
| ronedgecomb/anything | 100 | Apache-2.0 |
| lvlup-sw/exarchos | 100 | Apache-2.0 |
| NISH1001/vibepiler | 100 | MIT |
| Mooshieblob1/MooshieUI | 100 | AGPL-3.0 |
Migawka bazy z 13.11.2026 · wersja paczki 137615351ab4 (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
- 100zap
Znajduje nieaktualne worktree Git i bezpiecznie je usuwa, także te zostawione przez agentów kodujących. - 100cleanup-git
Usuwa scalone lokalne gałęzie git i nieaktualne worktrees, porządkując lokalny stan repozytorium. - 95caro.prune
Bezpiecznie zwalnia miejsce na dysku w projekcie caro: czyści cache buildów Rust, nieaktualne worktree git, puste stuby i node_modules, zachowując worktree z niezatwierdzonymi zmianami lub plikiem blokady. - 100git-worktree-prune
Bezpiecznie usuwa nieaktualne git worktrees i lokalne gałęzie po dawnych sesjach, kasując tylko te bez unikalnej pracy, tak aby żaden commit nie zginął. - 100worktree-sweep
Wyszukuje nieaktualne worktree w wielu repozytoriach, klasyfikuje je i po zatwierdzeniu usuwa te czyste, mierząc zajęte miejsce. - 100deep-cleanup
Skanuje i czyści nieaktualne worktree gita deep-work (gałęzie dw/*) oraz worktree forków i usuwa bezczynne sesje forków z rejestru.