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/vanducng/skills/worktreenpx skills add vanducng/skills --skill worktreegit clone --depth 1 https://github.com/vanducng/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/vanducng/skills/worktree)<a href="https://agentmods.dev/skills/vanducng/skills/worktree"><img src="https://agentmods.dev/badge/skills/vanducng/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.1 | $0.00134 | $0.06755 |
| Opus 5 | $0.00067 | $0.03377 |
| Sonnet 5 | $0.00027 | $0.01351 |
| Haiku 4.5 | $0.00013 | $0.00675 |
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 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 — 417 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree
Spin up an isolated git worktree so a new feature, bugfix, or parallel agent run lives on its own branch and its own filesystem path - without disturbing your main checkout. Each worktree arrives ready to run: env files copied, a private port block assigned, install commands detected. By default the agent session moves into the new worktree so subsequent work happens there - pass --no-enter to stay put. Pairs naturally with vd:cook and vd:fix (implement in the worktree) and vd:ship (land it).
What this skill is - and isn't
| Skill | Question it answers | Output |
|---|---|---|
vd:worktree |
Where does this feature/branch live on disk, and how does it run without colliding? | Worktree + branch + env + ports, ready for work |
vd:git |
How do I stage/commit/push this branch? | Conventional commits on the current branch |
vd:ship |
Is this branch ready to land? | Tests → review → version → PR |
vd:scout / vd:plan |
What am I going to build? | Reports + phase files |
vd:herd-worktree |
How should a Laravel app served by Herd be isolated? | This skill's worktree mechanics + Herd link/secure/env/DB/Vite setup |
Standard location: .worktrees/
All worktrees live at <git-root>/.worktrees/<repo>-<feature>/ - one rule for every repo type:
- Standalone →
<repo>/.worktrees/ - Monorepo →
<monorepo-root>/.worktrees/ - Submodule → topmost superproject's
.worktrees/
.worktrees/ is a top-level sibling of the .workbench/ artifact umbrella, deliberately not nested under it. Worktrees are full checkouts (heavy, contain source), so nesting them inside .workbench/ would pollute artifact globs (reports/, plans/) and bloat the umbrella. The script auto-appends /.worktrees/ and .env.worktree to .git/info/exclude when the repo doesn't already ignore them, so git status stays clean without touching tracked files.
Worktrees + the umbrella (artifacts survive worktree removal). Artifact paths anchor to the main worktree, so work done from any linked worktree writes back to the main checkout's .workbench/ - surviving git worktree remove. Under paths.layout: feature-first, each worktree's branch resolves its own feature (e.g. feat/ELT-3316-… → .workbench/features/elt-3316-…/), so parallel worktrees on different tickets land in separate feature folders under the one shared main umbrella - never colliding, never duplicated. A linked worktree has no local .workbench/.
What ships with it
2 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.
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 · 417 lines · 134 tokens per session scan A a17b8d20de77
worktree is a skill published in the GitHub repository vanducng/skills (7 stars, last pushed 2d ago), licensed MIT. It adds 134 tokens to every session and 6,755 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-09-04.
Other skills, from other repositories
git-workflow
安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。.
changelog-gen
Changelog 生成器 - 从 Git 历史自动生成 CHANGELOG.
resolve-pr-comments
Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…
create-pr
Create a GitHub pull request with a drafted title and description. Use when the user asks to "create a PR", "create a pull request", "open a PR", or "submit a PR".
update-pr
Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".
changelog-rules
Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.