worktree-workflowlisted
Install: claude install-skill pfangueiro/claude-code-agents
# Worktree Workflow
A second checkout of the repository, on its own branch, in its own directory — created and torn
down through the `EnterWorktree` / `ExitWorktree` tools.
## The Gate: Explicit Instruction Only
**Exactly one thing authorizes `EnterWorktree`: the word "worktree" appearing explicitly in the
user's request, or in project instructions (CLAUDE.md / memory).** Per the tool's own contract,
never reach for it because work merely *looks* isolated, risky, experimental, or parallel.
If you got here from any of the following, **stop and do the other thing instead**:
| If the trigger was… | Do this instead |
|---|---|
| "fix this bug", or a hotfix, without the word "worktree" | Normal git workflow — branch, fix, commit |
| Investigating a bug or testing a hypothesis | Investigate in place; undo with `git checkout -- <file>` |
| "do this in isolation" / "experiment in isolation" | An ordinary branch or a scratch copy — isolation alone is not a worktree trigger |
| Parallel sub-agents, parallel tool calls, concurrent tasks | Unrelated to worktrees. For per-agent repo isolation, use the `Agent` tool's `isolation: "worktree"` parameter — a different mechanism (see Related) |
| "create a branch" / "switch branches" | `git switch` or `git checkout` |
Once the user **has** explicitly asked for a worktree, it fits work that genuinely needs a second
simultaneous checkout: a risky refactor that may be thrown away, a release-branch hotfix while
feature work stays in the main