What problem does it solve?
Blitz development workflows generate numerous temporary git worktrees and agent-spawned branches that accumulate over time, consuming disk space and cluttering the repository. Manual cleanup risks deleting active work, unmerged branches, or worktrees owned by live background sessions, leading to irreversible data loss.
Core Features & Use Cases
- Dry-run inventory by default: Reports age, merge status, commit divergence, and disk usage for all matching worktrees and branches without making any changes.
- Safe merged deletion: Use the --apply --merged-only flag to delete only fully merged branches and their associated worktrees, with no risk to unmerged work.
- Live session protection: Automatically skips worktrees owned by active Claude Code background sessions to prevent data loss, even when using the --force flag.
- Use case: After completing a blitz sprint, use this skill to clean up leftover sprint-N/role branches and agent worktrees without risking active development work.
Quick Start
Use the worktree-prune skill to list all stale git worktrees and branches with their age, merge status, and reclaimable disk space.