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
- Git Worktree Docs Issue: Dependency Installation — GitHub — Community feedback on official docs with full worktree lifecycle walkthrough 81.1k ★
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Worktree Parallel Init — Create multiple git worktrees for parallel development: $ARGUMENTS 23.4k ★
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
Agents Close Gitworktree
You are closing out a git worktree after completing (or abandoning) work. This command updates the tracking re
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