← ClaudeAtlas

soleri-using-git-worktreeslisted

Triggers: "worktree", "parallel branch", "safe branch", "isolated branch". Protocol for creating, working in, and cleaning up git worktrees.
adrozdenko/soleri · ★ 6 · AI & Automation · score 74
Install: claude install-skill adrozdenko/soleri
# Using Git Worktrees Isolate work into parallel branches without stashing or switching. Use for multi-task plans, risky changes, or parallel execution. Claude Code natively supports `isolation: "worktree"` on sub-agents. **Announce at start:** "I'm using the using-git-worktrees skill to isolate this work." ## Check Vault for Worktree Patterns ``` YOUR_AGENT_core op:search_intelligent params: { query: "worktree parallel execution patterns" } ``` ## When to Use - Plan has 2+ independent tasks that can run in parallel - Risky or experimental change that should not touch the main working tree - Long-running task where you need the main branch clean for hotfixes ## Creation Protocol ```bash # 1. Pre-flight — working tree must be clean git status git log origin/main..main # check for unpushed commits # 2. Create worktree git worktree add ../<repo>-<task> -b <branch-name> cd ../<repo>-<task> # 3. Bootstrap and baseline npm install # shared .git does NOT share node_modules npm test # must pass before any changes ``` If the working tree is dirty, commit or stash first. If baseline tests fail, stop and investigate. ## Working in a Worktree - Full working copy — edit, test, commit normally - Commits are visible across worktrees (shared `.git`) - `git worktree list` to see all active worktrees ## Cleanup Protocol ```bash # 1. Safety check — never delete with unpushed/uncommitted work git log origin/<b