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/outlinedriven/odin-claude-plugin/worktreenpx skills add OutlineDriven/odin-claude-plugin --skill worktreegit clone --depth 1 https://github.com/OutlineDriven/odin-claude-pluginWrote 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/outlinedriven/odin-claude-plugin/worktree)<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/worktree"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/worktree.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 | $0.00059 | $0.01043 |
| Opus 5 | $0.00030 | $0.00522 |
| Sonnet 5 | $0.00012 | $0.00209 |
| Haiku 4.5 | $0.00006 | $0.00104 |
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 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 — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree isolation
Contract
| Field | Bound contract |
|---|---|
| Trigger | A new isolated worktree or branch is requested, or an existing ref or PR needs isolation. |
| Authority | reversible-local: write only the worktree directory and a .worktrees/ gitignore entry; rollback by removing the worktree and reverting that entry. |
| Side effect | Local write: creates or attaches an isolated git worktree and reports its exact path and status. |
| Done | An isolated workspace exists that the harness can see and manage, with no phantom state. |
Inputs
- Ref to isolate (optional): a PR head, branch, or commit for isolate-existing-ref mode. Omit for new-work mode.
- New branch name (optional): derived from the work description when omitted.
- Base branch (optional): defaults to origin's default branch, else
main.
Procedure
- Determine the mode: if the caller named a ref (PR head, branch, or commit), this is isolate-existing-ref mode; otherwise new-work mode. Do not create a worktree for single-task work that can happen on a branch in the current checkout. Done when: the mode is decided and single-task work is ruled out.
- Detect existing isolation before creating anything. Compare the resolved absolute git dir against the resolved absolute common git dir: run
git rev-parse --absolute-git-dirand(cd "$(git rev-parse --git-common-dir)" && pwd -P). If they are equal, this is a normal checkout; continue to step 3. Done when: the isolation state is known (normal checkout, submodule, or already isolated). - If the two paths differ, run
git rev-parse --show-superproject-working-tree. Non-empty output means a submodule; treat it as a normal checkout and continue to step 4. Empty output means the run is already in an isolated worktree: report the worktree path (git rev-parse --show-toplevel) and current branch. In new-work mode, proceed in place and stop. In isolate-existing-ref mode, check the named ref out here unless it is already the current branch, then stop. Do not create another worktree. Done when: either already-isolated is handled and stopped, or the normal-checkout/submodule path continues to step 4. - Prefer the harness's native worktree primitive (for example Claude Code's
EnterWorktree, a/worktreecommand, or a--worktreeflag). Use it and stop. A behind-the-backgit worktree addcreates phantom state the harness cannot see, navigate to, or clean up. Done when: a native tool created the worktree, or no native tool exists and the git fallback is the next step. - If no native tool exists and step 2 or 3 found no existing isolation, fall back to manual git worktree creation following
references/git-fallback.md. Done when: the worktree exists under.worktrees/and the harness can see it via the tracked convention. - Report the worktree's absolute path and current branch, and confirm the harness can see it (native tool) or that it lives under the tracked
.worktrees/convention (git fallback). Done when: the path, branch, mode, and creation method are reported.
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 · 42 lines · 59 tokens per session scan A f5489f035196
worktree is a skill published in the GitHub repository OutlineDriven/odin-claude-plugin (35 stars, last pushed yesterday), licensed Apache-2.0. It adds 59 tokens to every session and 1,043 once invoked, about $0.0003 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
java-clean-arch
Reviews or implements Clean Architecture / Hexagonal Architecture (Ports & Adapters) and DDD tactical patterns for Java projects. Use when user asks to "apply clean architecture", "implement hexagonal architecture", "add ports and adapters", "apply DDD", "refactor to clean arch", "review architecture", or "add value…
java-adr
Creates, lists, and manages Architecture Decision Records for Java projects. Use when user asks to "create an ADR", "document this decision", "write an architecture decision", "add ADR", "list decisions", "show ADRs", or "record this architectural choice".
java-test
Generates JUnit 5 and Mockito unit tests or Testcontainers integration tests, auto-detecting project setup. Use when user asks to "write tests", "generate tests", "add unit tests", "create test class", "test this service", or "write integration tests".
java-jpa
Reviews Spring Data JPA for N+1 queries, fetch strategies, projections, and Specifications. Use when user asks to "review JPA", "check for N+1", "JPA performance", "review my entities", "check fetch strategy", or "review my repositories".
java-logging
Reviews Java logging for SLF4J best practices, MDC context, structured logging, and PII safety. Use when user asks to "review logging", "check my logs", "logging review", "is my logging correct", "MDC setup", or "check for PII in logs".
java-security
Reviews or implements Spring Security configuration — JWT authentication, OAuth2, method-level security, CORS, and CSRF. Use when user asks to "add authentication", "secure this API", "implement JWT", "configure Spring Security", "add OAuth2 login", "protect endpoints", or "review security config".