From majestic-engineer
Cleans up merged and stale git worktrees by invoking git-worktree skill and running worktree-manager.sh cleanup, then reports what was removed.
How this command is triggered — by the user, by Claude, or both
Slash command
/majestic-engineer:worktree-cleanuphaikugit/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Worktree Cleanup Use the git-worktree skill to clean up merged and stale worktrees: Then run: Report what was cleaned up.
Use the git-worktree skill to clean up merged and stale worktrees:
skill git-worktree
Then run:
worktree-manager.sh cleanup
Report what was cleaned up.
npx claudepluginhub majesticlabs-dev/majestic-marketplace --plugin majestic-engineer/worktree-cleanCleans finished git worktrees by removing directories for safe (merged, no uncommitted changes) ones, pruning references, and reporting removed/kept items.
/cleanupRemoves already merged Git worktrees and their branches. Supports --dry-run to preview candidates and confirmation before deletion.
/cleanup-worktreesRemoves safe git worktrees for merged branches only (checked via git branch --merged and gh PRs), cleans orphans, categorizes kept ones, and generates a cleanup report.
/worktreeManages git worktrees for isolated feature development. List existing worktrees or cleanup unused ones using list or cleanup subcommands.
/clean-worktreesSafely removes specified git worktrees using `git worktree remove` without --force, relying on git's safety checks for clean state and pushed commits.
/prune-worktreeSafely scans and removes Git worktrees for closed GitHub issues with merged branches into the default branch, cleans local branches, and includes safety checks with user confirmations.