meta-cleanup-worktreeslisted
Install: claude install-skill skowalskidev/dotclaude
# Clean up DONE worktrees and branches — safely
Sweep the worktrees and branches for THIS repo that are provably finished — merged, clean, and idle —
remove them, and name the Conductor sessions for Simon to archive. NEVER touch anything still being
worked on. Conservative by construction: it LISTS and CONFIRMS before deleting, and never force-deletes.
## Reuse, don't reimplement
- The RULES live in `rules/process.md` §§ "Git worktree discipline" + "Clean up after yourself" (never
disturb the main-checkout WIP; tear the worktree down WITH its merged branch in the same step; verify
cleanup against on-disk storage, not just `git worktree list`) and `references/dev-server-hygiene.md`
(never kill another session's server; storage-vs-listing reconcile). Read them there; do not restate.
- For live-worktree detection REUSE `bin/port-registry.sh reap` (exit 5 = workspace gone but its server
still listens) and `bin/kill-orphan-workers.sh` (`family_is_serving`). Do not reimplement them.
- This GENERALISES `/sk:work-hyperspeed` Step 6 (delete the merged branch local+remote; name the sessions
Simon must archive) from hyperspeed's own `hs/<run>/*` branches to any merged worktree/branch.
## Scope
This repo only. Conductor worktrees under `~/conductor/workspaces/<project>/*`. Never the main checkout,
never the current worktree, never a detached-HEAD or non-Conductor worktree.
## Step 1 — refresh the merge state (one network read)
Resolve the default branch (`git symbolic-re