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.
npx agentmods add skills/christopherlouet/claude-base/git-worktreesnpx skills add christopherlouet/claude-base --skill git-worktreesgit clone --depth 1 https://github.com/christopherlouet/claude-baseWrote 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.
[](https://agentmods.dev/skills/christopherlouet/claude-base/git-worktrees)<a href="https://agentmods.dev/skills/christopherlouet/claude-base/git-worktrees"><img src="https://agentmods.dev/badge/skills/christopherlouet/claude-base/git-worktrees.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.00542 |
| Opus 5 | $0.00016 | $0.00271 |
| Sonnet 5 | $0.00007 | $0.00108 |
| Haiku 4.5 | $0.00003 | $0.00054 |
Grade A, and why
git-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 2d 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.
What it actually says
Git Worktrees (pointer)
"The single biggest productivity unlock." — Boris Cherny, creator of Claude Code
Generic worktree mechanics (git worktree add/list/remove/prune, branch isolation, hooks sharing) are canonical at git-scm.com/docs/git-worktree. This skill scopes to Claude-Code-specific worktree integration — what isn't in the git docs.
Claude Code worktree settings (CLI 2.1.76+ / 2.1.141+)
Three settings in .claude/settings.json shape how Claude Code uses worktrees:
| Setting | Values | Purpose |
|---|---|---|
worktree.sparsePaths |
array of globs | Limit which files a worktree includes — speeds up monorepo operations and narrows Claude's exploration context |
worktree.bgIsolation |
"auto" (default) / "none" |
Background sessions/agents default to writing into .claude/worktrees/; "none" lets them edit the working copy directly |
worktree.baseRef |
"fresh" / "head" |
"fresh" branches new worktrees from origin/<default>, "head" from local HEAD (inherits in-progress local commits) |
Both bgIsolation and baseRef apply to --worktree, the EnterWorktree tool, and agent-isolation worktrees.
Named-session pairing pattern
The foundation-specific workflow is 1 worktree = 1 branch = 1 named Claude session:
git worktree add ../myapp-feature-auth -b feature/auth
cd ../myapp-feature-auth && claude -n "auth"
The --name/-n flag tags the session for logs and terminal identification. Combined with worktrees this lets you run 5+ Claude Code sessions in parallel without state collision — see the "Parallel Sessions" section in CLAUDE.md.
See also
/work:work-explore— dedicate an analysis worktree to read-only explorationsession-handoffskill — transfer context across worktreesparallel-agents/agent-teamsskills — orchestration on top of multi-worktree setups
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.
- 2d ago First seen · 47 lines · 33 tokens per session scan A b427b014845c
git-worktrees is a skill published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 542 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
churn-prevention
../../../marketing-skill/skills/churn-prevention/SKILL.md.
content-production
../../../marketing-skill/skills/content-production/SKILL.md.
board-meeting
../../../c-level-advisor/skills/board-meeting/SKILL.md.
boardroom
../../../c-level-agents/skills/boardroom/SKILL.md.
cpo-review
../../../c-level-agents/skills/cpo-review/SKILL.md.
moai-kanban-foreman
One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…