← ClaudeAtlas

worktree-workflowlisted

Git worktree isolation via the EnterWorktree and ExitWorktree tools — creating a separate checkout on its own branch, working in it, then keeping or discarding it. Use ONLY when a worktree is explicitly requested, by the user or by project instructions (CLAUDE.md / memory). Triggers include worktree, EnterWorktree, ExitWorktree, isolated checkout, side branch. Once explicitly requested it fits work needing a second simultaneous checkout — a risky refactor that may be thrown away, a hotfix on a release branch while feature work continues in the main tree, or two implementations compared side by side — but none of those authorizes the tool on its own, without the explicit request. It does not cover parallelism in general — parallel sub-agents, parallel tool calls, and concurrent tasks are unrelated, and per-agent repo isolation is instead the Agent tool's isolation parameter set to "worktree" — nor an ordinary branch switch, a single-file experiment revertible with git checkout, or a non-git project.
pfangueiro/claude-code-agents · ★ 6 · AI & Automation · score 76
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