using-worktrees

A workflow for giving each coding task its own Git checkout, called a worktree. Separate checkouts let multiple tasks or agents edit files without overwriting one another.

In plain words
What is it for?
Use it for parallel tasks, long-running feature tracks, and reviews across branches; solo work and hotfixes can stay in the current checkout.
Why use it?
It prevents concurrent work from clashing and keeps changes from unrelated tasks isolated.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/acendas/shipyard/using-worktrees
Any agent
npx skills add Acendas/shipyard --skill using-worktrees
Clone the repo
git clone --depth 1 https://github.com/Acendas/shipyard

Made for: Claude Code, Codex.

Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,056 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00012 $0.03056
Opus 5 $0.00006 $0.01528
Sonnet 5 $0.00002 $0.00611
Haiku 4.5 $0.00001 $0.00306

Measured yesterday against content hash 0a04830e5b1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

using-worktrees scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

If a user manually `rm -rf`'d a worktree directory, git's internal `.git/worktrees/<name>/` lingers. Defend with:
plugins/shipyard/skills/using-worktrees/SKILL.md · 166 lines

How it starts

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

Using Worktrees

Shipyard isolates parallel task execution in git worktrees so concurrent subagents don't clobber each other's edits. Trust the platform — pass isolation: worktree on the Agent call and let Claude Code handle creation, cwd, and cleanup.

Render before asking. Before any AskUserQuestion, render the decision context as assistant chat text. Content that exists only in a Read result, a subagent/Agent return, or the question/option strings does not count as rendered (the UI shows a compact card) — restate it in chat first.

When to Use Worktrees

Mode Use worktrees?
Solo (1–3 tasks per wave, sequential) No — tasks run on the working branch, one after another
Task / parallel (4+ tasks per wave, concurrent) Yes — one worktree per task
Track mode (persistent feature tracks) Yes — one worktree per feature track
--isolation false / execution.isolation: none No — forced sequential in-place on the working branch (see below)
/ship-review diff inspection Optional — read-only; worktree only if reviewing across branches
Hotfix No — work on the user's current branch directly
/ship-quick No — single change, working branch

The rule of thumb: isolate when concurrency would otherwise race. Sequential work doesn't need worktrees.

Choosing No Isolation (--isolation false)

A project with a heavy build (large native toolchain, slow dependency install, big test image) can pay more to reconstruct a cold worktree than it saves from parallelism. For those, /ship-execute --isolation false — or the persistent execution.isolation: none in config.md (shipyard-data config set-isolation none) — runs the sprint sequentially in-place on the working branch, keeping the warm canonical checkout.

No-isolation is sequential-only, by construction. It is NOT "parallel without worktrees." Two parallel builders on one shared checkout would clobber each other's edits, and there would be no per-task shipyard/wt-* branch for the wave-integration gate (verify-wave-integrated) to rebase and merge — the whole branch-based integration model assumes one worktree branch per concurrent task. So when isolation is off, dispatch is the solo shape regardless of task count; --isolation false combined with --mode task|track coerces to sequential with a one-line note rather than racing.

Read the full file on GitHub · 166 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. yesterday First seen · 166 lines · 12 tokens per session scan C 0a04830e5b1d

Subscribe to this mod's changes

using-worktrees is a skill published in the GitHub repository Acendas/shipyard (2 stars, last pushed 20d ago), licensed MIT. It adds 12 tokens to every session and 3,056 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

om-gap-analysis

Grounded platform gap analysis at engagement scale — turn a folder of client docs into an Epic/Story tree where every coverage verdict is re-run by executable gates against a validated checkout of the platform, scored in atomic commits, license-tier-tagged, and synthesized into a client-facing summary + backlog. Use…

open-mercato/open-mercato · 134 tokens

asana-webhooks

Receive and verify Asana webhooks. Use when setting up Asana webhook handlers, implementing the X-Hook-Secret handshake, debugging X-Hook-Signature verification, or handling task, project, and story events like added, changed, removed, deleted, and undeleted.

hookdeck/webhook-skills · 61 tokens

engenharia-de-requisitos

Use when doing requirements engineering, business analysis, or the software-engineering stage of discovering / specifying / validating / managing requirements — the stage BEFORE code (what to build) and AFTER (was the right thing built?), for new projects and for evolutions of existing ones. Triggers (EN)…

seekdevcore/sk-requirements-engineering-theskill · 0 tokens

engenharia-de-requisitos

Use when doing requirements engineering, business analysis, or the software-engineering stage of discovering / specifying / validating / managing requirements — the stage BEFORE code (what to build) and AFTER (was the right thing built?), for new projects and for evolutions of existing ones. Triggers (EN)…

seekdevcore/sk-requirements-engineering-theskill · 0 tokens

write-epic

Produces a complete epic definition following Atlassian agile guidance. An epic captures a large initiative that is too big for a single sprint and must be decomposed into user stories.

MarieLynneBlock/arcanum-artifex · 40 tokens

write-user-story

Produces a complete, ready-to-groom user story following the standard Atlassian/agile format. It applies the INVEST criteria and the 3 Cs framework (Card, Conversation, Confirmation) to ensure each story is well-scoped, valuable, and testable — not just syntactically correct.

MarieLynneBlock/arcanum-artifex · 64 tokens