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.
git clone --depth 1 https://github.com/craigcossairt/trellisWrote 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/commands/craigcossairt/trellis/worktree)<a href="https://agentmods.dev/commands/craigcossairt/trellis/worktree"><img src="https://agentmods.dev/badge/commands/craigcossairt/trellis/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/commands/craigcossairt/trellis/worktree"><img src="https://agentmods.dev/badge/commands/craigcossairt/trellis/worktree.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.00044 | $0.01939 |
| Opus 5.5 | $0.00018 | $0.00776 |
| Sonnet 5.5 | $0.00009 | $0.00388 |
| Haiku 4.5 | $0.00004 | $0.00194 |
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 20d 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 — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Workflow
Run parallel agent sessions on independent tasks using git worktrees.
When to Use
- You have 2+ independent tasks that touch different files
- Tasks are on separate tracker issues
- You want to multiply throughput by running parallel sessions
When NOT to Use
- Tasks touch the same files (merge conflicts)
- One task depends on the output of another
- Quick single-file fixes (just do them sequentially)
Step 0: Claim the Branch
Worktrees stop two sessions sharing a checkout. They do nothing about two sessions sharing a branch, which is the collision you actually hit once more than one agent runs at a time - they all authenticate as the same git identity, so nothing tells them apart.
Checking is not claiming. The check only reads the remote: two sessions can both run it, both get exit 0, and both start. Acquire a lease as well.
# 1. is anyone already here? (from the repo root; this only reads the remote)
bin/claim-branch.sh feature/<task-name>
# 2. if that said free, create the worktree (see "Setup a Worktree" below)
git worktree add ../<repo>-worktree-<task-name> -b feature/<task-name>
# 3. RESERVE it, from INSIDE the new worktree - this is the step that holds the branch
cd ../<repo>-worktree-<task-name>
bin/claim-branch.sh --acquire feature/<task-name> --me <session-id> --harness claude-code
If step 3 exits 1, someone took the branch between your check and your acquire:
remove the worktree you just made and pick another name. Pass the branch the way
git switch takes it (feature/x, not refs/heads/feature/x or
origin/feature/x; those exit 2). --me and --harness take only
[A-Za-z0-9._:-], and may not contain RELEASE or CLAIM as a whole word.
Exit 0 free, 1 claimed by someone else (pick another branch or coordinate), 2 could not tell. Exit 2 never means free. And a clean fast-forward is not permission - that is exactly what a collision looks like from the inside, so "it merged fine" is not evidence that nobody else was there.
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.
- 20d ago Changed · +64 lines ff6a0fa6ff30
- 1mo ago Changed · +26 lines 97fdf755bce2
- 1mo ago First seen · 70 lines · 44 tokens per session scan A 3d2cc368d1e3
worktree is a command published in the GitHub repository craigcossairt/trellis (5 stars, last pushed 13d ago), licensed MIT. It adds 44 tokens to every session and 1,939 once invoked, about $0.0002 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 commands, from other repositories
adr-review
Run the workflow in docs/playbooks/adr-review.md. You review only — never write or rewrite the ADR for me. Check problem framing, option fairness, trade-offs and consequences, reversibility, the revisit trigger, and weak reasoning. Give pointed questions and concrete suggestions; I write the words. If it supersedes an…
milestone
Produce the next build doc. Run the workflow in docs/playbooks/milestone.md: read the active mode and current phase from PROJECT.md, find the next milestone in docs/progress.md, and write docs/milestones/ . - .md in the six-part format (Concept · ADR · Guided build · Challenges · Verify · Stretch). Respect the mode …
mode
Run the workflow in docs/playbooks/mode.md: read the current mode from PROJECT.md, confirm the trade-off of the target mode in one line, update the Mode field and Current mode: line in PROJECT.md, and confirm the new rules. Modes: guided (I write all code), collab (split), autopilot (you write it and teach). Full…
progress
Run the workflow in docs/playbooks/progress.md: read PROJECT.md, docs/progress.md, and the actual repo (trust the repo over the doc). Locate me, name concrete progress, append a dated session-log entry, propose the single next action, and check docs/learning-debt.md for anything worth pulling in. If I seem stuck…
start
Turn this freshly cloned template into my project. Run the workflow in docs/playbooks/start.md: welcome me, run a short conversational interview (idea, background, goals, mode, stack, pace), then write PROJECT.md, the design skeleton, and the roadmap in docs/progress.md, and offer to write my first milestone. Keep it…
secrets
Provides tools for managing environment variables and secrets for your Supabase project.