Worktree Rm — Git skill for Claude Code
Remove a git worktree and optionally delete its branch.
How to install Worktree Rm
Installs to ~/.claude/commands/igerber-diff-diff-worktree-rm.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/igerber/diff-diff/HEAD/.claude/commands/worktree-rm.md -o ~/.claude/commands/igerber-diff-diff-worktree-rm.md Restart Claude Code, or start a new session, for it to be picked up.
What Worktree Rm does
description: Remove a git worktree and optionally delete its branch argument-hint: ""
Remove Git Worktree
Remove an existing worktree. Arguments: $ARGUMENTS
Instructions
1. Parse Arguments
Extract **name** from `$ARGUMENTS`. If empty, abort:
Error: Name required. Usage: /worktree-rm
Tip: Run /worktree-ls to see active worktrees.
Validate that **name** starts with a letter or digit, followed by `[a-zA-Z0-9._-]`. If it starts with `-` or contains invalid
Alternatives in Git
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Local Review — You are tasked with setting up a local review environment for a colleague's branch 10k ★
- Maestro Merge — Merge session worktree branch back to main 530 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Remove Worktree Prompt
Remove a git worktree, delete its branch, and stop its running services
Remove Worktree
Remove a specific worktree cleanly (directory + git reference + branch)
Git Worktree
Manage git worktrees — create, list, remove, parallel branch development
Remove Branch
Remove a branch and its associated worktree.
Cleanup Worktree
Remove a merged worktree and its branch after verifying it was merged into main
Setup Remote Editor
Make a worktree's branch link open in VS Code over Remote-SSH (writes env.CC_STATUSLINE_DIR_URL into user or p
Related Agents
Merger
Reviews, validates, and merges arc-agents PRs. Sole authority for destructive git ops (rebase, push, merge, br
GitOps
Git operations specialist. MUST BE USED for branch management, conflict resolution, git history analysis, work
Git Workflow Specialist
Use this agent for git workflow management, branch strategies, commit hygiene, and git worktree operations. Th