forge-worktrees
Skill2 starsChanged 33 days agoMITView on GitHub
Forge safe-parallel-work playbook using git worktrees. Use when more than one Boss writes code in the same repo at once — parallel agents, worktree, isolate, avoid conflicts.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- ForgeyClap/Forge-Coreedited, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- ForgeyClap/Forge-Core★ 260% same
Wrote their own version · 0
None found.
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 repository74 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- claude-md-improverSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- forge-agent-reportSkill
- forge-agentSkill
- forge-apiSkill
- forge-botsSkill
- forge-brainstormSkill
- forge-cliSkill
- forge-cmsSkill
- forge-code-reviewSkill
- forge-councilSkill
- forge-dataSkill
- forge-debugSkill
- forge-deeplearnSkill
- forge-docdriftSkill
- forge-doctorSkill
- forge-ecommerceSkill
- forge-electronSkill
- forge-extensionSkill
- forge-figmaSkill
- forge-fullstackSkill
- forge-gameSkill
- forge-graded-verifySkill
- forge-guardianSkill
- forge-heartbeatSkill
- forge-intakeSkill
- forge-integrationSkill
- forge-mcp-clientsSkill
- forge-migrationSkill
- forge-mindmapSkill
- forge-mlopsSkill
- forge-mobileSkill
- forge-n8nSkill
- forge-nightshiftSkill
- forge-paymentsSkill
- forge-prdSkill
- forge-predictionSkill
- forge-projectbrainSkill
- forge-prompt-coachSkill
- forge-qualitySkill
- forge-ragSkill
- forge-registrySkill
- forge-reportSkill
- forge-routerSkill
- forge-scoutSkill
- forge-scrapingSkill
- forge-scribeSkill
- forge-skill-testingSkill
- forge-snapshotSkill
- forge-verifySkill
- forge-voiceSkill
- forge-websiteSkill
- frontend-designSkill
- grillingSkill
- grill-meSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 18
Only isolate genuinely independent subtasks (reference dispatching-parallel-agents).
- Very specific: line 20
Never force-push, reset --hard, or otherwise destructively touch the integration branch without explicit owner approval, even when …
- Distinctive: line 35
Do NOT isolate: single-agent sequential work, trivial 1-2 file edits, or tasks with no real parallelism (isolation overhead without …
- Very specific: line 54
After a successful merge: remove the worktree (git worktree remove <path>) and delete the now-merged branch if the project's convention is …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Forge playbook — Safe parallel work via git worktrees
Do not duplicate ECC skills — defer to: using-git-worktrees (detect existing isolation → native
tools → git worktree fallback, mechanics and commands). This file is the Forge-specific orchestration
wrapper: when Forge reaches for isolation, and who owns merging the result back.
Hard rules
- Never let two agents write concurrently to the same working tree. If Head Chef dispatches parallel
Bosses on the same repo, each gets its own worktree/branch — no exceptions, per the project's
parallel-vs-serial doctrine (
CLAUDE.md→ "Parallel vs serial"). - Detect existing isolation before creating anything new (per
using-git-worktreesStep 0) — don't nest worktrees or fight a harness that already manages workspace lifecycle. - Only isolate genuinely independent subtasks (reference
dispatching-parallel-agents). Dependent steps stay serial in the main tree — a worktree does not make a dependency parallel-safe. - Never force-push, reset --hard, or otherwise destructively touch the integration branch without explicit owner approval, even when resolving a merge conflict.
- A non-source hotspot (event registries, sync manifests, dashboard files, doctor/config) that doesn't
warrant a full worktree still needs the
forge-lock-guard.cjs acquire/releaseprotocol around its dispatch (seeforge-routerStep 4) — lock-guard and worktree isolation are complementary safeguards, not either/or.
When to isolate
- Head Chef is running two or more Bosses concurrently against the same repo (e.g. Build Boss + UI Boss on different modules of the same app in the same run).
- A large/risky change (major refactor, dependency upgrade) that should stay reviewable as its own diff before merging into the main line.
- Codex write-delegation (
/codex:rescueor any--writetask) — perCODEX_GLOBAL_POLICY.md(an owner-level policy in~/.claudewhen present; on an install without it, the defaults stated in this skill apply — read-only, never a blocker), Codex runs on a separate worktree/branch, never concurrently with Claude in the same tree.
Do NOT isolate: single-agent sequential work, trivial 1-2 file edits, or tasks with no real parallelism (isolation overhead without benefit).
Create & integrate
- Create. Detect existing isolation first; otherwise create a worktree per independent Boss/agent
(
git worktree add <path> -b <branch>), scoped to that Boss's exact work package. - Dispatch. Each Boss works only inside its own worktree, on files relevant to its own package — commits stay scoped, no unrelated files bundled in.
- Integrate. The Lead (Head Chef, or whichever Boss owns the integration for that run) merges each worktree's branch back into the target branch, resolving any conflicts itself rather than leaving them for the next agent.
Lead is the integration layer
Per the project's standing rule, the agent coordinating parallel work is the one responsible for merging it back cleanly — an individual Boss does not merge its own worktree into main unilaterally when other parallel work is still in flight. The Lead verifies the assembled result (a real integration check, not just "each worktree's own tests passed") before treating the parallel build as done.
Cleanup
After a successful merge: remove the worktree (git worktree remove <path>) and delete the now-merged
branch if the project's convention is to prune merged branches. Never delete a worktree/branch that still
has unmerged, uncommitted, or unreviewed work without explicit owner confirmation.
Does 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.

