← ClaudeAtlas

worktree-setuplisted

Use when starting an isolated task that needs a git worktree on a NEW branch — any project. Triggers — "set up a worktree for X", "start a worktree for this task", "isolate this work in a worktree", or before a subagent-driven / executing-plans run on a repo not already in a linked worktree. Reads a per-project config (in-repo .worktree.json or a registry under $CLAUDE_PLUGIN_DATA/projects) to decide single vs dual/multi-repo scope (identical branch names on coupled repos), cut from the right base branch, copy env files, and run the right install command. No-op when no config matches and you are not asked to init one.
punkaze/skills · ★ 1 · Data & Documents · score 72
Install: claude install-skill punkaze/skills
# Worktree Setup Set up isolated git worktree(s) for a task, deciding **single vs dual/multi repo scope** from the nature of the change, using a per-project **config**. **Setup only** — creates worktree(s) + branch(es), copies env, installs deps, registers the primary worktree, then hands back. It does NOT plan or implement. > **REQUIRED BACKGROUND:** Read the underlying git-worktree isolation logic for your toolchain. This skill layers per-project config (base branch, install, env-copy, coupling) on top. > **Paths:** scripts live at `${CLAUDE_PLUGIN_ROOT}/skills/worktree-setup/scripts/`. Persistent per-project configs live at `${CLAUDE_PLUGIN_DATA}/projects/` (survives plugin updates), overridable with `WORKTREE_REGISTRY_DIR`. A bundled `projects/example.json` documents the format. ## When to trigger - "set up a worktree for <X>" · "start a worktree for this task" · `/skills:worktree-setup <task>` - "isolate this work in a worktree" (inside a configured repo) - Before a `subagent-driven-development` / `executing-plans` run on a repo not already in a linked worktree ## When NOT to trigger - **No config matches** the current repo and the user did not ask to set one up → no-op (offer `init`). - **Already in a linked worktree** (`GIT_DIR != GIT_COMMON`) → work in the one you're in. - **Trivial one-file fix** the user wants in place (`git switch -c fix/<slug>`) → no worktree. ## Step 0 — Resolve config (always first) ```bash node "${CLAUDE_PLUGIN_ROOT}/skills/worktree-se