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 OutlineDriven/odin-claude-plugin --skill isolate-work-in-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/isolate-work-in-worktree)<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/isolate-work-in-worktree"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/isolate-work-in-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.1 | $0.00059 | $0.01622 |
| Opus 5 | $0.00030 | $0.00811 |
| Sonnet 5 | $0.00012 | $0.00324 |
| Haiku 4.5 | $0.00006 | $0.00162 |
Grade C, and why
isolate-work-in-worktree scanned grade C with 1 finding 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
6. Reconcile manifest and disk. List git worktrees with `git worktree list --porcelain` and compare paths under `.loop-worktrees/` against the manifest. Worktrees registered with git but missing from the manifest are orp How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Isolate work in worktree
Contract
| Field | Bound contract |
|---|---|
| Trigger | A run needs its own branch and checkout so concurrent work cannot collide. |
| Authority | vcs-reversible-destructive. Destructive operations touch only VCS-recoverable state — git branches and git-registered worktrees. Show the exact branch-and-path set before any removal and treat git as the recovery path. Never pass --force to git worktree remove. The manifest, mutex, and worktree files under the gitignored .loop-worktrees/ are local bookkeeping, not deliverables. |
| Side effect | Creates branch loop/<runId> plus worktree .loop-worktrees/<runId>, transitions its manifest status (active, rejected, escalated, merged, stale) via atomic manifest writes, and removes only terminal-status worktrees without --force; git refusals are surfaced instead of forced. |
| Done | Every worktree is registered in the manifest with a legal status, cleanup never sweeps an active worktree, and no removal used --force. |
Inputs
runId(required): unique identifier for the run, used verbatim as a path segment and branch suffix; it must be a single path segment (no/, not.or..).pattern(required at create): short label of the work pattern, kept on the manifest entry for audit.- Base branch (optional, default
main) and repo root (optional, default cwd; must be inside a git repository). - Status for mark (required): exactly one of
active,rejected,escalated,merged,stale. - Cleanup set (optional): status CSV, default
rejected,escalated, plus an age cutoff in the form<n>+s|m|h|d(for example24h).
Procedure
- Bind the root. Run
git rev-parse --is-inside-work-tree; on failure stop without mutating. All state lives under.loop-worktrees/: the manifest at.loop-worktrees/manifest.jsonshaped exactly{"version":1,"worktrees":[]}, and the mutex at.loop-worktrees/.manifest.mutex. If the manifest exists in any other shape, stop — never rewrite a manifest that was not validated. Add.loop-worktrees/to.gitignoreso worktree contents never enter the index. - Serialize manifest mutations with the mutex. Before each read-modify-write, create
.loop-worktrees/.manifest.mutexwith exclusive create; if it exists and its mtime is older than 30 seconds, remove it and retry; otherwise retry after a short backoff until a 30-second deadline, then fail naming the mutex path. Delete the mutex when the mutation ends, success or failure. Pure reads take no mutex. - Create. Refuse a
runIdthat is not a single path segment. Under the mutex, read the manifest: if an entry with the same id has statusactive, refuse and name its existing path. Otherwise rungit worktree add -b loop/<runId> .loop-worktrees/<runId> <base>, which creates the branch and checks it out in one step. Replace any prior entry with the same id and append{"id":<runId>,"path":".loop-worktrees/<runId>","branch":"loop/<runId>","baseBranch":<base>,"pattern":<pattern>,"createdAt":<ISO-8601 UTC>,"status":"active"}. Write the manifest atomically: write a temp file in the same directory, then rename it overmanifest.json. - Mark outcomes; never delete entries to record them. Under the mutex: reject any status outside the five-value set; find the entry by id or fail naming the id; set its status; write the manifest atomically as in step 3. Marking preserves the audit trail; removal happens only in cleanup.
- Clean up terminal worktrees. Under the mutex: select entries whose status is in the requested set — default
rejectedandescalated;activeis never selected, so mark a finished run terminal first — and, when a cutoff is given, whosecreatedAtis older than now minus the cutoff. For each selected entry rungit worktree remove .loop-worktrees/<id>without--force; a git refusal, typically uncommitted or untracked files, is recorded as skipped with its reason and the entry stays in the manifest. Rewrite the manifest without the removed ids, atomically. - Reconcile manifest and disk. List git worktrees with
git worktree list --porcelainand compare paths under.loop-worktrees/against the manifest. Worktrees registered with git but missing from the manifest are orphans: report them, and remove one only on explicit instruction, still without--force. Drop manifest entries whose directory no longer exists with an atomic manifest write. Treat a missing path as absent, not an error, sincerm -rf, a crash mid-cleanup, or a container wipe can leave git listing a prunable entry.
What ships with it
1 file 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.
- 4d ago First seen · 53 lines · 59 tokens per session scan C 98118564e1dc
isolate-work-in-worktree is a skill published in the GitHub repository OutlineDriven/odin-claude-plugin (35 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,622 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…