Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

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.

Repozytorium
bonsai ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.08.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.08.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

  1. Workflow
  2. Safety rules
Sekcje z nagłówków SKILL.md, w oryginale · 46 linii, 315 słów
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

RepozytoriumWynikLicencja
Ta strona · sauravpanda/bonsai100MIT
civitai/civitai100Apache-2.0
davepoon/buildwithclaude100MIT
rubycatco/herdr-fleet100MIT
CMMD-Center/cmmdstack100MIT
ronedgecomb/anything100Apache-2.0
lvlup-sw/exarchos100Apache-2.0
NISH1001/vibepiler100MIT
Mooshieblob1/MooshieUI100AGPL-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.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.