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 ayberkcansever/ai-skills --skill git-worktreesgit clone --depth 1 https://github.com/ayberkcansever/ai-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/ayberkcansever/ai-skills/git-worktrees)<a href="https://agentmods.dev/skills/ayberkcansever/ai-skills/git-worktrees"><img src="https://agentmods.dev/badge/skills/ayberkcansever/ai-skills/git-worktrees/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/ayberkcansever/ai-skills/git-worktrees"><img src="https://agentmods.dev/badge/skills/ayberkcansever/ai-skills/git-worktrees.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.00053 | $0.01195 |
| Opus 5.5 | $0.00021 | $0.00478 |
| Sonnet 5.5 | $0.00011 | $0.00239 |
| Haiku 4.5 | $0.00005 | $0.00120 |
Grade A, and why
git-worktrees 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 1mo 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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktrees
Ensure work happens in an isolated workspace without disturbing the current checkout. Detect first. Consent only when the user invoked this skill directly; execute-plan skips the consent question, not this skill.
Announce at start: "I'm using the git-worktrees skill to set up an isolated workspace."
Step 1: Detect existing isolation
GIT_DIR=$(cd "$(git rev-parse --git-dir)" && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" && pwd -P)
git worktree list
GIT_DIR != GIT_COMMON→ already in a linked worktree. Report path + branch, skip to Step 3. Exception: ifgit rev-parse --show-superproject-working-treeprints a path, you are in a submodule, not a worktree — treat as normal repo.git worktree listalready shows a worktree for this ticket →cdinto it and skip to Step 3. Never create a second one for the same ticket.- Current branch already matches this ticket (
git branch --show-currentcontains the ticket key) → this checkout is the venue. Skip Step 2. Go to Step 3. GIT_DIR == GIT_COMMONand no ticket worktree → normal checkout, continue.
Step 2: Create the worktree
Consent: ask once, unless the user already told you their preference —
"Set up an isolated worktree? It protects your current branch and uncommitted work."
If declined, stop. Do not execute in the current checkout. Invoked from execute-plan, consent is implied and this question is skipped: execute-plan only reaches this skill when the checkout is not already on the ticket branch.
Path is .worktrees/<branch-name>; branch name follows repo conventions —
ticket key first, e.g. PROJ-123-short-description.
Native worktree tools never create the worktree. Harness tools such as
Claude Code's EnterWorktree pick their own path (.claude/worktrees/<name>)
and branch (worktree-<name>), which breaks the .worktrees/<branch> and
<TICKET-ID>-<slug> contract execute-plan depends on. Always create with the
git worktree commands below. After creating, a harness that can enter an
existing worktree by path (Claude Code: EnterWorktree with
path: .worktrees/<branch>) may do so to bind the session's cwd and
isolation to the venue — that is optional; cd is sufficient.
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.
- 1mo ago Changed · +6 lines 1760e1a16a69
- 1mo ago Changed · -1 lines · -30 tokens per session 86f8b7bd3c48
- 1mo ago First seen · 112 lines · 83 tokens per session scan A 1e798baa4348
git-worktrees is a skill published in the GitHub repository ayberkcansever/ai-skills (2 stars, last pushed 25d ago), licensed MIT. It adds 53 tokens to every session and 1,195 once invoked, about $0.0002 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-08-31.
Other skills, from other repositories
pr-review
Use when opening, reviewing, or merging a pull request. Covers pre-PR checks (linting, tests, branch naming), PR description requirements, and post-merge cleanup. Not for code review commentary or architecture decisions — use the relevant role guidelines for those.
pn-monorepo
Monorepo setup and maintenance with Turborepo, Nx, and pnpm workspaces. Build caching, publishConfig, shared package configuration, and workspace dependency graphs. Use when setting up or refactoring a monorepo.
pn-github-vertical-slices
Break a plan or PRD into tracer-bullet vertical slices and create GitHub Issues via GitHub MCP (official github/github-mcp-server). Dependencies first (AFK/HITL). Use after pn-writing-plans or pn-create-prd when work must ship as Issues.
pn-merge-conflict-fix
Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution. Use when branch has unresolved merge conflicts.
git-onboarding-setup
A step-by-step guide for setting up Git and GitHub for the first time. Git records code changes, while GitHub hosts repositories and supports collaboration.
git-onboarding-help
A guided setup and reference for getting an AI coding agent ready to use Git, the version-control system used to track code changes.