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 niki914/zafiro --skill add-worktreegit clone --depth 1 https://github.com/niki914/zafiroWrote 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/niki914/zafiro/add-worktree)<a href="https://agentmods.dev/skills/niki914/zafiro/add-worktree"><img src="https://agentmods.dev/badge/skills/niki914/zafiro/add-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/niki914/zafiro/add-worktree"><img src="https://agentmods.dev/badge/skills/niki914/zafiro/add-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.00076 | $0.00717 |
| Opus 5.5 | $0.00030 | $0.00287 |
| Sonnet 5.5 | $0.00015 | $0.00143 |
| Haiku 4.5 | $0.00008 | $0.00072 |
Grade A, and why
add-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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Worktree
Worktrees live in reusable slot directories in a sibling directory of the primary repo:
<parent of primary repo>/worktrees/zafiro/slot-${index}
Fixed slots (slot-1, slot-2, ...) allow Android Studio and Gradle to preserve and reuse build caches, project indexing, and window configurations across branches, while keeping Git branch names meaningful.
1 — Name the branch from the requirement
<type>/<kebab-case summary>, following the repo's branch convention (feat/agent-status, refactor/aidl-state-sync).
| Type | For |
|---|---|
feat |
new capability |
fix |
bug fix |
refactor |
behaviour-preserving restructure |
perf |
speed / memory |
chore |
build, deps, tooling |
test |
tests only |
docs |
docs only |
Rules: lowercase ASCII, hyphens only, summary describes the change (fix/latex-blank-render, not fix/niki-work); ≤ 40 characters total; no ticket numbers, no dates.
The summary comes from what the user asked for. If the user asked for a worktree without specifying the task, ask before naming.
2 — Run the allocation script
Run the bundled script in this skill:
# Locate script relative to primary repo or execute directly
SCRIPT_PATH="$(git rev-parse --show-toplevel)/.agents/skills/add-worktree/scripts/add-worktree.sh"
# Or resolve from common dir if already inside a worktree:
GIT_COMMON_DIR="$(git rev-parse --path-format=absolute --git-common-dir)"
PRIMARY_REPO="$(cd "$GIT_COMMON_DIR/.." && pwd -P)"
SCRIPT_PATH="$PRIMARY_REPO/.agents/skills/add-worktree/scripts/add-worktree.sh"
"$SCRIPT_PATH" <branch-name> [base-ref]
What the script handles automatically:
- Primary repo & path resolution: Dynamically locates the repo root via
--git-common-dirand calculates<repo parent>/worktrees/zafiro/without hardcoding absolute paths. - Branch validation & duplicate check: Verifies branch format and rejects collisions with existing local or remote branches.
- Lowest slot allocation: Scans from
slot-1upward:- Skips slots registered in
git worktree list. - If an unregistered directory exists on disk, logs a warning and skips to the next slot without modifying it.
- Allocates the lowest clean slot.
- Skips slots registered in
- Base ref: Defaults to
origin/main(after a non-fatal fetch), unless another base ref is passed.
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.
- yesterday Changed · +1 lines · +3 tokens per session 0245867a8776
- 19d ago Changed b443dfdb901b
- 25d ago First seen · 65 lines · 73 tokens per session scan A ae46c6b1da34
add-worktree is a skill published in the GitHub repository niki914/zafiro (288 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 717 once invoked, about $0.0003 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-09-28.
Other skills, from other repositories
baby-sit
Monitor a GitHub pull request until CI is green, diagnose failures, and rerun only evidence-backed flaky GitHub Actions jobs.
code-task
PREFERRED way to change code in a REAL repository: fix a GitHub issue, fix a bug, add/implement a function or feature, or make any edit to a project the user names by a filesystem path (e.g. /tmp/foo, /code/bar) or a git URL. Clones the repo, runs an OpenSquilla agent on the host to make the change on a task branch…
github
GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available)…
apply-patch
Apply multi-file or tricky edits atomically with git apply instead of many fragile editfile calls. Use when changing several files at once or when editfile fails to match.
git-checkpoint
Use git as a safety net - create a checkpoint commit before risky or large changes and roll back cleanly if a change makes things worse. Use before multi-file refactors.
meta-codereview-current-diff
Read the current uncommitted diff, run three independent reviewers (safety + tests-coverage + style) in parallel, then arbitrate a single BLOCK / BLOCKWITHOVERRIDE / PASSWITHNOTES verdict. Use before commit when you want a multi-perspective second-opinion instead of a single-reviewer agent loop.