Download

slash command · Git & Code Review

Worktree Cleanup

by davila7

Clean up merged worktrees and their branches

Calyban is a free desktop app. It checks Worktree Cleanup for red flags before installing, lets you choose the agent and folder, and undoes it in one click.

Install Worktree Cleanup manually

Prefer the terminal? This does the same thing as Calyban's install.

Claude Code

mkdir -p ~/.claude/commands
curl -fsSL https://raw.githubusercontent.com/davila7/claude-code-templates/6c0bb15238cb5bfbf84ef27eb7e027720936e1e2/cli-tool/components/commands/git-workflow/worktree-cleanup.md -o ~/.claude/commands/worktree-cleanup.md

Codex

mkdir -p ~/.codex/prompts
curl -fsSL https://raw.githubusercontent.com/davila7/claude-code-templates/6c0bb15238cb5bfbf84ef27eb7e027720936e1e2/cli-tool/components/commands/git-workflow/worktree-cleanup.md -o ~/.codex/prompts/worktree-cleanup.md

Start a new Claude Code & Codex session afterwards so it picks up the change.

Similar slash commands

All slash commands →

Guides

Listed in the public Calyban catalog. Worktree Cleanup is made by davila7, not Calyban. Inclusion isn't an endorsement and safety checks aren't a guarantee.