From specialist-agent
Creates isolated Git worktrees for parallel development, risky refactoring, or multi-feature work without branch switching or conflicts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/specialist-agent:worktreeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create isolated workspaces for parallel development. Each task gets its own directory - no branch switching, no stashing, no conflicts.
Create isolated workspaces for parallel development. Each task gets its own directory - no branch switching, no stashing, no conflicts.
Target: $ARGUMENTS
Choose where to create worktrees:
Priority order:
1. Existing worktrees directory (if configured)
2. .claude/worktrees/ (default for Specialist Agent)
3. ../project-worktrees/ (sibling directory)
4. Ask user
# Create new branch and worktree
git worktree add .claude/worktrees/$ARGUMENTS -b worktree/$ARGUMENTS
# Verify creation
git worktree list
# Enter worktree
cd .claude/worktrees/$ARGUMENTS
# Install dependencies (auto-detect)
if [ -f "package-lock.json" ]; then npm ci
elif [ -f "yarn.lock" ]; then yarn install --frozen-lockfile
elif [ -f "pnpm-lock.yaml" ]; then pnpm install --frozen-lockfile
elif [ -f "bun.lockb" ]; then bun install
fi
# Verify clean baseline
git status
The worktree is a full copy of the repo.
- Changes here do NOT affect the main worktree
- You can run tests, builds, anything
- Commits go to the worktree/$ARGUMENTS branch
When done:
# Option 1: Merge back
cd /path/to/main/repo
git merge worktree/$ARGUMENTS
# Option 2: Create PR from worktree branch
gh pr create --base main --head worktree/$ARGUMENTS
# Option 3: Discard
git worktree remove .claude/worktrees/$ARGUMENTS
git branch -D worktree/$ARGUMENTS
git worktree list
git worktree remove .claude/worktrees/$NAME
git branch -D worktree/$NAME
git worktree prune
When @orchestrator dispatches parallel agents:
@orchestrator
├── Worktree: feature-a → @builder (component)
├── Worktree: feature-b → @builder (service)
└── Worktree: feature-c → @tester (tests)
Each agent works in its own worktree.
No file conflicts possible.
Merge when all complete.
Before claiming worktree is ready:
git worktree list shows the new worktreegit status shows no untracked files from setup)| Excuse | Reality |
|---|---|
| "Just stash and switch branches" | Stashing loses context and is error-prone. Worktrees keep everything intact. |
| "I'll remember what I was working on" | You won't. Worktrees preserve state explicitly. |
| "Too much disk space" | Worktrees share .git objects. Overhead is minimal. |
| "Merging will be hard" | Merging is the same as any branch. Worktrees don't add merge complexity. |
| "I'll just do tasks sequentially" | Sequential is slower. Parallel worktrees = parallel development. |
worktree/auth-refactor not worktree/temp.claude/worktrees/ to .gitignore──── /worktree ────
Action: [create | list | remove | merge]
Name: $ARGUMENTS
Path: .claude/worktrees/$ARGUMENTS
Branch: worktree/$ARGUMENTS
Status: Ready
Dependencies: Installed
Baseline tests: Passing
Active worktrees:
1. /main/repo (main branch)
2. .claude/worktrees/$ARGUMENTS (worktree/$ARGUMENTS)
npx claudepluginhub herbertjulio/specialist-agent --plugin specialist-agentCreates isolated git worktrees for parallel development without disrupting the main workspace. Includes safety verification to prevent accidental commits of worktree contents.
Creates isolated Git worktree workspaces for working on multiple branches simultaneously without switching. Handles directory selection, safety verification, and project setup.
Manage Git worktrees for isolated parallel development. Automates creation, switching, and cleanup with .env copying and .gitignore management. Useful for code reviews and feature work.