using-worktrees

using-worktrees is a skill for Claude Code from Acendas/shipyard. It costs 12 tokens per session (2,885 once invoked), scanned C, original, MIT.

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 Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Part of the shipyard plugin — 31 skills, 7 agents, 7 hooks shipped together

Good fit Use it for parallel tasks, long-running feature tracks, and reviews across branches; solo work and hotfixes can stay in the current checkout.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/acendas/shipyard/using-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 Acendas/shipyard --skill using-worktrees
Clone the repo
git clone --depth 1 https://github.com/Acendas/shipyard

Made for: Claude Code.

Or install shipyard, the plugin that ships this one along with the rest of its 31 skills, 7 agents, 7 hooks.

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 using-worktrees

README.md
[![agentmods](https://agentmods.dev/badge/skills/acendas/shipyard/using-worktrees/github.svg)](https://agentmods.dev/skills/acendas/shipyard/using-worktrees)
Your own site
<a href="https://agentmods.dev/skills/acendas/shipyard/using-worktrees"><img src="https://agentmods.dev/badge/skills/acendas/shipyard/using-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 using-worktrees

Your own site · 80×15
<a href="https://agentmods.dev/skills/acendas/shipyard/using-worktrees"><img src="https://agentmods.dev/badge/skills/acendas/shipyard/using-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,885 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00012 $0.02885
Opus 5.5 $0.00005 $0.01154
Sonnet 5.5 $0.00002 $0.00577
Haiku 4.5 $0.00001 $0.00288

Measured 15d ago against content hash c015429a0237, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d 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.

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 · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 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. Render the decision context as chat text before any AskUserQuestion (rules printed at startup under SHIPYARD_STARTUP_RULES).

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-execute --task (land-now) / --hotfix 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 · 159 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. 15d ago Changed · -7 lines c015429a0237
  2. 3mo ago 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 (3 stars, last pushed today), licensed MIT. It adds 12 tokens to every session and 2,885 once invoked, about $0.0000 per session on Opus 5.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

using-worktrees compared with skills from other repositories

using-worktrees next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
using-worktreesAcendas/shipyardSkill3todayMITC12Claude Code
memstack-security-git-guardcwinvestments/memstackSkill43318d agoMITA92Claude Code
memstack-development-changelog-generatorcwinvestments/memstackSkill43318d agoMITA63Claude Code
land-and-deployFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A41Claude Code
pr-triageFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A73Claude Code
git-worktree-cleanFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A19Claude Code
review-prFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A45Claude Code