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/agallardol/zcode-git-worktrees/worktreesnpx skills add agallardol/zcode-git-worktrees --skill worktreesgit clone --depth 1 https://github.com/agallardol/zcode-git-worktreesWhat 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 | $0.00075 | $0.01096 |
| Opus 5 | $0.00037 | $0.00548 |
| Sonnet 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 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.
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.
- yesterday First seen · 50 lines · 0 tokens per session scan A bf9d4327c49a
worktrees is a skill published in the GitHub repository agallardol/zcode-git-worktrees (1 stars, last pushed 11d ago), licensed MIT. It adds 75 tokens to every session and 1,096 once invoked, about $0.0004 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-08-31.
Other skills, from other repositories
reversi-master
One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code (Moonshot) ,Qwen Code,Aider,OpenCode,MiMo Code (Xiaomi),ZCode (Z.AI),OpenClaw,Pi,OpenScience,Vibe-Trading,Claude Desktop (3P profile),ChatGPT desktop,OpenCode Desktop.
Trash Talk
AI becomes provocative and mocks the opponent during gameplay.
acceptance-test-authoring
Use when creating or modifying acceptance tests, configuring cucumber-js or behave runners, writing or refactoring step definitions, linting executable Gherkin specs, choosing an acceptance stack, or implementing OpenSpec tasks that involve acceptance tests.
gherkin-authoring
Use when drafting, reviewing, or improving Gherkin, Cucumber scenarios, BDD acceptance criteria, feature examples, Scenario Outlines, Backgrounds, Rules, Doc Strings, Data Tables, tags, or Gherkin embedded in Markdown.
openspec-bulk-apply-change
Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.
architectural-decision-records
Use when documenting, drafting, reviewing, or updating architectural decisions, ADRs, decision logs, tradeoffs, rationale, consequences, alternatives, or architecture decision history.