worktree-isolation
Skill0 starsChanged 7 months agoMITView on GitHub
Create and manage git worktrees for parallel coding agent isolation. Invoke when two independent coding tasks need to run simultaneously (max 2).
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mikejhill/agent-skillstheir own version, first seen Nov 15, 2026
- niksavis/handilytheir own version, first seen Nov 8, 2026
- ccoalm/ccl-skillstheir own version, first seen Nov 8, 2026
- niksavis/basiclytheir own version, first seen Nov 7, 2026
- cill-i-am/skillstheir own version, first seen Oct 20, 2026
- aditya-deokar/software-factorytheir own version, first seen Sep 29, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- ccoalm/ccl-skills★ 6same name
- alex-voloshin-dev/ai-skills★ 2same name
- niksavis/basicly★ 2same name
- niksavis/handily★ 2same name
- cill-i-am/skills★ 1same name
- orkait/hyperstack★ 1same name
- aditya-deokar/software-factory★ 0same name
- mikejhill/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- audit-loopSkill
- brain-harnessSkill
- coding-harnessSkill
- edit-modeSkill
- notebooklm-researchSkill
- research-gateSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use the EnterWorktree tool or bash equivalent:
- Distinctive: line 43
ALL gates must PASS before merge is allowed.
- Distinctive: line 47
After Stage 1 PASS + Austin approval:
- Distinctive: line 63
After merge to local main:
- Distinctive: line 70
NEVER share files between worktrees
- Distinctive: line 71
NEVER run more than 2 worktrees simultaneously
- Distinctive: line 72
ALWAYS delete worktree after merge (no stale worktrees)
- Distinctive: line 73
ALWAYS run full audit before merge
- Distinctive: line 78
All coding agents use worktrees — not just Claude sub-agents:
- Distinctive: line 89
No two agents share a worktree
- Distinctive: line 90
All worktree output goes through Claude's 5-gate audit pipeline before merge
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree Isolation Pattern
When to Use
- Two independent coding tasks can run in parallel (no shared files)
- Each task is self-contained (different feature branches)
- Max 2 worktrees active at any time (= max 2 concurrent agents)
Step 1 — Create Worktree
Use the EnterWorktree tool or bash equivalent:
git worktree add _worktrees/{task-id} -b feature/{task-id}-{short-description}Each worktree gets its own:
- Working directory:
_worktrees/{task-id}/ - Feature branch:
feature/{task-id}-{short-description} - Complete copy of the codebase (shares .git objects, not files)
Step 2 — Dispatch Agent to Worktree
In Agent tool call, direct the agent to work within the worktree path:
- Agent reads/writes ONLY within
_worktrees/{task-id}/ - Agent has NO access to main working tree files
- Agent has NO knowledge of what the other worktree agent is doing
Step 3 — Stage 1 Audit (before merge)
Each worktree's output goes through the full 5-gate audit pipeline:
- Semgrep (plugin)
- CodeRabbit (plugin)
- Code-review + pr-review-toolkit (plugins)
- Security-guidance (plugin)
- Clone repo comparison (_repos/)
ALL gates must PASS before merge is allowed.
Step 4 — Merge Back
After Stage 1 PASS + Austin approval:
# Return to main working tree
git checkout main
# Merge the feature branch (no fast-forward for audit trail)
git merge feature/{task-id}-{short-description} --no-ff
# Clean up
git worktree remove _worktrees/{task-id}
git branch -d feature/{task-id}-{short-description}Step 5 — Stage 2 (GitHub PR Airlock)
After merge to local main:
- Push branch → open PR (Austin approval required)
- GitHub Actions: remote semgrep + CodeRabbit
- Austin reviews → merges
Rules
- NEVER share files between worktrees
- NEVER run more than 2 worktrees simultaneously
- ALWAYS delete worktree after merge (no stale worktrees)
- ALWAYS run full audit before merge
- Worktree directory:
_worktrees/(gitignored)
Multi-Agent Worktree Usage
All coding agents use worktrees — not just Claude sub-agents:
| Agent | Worktree? | Branch pattern | Notes |
| Claude (Opus) | NO — stays on main | n/a | Orchestrator. Never leaves main working tree. |
| Claude (Sonnet) | YES | feature/{task-id}-claude-{desc} | Dispatched by Opus |
| Gemini (AntiGravity) | YES | feature/{task-id}-gemini-{desc} | Works in IDE on its own worktree |
| Codex | YES | feature/{task-id}-codex-{desc} | Works in IDE on its own worktree |
- Opus NEVER works in a worktree — it stays on main to orchestrate and review
- Each coding agent gets its own worktree and feature branch
- No two agents share a worktree
- All worktree output goes through Claude's 5-gate audit pipeline before merge
Emergency Cleanup
git worktree list # see all active worktrees
git worktree remove --force _worktrees/{task-id} # force remove
git worktree prune # clean up stale entriesDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

