Remove Worktree Prompt — Git skill for Claude Code
Remove a git worktree, delete its branch, and stop its running services.
How to install Remove Worktree Prompt
Installs to ~/.claude/commands/alfredocarta-ai-agent-audit-trail-remove_worktree_prompt.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/alfredocarta/ai-agent-audit-trail/HEAD/.claude/commands/remove_worktree_prompt.md -o ~/.claude/commands/alfredocarta-ai-agent-audit-trail-remove_worktree_prompt.md Restart Claude Code, or start a new session, for it to be picked up.
What Remove Worktree Prompt does
model: claude-sonnet-4-5-20250929 description: Remove a git worktree, delete its branch, and stop its running services argument-hint: allowed-tools: Bash, Read, Glob, Grep
Purpose
Remove an existing git worktree from the `trees/` directory AND delete the associated git branch. This includes stopping any running services on its ports, cleaning up processes, removing the worktree directory, and permanently deleting the branch. This ensures complete cleanup without orphane
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 ★
- Local Review — You are tasked with setting up a local review environment for a colleague's branch 10k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Worktree Rm
Remove a git worktree and optionally delete its branch
Cc Prompts
Claude Code prompts - 52 prompt files including system rules, 37 tools (file ops, shell, tasks, git), and 10 s
Vmctl
Agent skill to control VMware Workstation VMs via vmrun: power on/off, start, stop, suspend, reset, guest IP,
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.
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