Agent skill
wt-cleanup
Identify and remove merged or stale git worktrees. Use for housekeeping, removes worktrees for branches that have been merged to main. Frees disk space.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/wt-cleanup-michael-menard-monorepo-2
SKILL.md
/wt:cleanup - Clean Up Merged Worktrees
Description
Quick command to identify and remove merged or stale worktrees.
Usage
/wt:cleanup
What It Does
This slash command:
- Activates the Git Worktree Manager skill (
@git-worktree) - Automatically runs the
*cleanupcommand - Helps you clean up old worktrees
Workflow
The command will:
- List all worktrees - Show all active worktrees
- Identify merged branches - Find branches already merged to main/develop
- Ask which to remove - Interactive selection
- Remove selected worktrees - Safely delete worktrees
- Prune worktree references - Clean up git metadata
Benefits
✅ Smart Detection - Identifies merged branches automatically ✅ Safe Cleanup - Only suggests merged branches ✅ Selective Removal - Choose which to remove ✅ Complete Cleanup - Removes worktrees and branches
Notes
- Only suggests worktrees with merged branches
- You can choose which ones to remove
- Warns about unmerged branches
- Prunes git metadata after cleanup
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?