Install any skill in seconds. Free to start, no credit card required.
Get Started Free →florianbruniaux/git-worktree-clean
Clean up stale git worktrees with merged branch detection and disk usage report
Passed 19 of 21 test cases with the skill, and 15 of 21 without it.
and 2 more in the full report
4 fixed15 passed either way2 still failing0 broke1 errored
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
If I run the git worktree clean command with no flags at all, what happens to merged worktrees versus unmerged worktrees?
| Checked | Without skill | With skill |
|---|---|---|
| Automatically removes merged worktrees in default execution mode. | Missed | Passed |
| Retains unmerged worktrees without deletion in default execution mode. | Missed | Passed |
The instructions your model reads when the skill loads.
Batch cleanup of stale git worktrees. Safely removes merged branches, reports disk usage, and handles unmerged branches interactively.
Core principle: Auto-clean merged worktrees, interactive review for unmerged, always report what was reclaimed.
Part of: Worktree Lifecycle Suite | /git-worktree | /git-worktree-status | /git-worktree-remove
git worktree list| Flag | Effect |
|---|---|
--dry-run | Preview what would be cleaned, no changes |
--all | Include unmerged worktrees (interactive confirmation each) |
--force | Remove all worktrees without confirmation (dangerous) |
# Get main branch name
MAIN_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
MAIN_BRANCH=${MAIN_BRANCH:-main}
# Protected branches (never auto-clean)
PROTECTED="main master develop staging production"
# List all worktrees (skip main working tree)
git worktree list --porcelain | while read line; do
# Parse worktree path and branch
# Skip the main worktree (first entry)
test cases passed, vs 15 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.