worktree-delete

SkillDev tools

Remove a git worktree and optionally delete its branch

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the worktree-delete skill

What this skill tells your AI

The instructions your AI receives, as published by the-agency-ai/the-agency in .claude/skills/worktree-delete/SKILL.md and read by ahel’s review.

Delete Worktree

Remove a git worktree from .claude/worktrees/ and optionally clean up its branch.

Arguments

  • $ARGUMENTS: The worktree name to delete (e.g., fix-auth-bug).

Instructions

Step 0: Parse arguments

If $ARGUMENTS is empty, list worktrees and ask which to delete.

Step 1: Validate

  1. Verify .claude/worktrees/<name>/ exists as a git worktree.
  2. Check for uncommitted changes. If dirty, warn and ask to confirm.

Step 2: Determine the branch

Get branch name from the worktree.

Step 3: Remove the worktree

  1. git worktree remove .claude/worktrees/<name> (add --force only if user confirmed dirty deletion)
  2. git worktree prune

Step 4: Offer branch cleanup

Ask:

Delete branch <branch> as well?

  1. Yes — safe delete (git branch -d)
  2. Yes — force delete (git branch -D)
  3. No — keep the branch

Step 5: Report

Worktree deleted:
  Path:   .claude/worktrees/<name>/ (removed)
  Branch: <branch> (deleted/kept)

Signals

GitHub stars
55
Forks
8
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
worktree-delete
Source
github.com/the-agency-ai/the-agency