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 ulises-jeremias/agent-toolkit --skill worktreegit clone --depth 1 https://github.com/ulises-jeremias/agent-toolkitWrote 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/ulises-jeremias/agent-toolkit/worktree)<a href="https://agentmods.dev/skills/ulises-jeremias/agent-toolkit/worktree"><img src="https://agentmods.dev/badge/skills/ulises-jeremias/agent-toolkit/worktree/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/ulises-jeremias/agent-toolkit/worktree"><img src="https://agentmods.dev/badge/skills/ulises-jeremias/agent-toolkit/worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00025 | $0.01178 |
| Opus 5 | $0.00013 | $0.00589 |
| Sonnet 5 | $0.00005 | $0.00236 |
| Haiku 4.5 | $0.00003 | $0.00118 |
Grade A, and why
worktree 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 5d 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree
Create and maintain worktree-per-writer isolation for agent-toolkit swarm so each role works on its own branch without stepping on others. Integrates with swarm-handoff promotion and github-cli-workflow for PRs.
When to use
- Swarm needs isolated writes: implementer, reviewer, integrator each own a worktree/branch.
worktree_failedtrace orfind_repo_rooterror on.gitfile worktrees.- Before
swarm promote— ensure the handoff's worktree is clean and pushable. - Cleanup after a run is promoted or abandoned.
Prerequisites
- Repo is Git with
git worktreeavailable (git worktree --help). - Swarm run exists:
.agent-toolkit/swarm/runs/<run-id>/state.json; worktrees live under.agent-toolkit/swarm/runs/<run-id>/worktrees/<role>-<short>/. find_repo_rootusesgit rev-parse --git-common-dirto handle worktree.gitfiles (not directories).
Workflow
1. Inspect current worktrees
git worktree list
agent-toolkit swarm status --run-id <run-id> --json | jq '.worktrees'
# Expected: {implementer: {path, branch, commit}, reviewer: {path, branch}, ...}
cat .agent-toolkit/swarm/runs/<run-id>/state.json | jq '.trace | map(select(.event | contains("worktree")))'
2. How swarm creates them (automatic)
On handoff create --from X --to Y for a writer role Y, swarm:
- Resolves repo root via
find_repo_root(git rev-parse --git-common-dirfallback). - Creates branch
swarm/<run-id>/<role>if missing. - Runs
git worktree add <run-dir>/worktrees/<role>-<short> <branch>. - Exports
AGENT_TOOLKIT_SWARM_RUN_ID/RUN_DIR/REPO SWARMFORGE_ROLEandcd <worktree> && exec <runner> "$(cat prompt)"via_user_shell()(/usr/bin/zsh -lcon this host).
Do not create worktrees by hand for swarm roles — let handoff create do it so state.json stays authoritative.
3. Manual recovery
If worktree_failed:
git rev-parse --git-common-dir # from worktree dir — should succeed
AGENT_TOOLKIT_SWARM_RUN_ID=<run-id> agent-toolkit swarm handoff create --type artifact --from implementer --to reviewer --artifact artifacts/retry.md --run-id <run-id>
# Re-triggers provisioning with fixed repo-root logic
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.
- 5d ago First seen · 114 lines · 25 tokens per session scan A 7303ece6d351
worktree is a skill published in the GitHub repository ulises-jeremias/agent-toolkit (16 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,178 once invoked, about $0.0001 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-04.
Other skills, from other repositories
github-navigator
GitHub operations via gh CLI. CRITICAL: Use instead of WebFetch for any github.com URL or GitHub repo path like owner/repo. Use when the user asks to inspect repositories, files, issues, pull requests, releases, Actions runs, or repository structure. Use when the user says 'show README', 'list issues', 'check PR'…
active-review
Use when the user wants to prepare for a manual PR code review and asks for help targeting it — a terse PR summary, ranked files to read first, and paste-ready inline comment drafts with GitHub deep-links. Triggers: "active review this PR", "walk me through this PR", "help me review this", "give me inline comments to…
bisect
Use when hunting a regression, phrases like "bisect", "find the commit that broke X", "this used to work", "regression in test Y", "when did start". Also use when escalated from ci-debug-loop because log analysis can't pinpoint the offending change, or when a previously-passing test/build/behavior is now failing and…
analyze-knowledge
Use when the user asks who knows specific code, who should review a PR or files, what the lottery factor is, whether knowledge is concentrated or spread, who to talk to about a code area, or when suggesting reviewers beyond GitHub's built-in suggestions.
fix-pr-conflict
Resolve merge conflicts on a pull request by rebasing onto the base branch. Use when a PR is not mergeable, has merge conflicts, or the user asks to fix conflicts on a PR.
ship-it
End-to-end shipping workflow. Formats, lints, tests, creates a changelog entry, commits with conventional commits, pushes, updates PR description, and suggests reviewers. Use when the user says "ship it", "commit and push", "fmt lint test commit push", or similar shipping commands.