alfredocarta

Remove Worktree Prompt — Git skill for Claude Code

Git community

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

Terminal
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

  • 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 ★
  • Voicemode MCP — by Mike Bailey - VoiceMode MCP brings natural conversations to Claude Code 899 ★

Full documentation available on GitHub

View Source Repository