What problem does it solve?
Over time, developers accumulate stale git worktrees and their associated local branches, wasting disk space and cluttering the repository state. Manually checking which worktrees are merged, missing, or safe to delete is tedious and error-prone, especially with squash-merged branches that git cannot detect as merged.
Core Features & Use Cases
- Worktree Classification: Enumerates all worktrees via
git worktree list --porcelain and classifies each as merged-direct, merged-squash (via GitHub CLI PR lookup), dirty, unpushed, missing, or active.
- Safe Deletion Workflow: Uses
git branch -d by default, requires explicit user confirmation before any --force removal, and never deletes the main worktree or the worktree the agent is currently running in.
- Batch Confirmation: Presents all removal candidates in a single multi-select approval step grouped by category, then executes removals, branch deletions, and
git worktree prune.
- Use Case: After finishing several feature branches, ask the agent to clean up worktrees; it fetches origin, identifies two merged worktrees and one missing directory, gets your approval, and removes them while flagging a dirty worktree you still need.
Quick Start
Ask the agent to clean up your git worktrees and remove any that have been merged or are no longer on disk.