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/tony/skills/worktreenpx skills add tony/skills --skill worktreegit clone --depth 1 https://github.com/tony/skillsWrote 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/tony/skills/worktree)<a href="https://agentmods.dev/skills/tony/skills/worktree"><img src="https://agentmods.dev/badge/skills/tony/skills/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.00024 | $0.03140 |
| Opus 5 | $0.00012 | $0.01570 |
| Sonnet 5 | $0.00005 | $0.00628 |
| Haiku 4.5 | $0.00002 | $0.00314 |
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.
This is a copy
97% identical to action-worktree — 41 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/action:worktree
Take one or more tickets to a working branch in its own git worktree. Resolve the ticket(s) read-only, name the branch the way the team actually names branches, create the worktree beside the repo (or in a temp root), implement, and land gated commits — pushing or opening a PR only when asked.
One worktree, one branch, one deliverable — carrying one ticket by default, and several when they genuinely share a change. Crosscutting is first-class, not an error.
This skill is invoked by name, never routed to on the model’s initiative: it creates
worktrees and branches, modifies files, and creates commits, so it
must be user-explicit, not router-inferred. To land review findings
on the current branch, use /respond:action; this command starts
ticket work on a new branch.
/action:worktrees delegates to this file's phases by name and
number. When renaming, renumbering, or reordering phases here, update
that file's references in the same change; on any disagreement
between the two files, this one wins.
Core thesis
A ticket describes an outcome; a branch is the unit of delivery. This command is the plumbing between the two, done the way the tracker and the team already expect: the branch name carries the ticket ID so linking happens server-side, the worktree keeps the main checkout untouched, and the gates keep every commit green.
Three disciplines:
- Tickets are read-only. Resolution pulls title, description, acceptance criteria, and the branch-name field — and writes nothing back (see The Iron Rule).
- Names follow the precedence ladder. Explicit ask > project
conventions > ticket-system default > observed repo norms > slug
fallback — per
../../references/ticket-detection.md. - The main checkout is never disturbed. All work happens in the worktree; the default exit is a gated commit, not a push.
The Iron Rule
TICKETS ARE READ-ONLY
Neither resolution nor any later phase writes to a ticket — no
assign, no comment, no state transition, no label, no estimate, no
gh issue develop; every tracker operation is a read. Linking rides
on names, server-side, so an abandoned branch unwinds with nothing to
undo. The full forbidden-operations list and rationale:
../../references/ticket-detection.md § The
read-only invariant.
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 · 276 lines · 24 tokens per session scan A e36b6aab60e1
worktree is a skill published in the GitHub repository tony/skills (2 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 3,140 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to action-worktree, differing in 41 lines, and is treated as a copy.
Other skills, from other repositories
postgres-database-migration
Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…
design-postgis-tables
Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications.
migrate-postgres-tables-to-hypertables
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. Trigger when user asks to: Migrate or convert PostgreSQL tables to hypertables Execute hypertable migration with minimal downtime Plan blue-green migration for large tables Validate…
pgvector-semantic-search
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…
setup-timescaledb-hypertables
Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…
postgres-hybrid-text-search
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…