| name | ctx-worktree |
| description | Manage git worktrees for parallel agent development. Use when splitting work across independent task tracks. |
Manage git worktrees to parallelize agent work across independent
task tracks. Supports creating, listing, and tearing down worktrees
with ctx-aware guardrails.
When to Use
- User wants to parallelize a backlog across multiple agents
- Multiple independent task tracks with non-overlapping files
- User says "create worktree", "let's parallelize", "split the work"
- 3+ independent tasks that can be worked concurrently
When NOT to Use
- Single task or tightly coupled tasks
- Tasks that touch overlapping files (high merge conflict risk)
- Fewer than 3 independent tasks (overhead exceeds benefit)
- Already inside a worktree (manage from the main checkout only)
- User just wants concurrent Claude Code sessions in the same tree
Operations
create <name>
Create a new worktree as a sibling directory with a work/ branch.
Process:
-
Check count: refuse if 4 worktrees already exist:
git worktree list
Count lines. If >= 5 (1 main + 4 worktrees), stop and explain
the limit.
-
Determine project name from the current directory basename:
basename "$(git rev-parse --show-toplevel)"
-
Create the worktree as a sibling directory:
git worktree add "../<project>-<name>" -b