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/bahayonghang/my-ai-cli-toolkit/git-worktreenpx skills add bahayonghang/my-ai-cli-toolkit --skill git-worktreegit clone --depth 1 https://github.com/bahayonghang/my-ai-cli-toolkitWhat 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.00135 | $0.01175 |
| Opus 5 | $0.00068 | $0.00588 |
| Sonnet 5 | $0.00027 | $0.00235 |
| Haiku 4.5 | $0.00014 | $0.00118 |
Grade A, and why
git-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 2d 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
In the commands below, <skill-dir> is this skill's base directory, announced when the skill loads. Substitute the literal path. On Windows, py -3 may replace python.
Use this workflow: inspect -> plan-create (ensures ignore) -> authorized execute -> record.
Routing
- Isolation worktree create / list / owned remove / authorized prune: this skill.
- Commit, split, checkpoint:
git-commit. - PR, review, merge, CI, Release, tag-build detached worktree:
gh-pr-release. - GitHub template bootstrap:
gh-bootstrap. - Adopt an existing foreign worktree, or add a worktree for an existing branch: refuse. MVP is
--mode new-branchonly.
If a native harness worktree tool exists, run the helper first. Call the native tool only when inspect/plan JSON already contains worktree_path and ok_to_create=true. Do not let the native tool pick an unchecked path.
1. Inspect
From the repository root:
python "<skill-dir>/scripts/worktree_convention.py" inspect --repo-root <abs-repo> [--explicit-root <rel>] [--branch <name>]
Read resolved_root, resolution_reason, registered_in_repo_roots, already_linked, gitignore_covers, and write_required.
If already_linked is true and the user asked to create: report the current tree and stop. Do not nest worktrees.
This repository may already have a registered root such as .claude/worktrees. Do not invent a second default root.
2. Ignore gate (before any add)
Matching authority is git check-ignore -v -z --stdin. The helper already runs that.
A create request authorizes appending one planned <resolved_root>/ line to the repository .gitignore. plan-create does that when write_required is true. Do not wait for a second confirmation. Do not git add or git commit the ignore line.
- After
plan-create,gitignore_coversmust be true before executingargv. - If
write_requiredis still true (ignore_gateinrefusals), stop. - Global excludes or
.git/info/excludealone are not enough.
What ships with it
13 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.
- agents/interface.yaml 527 B
- evals/evals.json 3.5 KB
- references/convention.md 2.3 KB
- references/safety.md 2.5 KB
- reports/creation-handoff.md 2.3 KB
- reports/prior-art-research.md 7.1 KB
- reports/secret-scan.md 458 B
- reports/skill-ir.json 2.5 KB
- reports/trigger-eval.json 5.2 KB
- reports/validate-skill.json 925 B
- scripts/worktree_convention.py 26 KB runs code
- security/permission_policy.json 3.7 KB
- tests/worktree-convention.test.mjs 12 KB runs code
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.
- 2d ago First seen · 92 lines · 135 tokens per session scan A bb853ea9f67b
git-worktree is a skill published in the GitHub repository bahayonghang/my-ai-cli-toolkit (16 stars, last pushed 3d ago), licensed MIT. It adds 135 tokens to every session and 1,175 once invoked, about $0.0007 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-08-30.
Other skills, from other repositories
using-git-worktrees
Isolates each task in its own git worktree off main.
repository-manager-lane-lifecycle
Run one unit of work — one agent session or one person — as an isolated lane in a repository many other lanes are editing at the same time. Covers opening a lane (worktree + partitioned build/test/hook state), staying isolated while working, diagnosing a lane that is behaving impossibly, and closing it out. Use…
trace-and-isolate
Applies systematic tracing and isolation techniques to pinpoint exactly where a bug originates in code. Use when a bug is hard to locate, code is not working as expected, an error or crash appears with unclear cause, a regression was introduced between recent commits, or you need to narrow down which component…
git-worktree-workspaces
Sets up and uses Git worktrees for parallel task workspaces in the same repository clone, including safe cleanup of local worktrees. Invoked when the user asks to work on multiple branches at once, isolate tasks without extra clones, or create/remove worktrees.
containment
Provides structured incident containment strategies mapped to NIST SP 800-61 Rev 2 and MITRE ATT&CK techniques. Auto-invoked when a confirmed incident requires isolation decisions, credential revocation, network segmentation, or DNS sinkholing. Produces a containment plan with short-term and long-term actions…
spawnpoint
This skill should be used when an agent needs to create, list, extend, or remove multi-repo git worktree workspaces using the spawnpoint CLI (binary spawnpoint, shell wrapper sp). Use it when a task involves spinning up isolated worktrees for a feature branch across one or more repos, finding existing workspaces…