arbiterforge/codearbiter-routines-using-git-worktrees
OPTIONAL per-task isolation for autonomous parallel work. Routed to only on explicit opt-in by subagent-driven-development or dispatching-parallel-agents, so parallel units mutate files without colliding. Stands up one worktree per unit, works it in isolation, then integrates each unit back onto the caller's working branch for the caller's single commit-gate + finishing-a-development-branch exit. Never on the default path; it does not bypass a gate or finish per unit.
This is a copy. The original lives at arbiterforge/codearbiter-using-git-worktrees.
npx skills add https://github.com/arbiterForge/codeArbiter --skill using-git-worktrees
OPTIONAL. Per-task filesystem isolation for parallel agent work — opt-in only, never the default path.
Routed to by subagent-driven-development and dispatching-parallel-agents when, and only when, the
caller requests isolation. If no isolation is requested, this skill does not run; parallel units share
the working tree under their own discipline.
Isolation is convenience, not soul. It lets concurrent units edit files without collision. It changes
nothing about the gates — the consolidated work still clears commit-gate and the single
finishing-a-development-branch terminal step, run by the caller. What it MUST NOT do is multiply
that terminal step into one PR per unit.
Read these, or STOP and surface the gap — never guess:
<project-root>/.codearbiter/CONTEXT.md — confirm the repo is a git repo and the base/working branch.Confirm the caller passed an explicit isolation opt-in AND the parallel unit list (from plans/<slug>.md). Absent either, do not stand up worktrees.
Stand up one worktree per parallel unit. For each unit, create a worktree on a fresh branch off the
current base, under a dedicated parent directory outside the main working tree
(e.g. ../.codearbiter-worktrees/<slug>):
<project-root>/.codearbiter/.worktrees.json (gitignored scratch — NOT the open-tasks.md backlog) so a crash leaves no untracked isolation.Gate: every unit has a distinct worktree on a distinct branch, all rooted at the same clean base, all
recorded. A reused branch or a missing record does not pass.
Each parallel unit works entirely inside its own worktree. Dispatch is unchanged — the caller still
dispatches its author and reviewer agents; they simply operate on the isolated path.
main or any other unit's branch.tdd — isolation is not a TDD bypass.Gate: each unit's work is contained to its own worktree, with no cross-worktree or base-branch writes.
Integrate each isolated unit's work back onto the caller's single working branch — do NOT finish each
unit on its own. Per unit, in order:
subagent-driven-development, or its result cleared the funnel in dispatching-parallel-agents).
An unaccepted unit does not fold back.
here, in the open. Never integrate onto main or the default branch.
The consolidated working branch then takes the caller's normal single exit — ONE commit-gate pass
and ONE finishing-a-development-branch decision, run by the caller, not per unit. This skill
integrates; it never opens N PRs or finishes N branches. A unit that cannot integrate cleanly is
surfaced as a conflict for resolution — never force-merged, never dropped silently.
Gate: every accepted unit integrated onto the caller's working branch with conflicts resolved; no
per-unit PR or finish was opened.
Remove every worktree this skill created, prune its administrative metadata, and clear the manifest at
<project-root>/.codearbiter/.worktrees.json. A unit whose branch was integrated onto the
working branch (Phase 3) has its worktree torn down; an unaccepted or abandoned unit's worktree and
branch are removed together.
Gate: zero worktrees created by this skill remain, and the manifest is empty. An orphaned worktree is a failure.
main.finishing-a-development-branch per unit — integrate accepted units onto the caller's working branch, which takes the single commit-gate + finishing exit.Take arbiterforge/codearbiter-routines-using-git-worktrees from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.