cleanup-worktrees
Installation
SKILL.md
Cleanup Worktrees
Intelligent git worktree cleanup. Discovers all worktrees, checks their status, categorizes them, and removes stale ones safely.
Phase 1: Discover Worktrees
List all worktrees:
git worktree list --porcelain
Parse the output to collect:
- Worktree path
- Branch name (or detached HEAD SHA)
- Whether it is the currently checked-out worktree (marked
HEADin output)