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/urmzd/dotfiles/use-worktreesnpx skills add urmzd/dotfiles --skill use-worktreesgit clone --depth 1 https://github.com/urmzd/dotfilesWrote 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/urmzd/dotfiles/use-worktrees)<a href="https://agentmods.dev/skills/urmzd/dotfiles/use-worktrees"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/use-worktrees.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.00130 | $0.01219 |
| Opus 5 | $0.00065 | $0.00609 |
| Sonnet 5 | $0.00026 | $0.00244 |
| Haiku 4.5 | $0.00013 | $0.00122 |
Grade B, and why
use-worktrees scanned grade B with 1 finding 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 3d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
`~/.claude/settings.json`) makes `claude --worktree` and subagent How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Use Worktrees
Worktrees give each parallel task its own working directory while sharing one repository. This skill defines where they live and the invariants that keep the primary checkout safe.
Policy (non-negotiable)
- One location: every worktree lives at
<repo-root>/.worktrees/<name>, where<repo-root>is the primary checkout of the repo being worked on. Never.claude/worktrees/, never sibling directories (../repo-feature), never temp dirs, never nested inside another worktree. - Per-repo, even cross-project: when a session in project A creates a
worktree for project B, it goes in B's own root (
<B-root>/.worktrees/), not under A and not in any shared location. - Always ignored:
.worktrees/must be gitignored. Check withgit check-ignore -q .worktrees; if not ignored, append.worktrees/to.git/info/exclude(repo-local, safe in shared repos). Only add it to the tracked.gitignorewhen the user wants it committed for the whole team. - The default branch never moves: the primary checkout stays on the
default branch (
main/master) permanently. Nevergit switchorgit checkouta feature branch there, never commit on it directly; update it only withgit pull --ff-only. All branch work happens inside worktrees.
Create a worktree
root=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")
git -C "$root" check-ignore -q .worktrees || printf '.worktrees/\n' >> "$root/.git/info/exclude"
default=$(git -C "$root" symbolic-ref -q --short refs/remotes/origin/HEAD || echo HEAD)
git -C "$root" worktree add -b <branch> "$root/.worktrees/<task>" "$default"
Notes:
- Deriving
rootfrom the git common dir means this works from inside another worktree too: the new one still lands in the primary checkout. - Branch from
origin/HEAD(the remote default) so the local default branch is never involved. Iforigin/HEADis unset, rungit remote set-head origin --autoonce. - For another repo, run the same commands with
git -C /path/to/repo. - To work on an existing branch:
git worktree add "$root/.worktrees/<task>" <branch>.
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.
- 3d ago First seen · 98 lines · 130 tokens per session scan B f9620a767f1f
use-worktrees is a skill published in the GitHub repository urmzd/dotfiles (3 stars, last pushed 21d ago), licensed Apache-2.0. It adds 130 tokens to every session and 1,219 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
coding
Principles for writing and designing code, covering API and abstraction design, naming, comment discipline, and standards of evidence for claims about code behavior. Use whenever the task is to write or modify code, design an API or software architecture, or review code.
review-code
Standalone code review for any scope — PR number, branch, file paths, or current changes. Synthesizes intent, runs 10 parallel specialized agents, and presents actionable findings with a verdict. For PR scope, optionally posts the review to GitHub with inline comments.
review-prs
Fetch and present a prioritized summary of all PRs awaiting the current user's review across the relevant projects and provide an interactive workflow helping the user phrase and post inline review comments and overall review decisions.
review-converge
Autonomously review and fix the current branch or specified scope in iterative rounds until clean, leaving all changes in the working tree. Escalates only genuine design decisions. Ends with a transparent report of every round, every fix, and anything it couldn't resolve — persisted to .outputs/.
review-pr-comments-converge
Fetch PR review comments, validate each against the actual code, auto-fix obvious issues, and escalate genuine design decisions. Leaves all changes in the working tree. Use when you want to action reviewer feedback autonomously.
write-ticket-description
Voice guide for writing issue/ticket/task/epic descriptions. Use this skill for ALL issue creation — GitHub issues, Jira tasks, Monday tasks, Linear tasks, and epics. Contains section structure, voice rules, and anti-patterns. Never write ticket descriptions without invoking this skill first.