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 skills add agallardol/zcode-git-worktrees --skill worktreesgit clone --depth 1 https://github.com/agallardol/zcode-git-worktreesWrote 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/agallardol/zcode-git-worktrees/worktrees)<a href="https://agentmods.dev/skills/agallardol/zcode-git-worktrees/worktrees"><img src="https://agentmods.dev/badge/skills/agallardol/zcode-git-worktrees/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.
<a href="https://agentmods.dev/skills/agallardol/zcode-git-worktrees/worktrees"><img src="https://agentmods.dev/badge/skills/agallardol/zcode-git-worktrees/worktrees.svg" alt="Reviewed on agentmods" width="80" 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.00075 | $0.01096 |
| Opus 5.5 | $0.00030 | $0.00438 |
| Sonnet 5.5 | $0.00015 | $0.00219 |
| Haiku 4.5 | $0.00007 | $0.00110 |
Grade A, and why
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git worktrees for ZCode
Worktrees give every task its own directory + branch sharing one git object store — parallel agents or humans can work on the same repo without stashing, branch switching, or stepping on each other.
Always use the MCP tools (mcp__git-worktrees__*), never raw git worktree commands — the tools add validation, safety checks, snapshots, and state tracking that raw git lacks.
Tools
| Tool | Use |
|---|---|
worktrees_create {name?, baseRef?, task?, carryDirty?} |
Create worktree at <store>/<project>/<name>, branch zcode/<name>, base fresh (origin/HEAD) by default |
worktrees_list |
All worktrees: branch, dirty, locked, agent, size, activity |
worktrees_status {name} |
Detail: diff stat, unpushed, snapshots |
worktrees_remove {name, force?, deleteBranch?} |
Safe removal; snapshots uncommitted work first; branch kept by default |
worktrees_cleanup {dryRun?, maxAgeDays?, maxCount?} |
Retention sweep (dry-run by default) |
worktrees_prune |
Sync git + state after manual deletion |
worktrees_snapshot {name} |
Snapshot uncommitted work on demand |
worktrees_set_task {name, task?, agentId?, clearAgent?} |
Link a running agent to its worktree (locks it) |
worktrees_auto_session {enabled?} |
Get/toggle auto-session mode (each new session in a main checkout gets its own worktree) |
Slash commands /worktree, /worktree:new, /worktree:list, /worktree:status, /worktree:remove, /worktree:cleanup, /worktree:pr, /worktree:end, /worktree:auto drive the same tools with the full UX.
Auto-session mode (on by default)
Every NEW session started in a repo's main checkout is assigned its own worktree (branch zcode/sess-<id>, based on current HEAD). Resuming a session returns to its worktree; edits to the main checkout are blocked (PreToolUse guard) and redirected to the session worktree; /worktree:end commits everything and removes the worktree. Since sessions there run with cwd still in the main checkout, agents must use absolute paths into the worktree and git -C — the injected SessionStart context explains this. Escape hatches: Settings → Plugins → Git Worktrees or /worktree:auto off (machine-wide, most recent change wins), or per-repo .zcode/worktree.json {"autoSession": false}.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 50 lines · 0 tokens per session scan A bf9d4327c49a
worktrees is a skill published in the GitHub repository agallardol/zcode-git-worktrees (4 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,096 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
worktree-agent
Mandatory rules for agents in git worktree isolation.
openspec-bulk-apply-change
Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.
openspec-git-discipline
Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.
git-worktree
Manage isolated Git worktrees under one repository convention root. Create a new-branch worktree, list trees, remove an owned tree, or show prune candidates after authorization. Before any git worktree add, ensure the repo .gitignore excludes the convention root, appending the planned line when it is missing. Use for…
using-git-worktrees
Isolates each task in its own git worktree off main.
spawnpoint
This skill should be used when an agent needs to create, list, extend, or remove multi-repo git worktree workspaces using the spawnpoint CLI (binary spawnpoint, shell wrapper sp). Use it when a task involves spinning up isolated worktrees for a feature branch across one or more repos, finding existing workspaces…