Agent skill

Worktree Parallel

by D-Robotics in D-Robotics/moss

How to run writable sub-agents in isolated git worktrees and merge their lease patches

MITAuto-check passedDevelopment

Install Worktree Parallel

skills CLI
$ npx skills add D-Robotics/moss --skill worktree-parallel -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install D-Robotics/moss worktree-parallel --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/D-Robotics/moss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.moss/skills/worktree-parallel .claude/skills/worktree-parallel && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktree-parallel
GitHub stars
143
Token cost
~313 tokens
SKILL.md length
141 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

How to run writable sub-agents in isolated git worktrees and merge their lease patches

  • Works in 6 steps: In fan_out_subagents, give each… → Each child then works in its own git… → On completion the child's changes are… → …
  • Tasks that involve Git worktrees
  • Calls git
  • Tasks that involve Subagents

What it does

Worktree Parallel is an agent skill from D-Robotics/moss. How to run writable sub-agents in isolated git worktrees and merge their lease patches

Its SKILL.md is about 310 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees and Subagents. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees
  • Tasks that involve Subagents

Example prompts

  • “/worktree-parallel”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. In fan_out_subagents, give each implementation task scope: "full", declared writePaths, and worktree: true (or set…
  2. Each child then works in its own git worktree under .moss/worktrees/ — concurrent writers cannot see or stomp each other.
  3. On completion the child's changes are collected as a binary patch under .moss/patches/.patch; its summary ends with [worktree lease=…
  4. Merge leases back with merge_subagent_patch (leaseId + patchId from the child result). Merging uses git apply --3way, so changes in…
  5. Merge order matters when tasks touch the same files: merge one, verify, then the next.
  6. Worktrees are cleaned up automatically after patch collection; the patch files remain for audit.

What it can do on your machine

Read from SKILL.md and the folder at commit 58e7f61. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktree Parallel loads about 313 tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 141 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~313

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from D-Robotics/moss at commit 58e7f61, republished under its MIT licence (© D-Robotics). 141 words, ~313 tokens.

Download SKILL.mdSave it as .claude/skills/worktree-parallel/SKILL.md (or your agent's skills folder).
name
worktree-parallel
description
How to run writable sub-agents in isolated git worktrees and merge their lease patches
when
fanning out multiple implementation tasks that may touch the same files

Worktree-parallel writable sub-agents

  1. In fan_out_subagents, give each implementation task scope: "full", declared writePaths, and worktree: true (or set MOSS_WORKTREE_SUBAGENTS=1 once and full-scope tasks default to isolated worktrees).
  2. Each child then works in its own git worktree under .moss/worktrees/ — concurrent writers cannot see or stomp each other.
  3. On completion the child's changes are collected as a binary patch under .moss/patches/<leaseId>.patch; its summary ends with [worktree lease=<id> patch=<digest> changed=<n>].
  4. Merge leases back with merge_subagent_patch (leaseId + patchId from the child result). Merging uses git apply --3way, so changes in different regions of a file compose; a same-region collision returns merge_conflict with the conflicting paths — resolve manually, do not force.
  5. Merge order matters when tasks touch the same files: merge one, verify, then the next.
  6. Worktrees are cleaned up automatically after patch collection; the patch files remain for audit.

© D-Robotics, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .moss/skills/worktree-parallel of D-Robotics/moss.

Open the folder on GitHubat commit 58e7f61

Compare with similar skills

Worktree Parallel next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktree Parallel compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree Parallel this skillD-Robotics/moss143—~313Automated safety check: PassMIT
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Work With PR Lifecyclecode-yeongyu/oh-my-openagent70k—~4.6kAutomated safety check: PassCustom licence
Autopilot Batchjoshukraine/dotfiles429—~6.8kAutomated safety check: PassMIT
Blitzaiskillstore/marketplace430—~2.8kAutomated safety check: PassNone
Inference Format Optimizera2ui-project/a2ui17k—~985Automated safety check: PassApache-2.0

Similar skills

  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Work With PR Lifecycle

    code-yeongyu/oh-my-openagent

    Takes a task through to a merged pull request in an isolated git worktree, splitting it into small independent PRs and looping on CI and review gates until they pass.

    70k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Autopilot Batch

    joshukraine/dotfiles

    Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and…

    429 GitHub stars~6.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Blitz

    aiskillstore/marketplace

    This skill should be used when parallelizing multi-issue sprints using git worktrees and parallel Claude agents.

    430 GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Iterative benchmarking, evaluation, and algorithmic optimization of alternative A2UI inference formats (such as Express, Atom, and Elemental).

    17k GitHub stars~985 tokensUpdated today
    DevelopmentAuto-check passed
  • Bench Baton

    nooga/let-go

    Coordinate heavy local workloads across worktrees, processes, and subagents — benchmarks and timing-sensitive gates run exclusively on a quiesced machine, while builds, test suites, regeneration…

    568 GitHub stars~821 tokensUpdated today
    DevelopmentAuto-check passed

More from D-Robotics/moss

  • Bench Repro

    D-Robotics/moss

    How to reproduce and grade a bench task or A/B arm for moss capability work

    143 GitHub stars~288 tokensUpdated 5 days ago
    Auto-check passed
  • Patch Discipline

    D-Robotics/moss

    How to make code changes in the moss repo — read-before-edit, minimal diffs, verify with real runs

    143 GitHub stars~264 tokensUpdated 5 days ago
    Auto-check passed

Questions about Worktree Parallel

What does Worktree Parallel do?

How to run writable sub-agents in isolated git worktrees and merge their lease patches. Worktree Parallel is an agent skill from D-Robotics/moss.

When should I use Worktree Parallel?

Worktree Parallel fits situations like: tasks that involve Git worktrees; tasks that involve Subagents.

How do I install Worktree Parallel in Claude Code?

Run `npx skills add D-Robotics/moss --skill worktree-parallel -a claude-code`. Or copy the skill folder (.moss/skills/worktree-parallel in D-Robotics/moss) into .claude/skills/worktree-parallel in your project. Claude Code loads it when a task matches its description.

How do I install Worktree Parallel in Codex?

Run `npx skills add D-Robotics/moss --skill worktree-parallel -a codex`. Or copy the skill folder (.moss/skills/worktree-parallel in D-Robotics/moss) into .agents/skills/worktree-parallel in your project. Codex loads it when a task matches its description.

Can I use Worktree Parallel in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add D-Robotics/moss --skill worktree-parallel -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-parallel, .gemini/skills/worktree-parallel, .github/skills/worktree-parallel and .opencode/skills/worktree-parallel in your project.

What does Worktree Parallel need to run?

Going by SKILL.md and its folder, Worktree Parallel needs the command-line tools its instructions call (git).

Does Worktree Parallel access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Worktree Parallel safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Worktree Parallel use?

Worktree Parallel is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree Parallel use?

About 313 tokens (SKILL.md is roughly 1.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktree Parallel?

Skills that share tags, products or a category with Worktree Parallel: Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars), Work With PR Lifecycle (code-yeongyu/oh-my-openagent, 70k stars), Autopilot Batch (joshukraine/dotfiles, 429 stars) and Blitz (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree Parallel?

D-Robotics (a GitHub organization) maintains it in D-Robotics/moss, which has 143 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 2, 2026.

Source: D-Robotics/moss on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.