Use PROACTIVELY when working on multiple branches simultaneously or creating parallel Claude Code sessions...
Automates git worktree creation for parallel Claude Code sessions without conflicts.
Trigger Phrases:
Use Cases:
| Request | Mode | Action |
|---|---|---|
| "create worktree for X" | Single | Create one worktree |
| "set up worktrees for X, Y" | Batch | Create multiple |
| "remove worktree X" | Cleanup | Remove specific |
| "list worktrees" | List | Display status |
# Verify git repo
git rev-parse --is-inside-work-tree
# Check uncommitted changes
git status --porcelain
# Get repo name
basename $(git rev-parse --show-toplevel)
../repo-branch)# New branch
git worktree add ../project-feature -b feature
# Existing branch
git worktree add ../project-bugfix bugfix
# Create with new branch
git worktree add ../project-branch -b branch-name
# Create from existing
git worktree add ../project-branch branch-name
# List all
git worktree list
# Remove worktree
git worktree remove ../project-branch
# Remove worktree and branch
git worktree remove ../project-branch
git branch -D branch-name
| Lock File | Manager |
|---|---|
| pnpm-lock.yaml | pnpm |
| yarn.lock | yarn |
| bun.lockb | bun |
| package-lock.json | npm |
| Issue | Cause | Fix |
|---|---|---|
| "invalid reference" | Branch doesn't exist | Use -b for new |
| "already exists" | Directory exists | Choose different location |
| "uncommitted changes" | Dirty working dir | Commit or stash |
Before Creating:
Before Cleanup:
✓ Worktree created: /Users/connor/myapp-feature-auth
✓ Branch: feature-auth (new)
✓ Dependencies installed
Next steps:
cd ../myapp-feature-auth
claude
All worktrees:
- /path/to/main (main) ← current
- /path/to/worktree (feature-auth) ← new
git worktree listmodes/ - Detailed mode workflowstemplates/ - Setup script templatesdata/best-practices.mddata/troubleshooting.mdVersion: 1.0.0 | Author: Connor