forge-worktrees

forge-worktrees is a skill for Claude Code from ForgeyClap/claude-forge. It costs 42 tokens per session (873 once invoked), scanned A, original, MIT.

A guide for using Git worktrees, which are separate working folders linked to branches, when multiple agents need to change one repository.

In plain words
What is it for?
It helps isolate parallel coding tasks, choose which work can run at the same time, and merge completed work safely.
Why use it?
It prevents agents from overwriting each other’s files and keeps independent changes easier to merge.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Codex.

Good fit It helps isolate parallel coding tasks, choose which work can run at the same time, and merge completed work safely.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/forgeyclap/claude-forge/forge-worktrees
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ForgeyClap/claude-forge --skill forge-worktrees
Clone the repo
git clone --depth 1 https://github.com/ForgeyClap/claude-forge

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for forge-worktrees

README.md
[![agentmods](https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-worktrees/github.svg)](https://agentmods.dev/skills/forgeyclap/claude-forge/forge-worktrees)
Your own site
<a href="https://agentmods.dev/skills/forgeyclap/claude-forge/forge-worktrees"><img src="https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-worktrees/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for forge-worktrees

Your own site · 80×15
<a href="https://agentmods.dev/skills/forgeyclap/claude-forge/forge-worktrees"><img src="https://agentmods.dev/badge/skills/forgeyclap/claude-forge/forge-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 873 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00873
Opus 5.5 $0.00017 $0.00349
Sonnet 5.5 $0.00008 $0.00175
Haiku 4.5 $0.00004 $0.00087

Measured 2mo ago against content hash e42d1e241f0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

forge-worktrees scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/forge-worktrees/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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-worktrees Step 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/release protocol around its dispatch (see forge-router Step 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:rescue or any --write task) — per CODEX_GLOBAL_POLICY.md (an owner-level policy in ~/.claude when 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.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed e42d1e241f0d
  2. 2mo ago First seen · 57 lines · 42 tokens per session scan A b27d8ad9e644

Subscribe to this mod's changes

forge-worktrees is a skill published in the GitHub repository ForgeyClap/claude-forge (2 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 873 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

forge-worktrees compared with skills from other repositories

forge-worktrees next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
forge-worktreesForgeyClap/claude-forgeSkill22mo agoMITA42Claude Code
flame-harness-submittjdrhs90/flutter-flame-harnessSkill6115d agoMITA38Claude Code
flame-harness-buildtjdrhs90/flutter-flame-harnessSkill6115d agoMITA38Claude Code
reviewhandarbeit/fabrikSkill252d agoApache-2.0A35Claude Code
implementhandarbeit/fabrikSkill252d agoApache-2.0A38Claude Code
review-commenthandarbeit/fabrikSkill252d agoApache-2.0A43Claude Code
validate-commenthandarbeit/fabrikSkill252d agoApache-2.0A46Claude Code