ia-git-worktree

ia-git-worktree is a skill for Claude Code from iliaal/whetstone. It costs 42 tokens per session (2,149 once invoked), scanned A, original, MIT.

A tool for managing Git worktrees, which are separate working directories linked to the same repository. It creates isolated branches and directories so multiple pieces of work can be handled at once.

In plain words
What is it for?
Use it to create, list, switch, and remove isolated workspaces for parallel feature development or code reviews.
Why use it?
It avoids repeatedly stashing changes or switching one directory between branches. It also applies consistent setup, such as copying environment files and installing detected dependencies.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the whetstone plugin — 29 skills, 18 commands, 18 agents shipped together

Good fit Use it to create, list, switch, and remove isolated workspaces for parallel feature development or code reviews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/whetstone/ia-git-worktree
Install

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.

Any agent
npx skills add iliaal/whetstone --skill ia-git-worktree
Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

Made for: Claude Code.

Or install whetstone, the plugin that ships this one along with the rest of its 29 skills, 18 commands, 18 agents.

Wrote 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.

agentmods badge for ia-git-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/whetstone/ia-git-worktree/github.svg)](https://agentmods.dev/skills/iliaal/whetstone/ia-git-worktree)
Your own site
<a href="https://agentmods.dev/skills/iliaal/whetstone/ia-git-worktree"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/ia-git-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.

agentmods 80×15 button for ia-git-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/whetstone/ia-git-worktree"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/ia-git-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02149
Opus 5.5 $0.00017 $0.00860
Sonnet 5.5 $0.00008 $0.00430
Haiku 4.5 $0.00004 $0.00215

Measured yesterday against content hash b2487043a6fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ia-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 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.

claude-directory/whetstone/skills/ia-git-worktree/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git worktree manager

GATE: If the task runs inside an existing worktree (a worktree path is given and no create/remove/switch is requested), none of the creation flow applies: work in place and skip this skill. To check: git rev-parse --show-toplevel appears as a linked entry in git worktree list.

Working rules

  • Preserve other sessions' branches, files, and staged work (see Ownership).
  • Verify dependencies resolve first-party code from the intended worktree.
  • Keep merge, push, and cleanup within user authorization; report the exact exercised checkout and resulting commit.

Create worktrees with this procedure

Create every worktree with the steps below, not an ad hoc git worktree add. Record each tree this session creates; only those trees are this session's to clean up.

  1. Choose the path. Use .worktrees/<name> under the main checkout. Confirm it is ignored: git check-ignore -q -- .worktrees/<name>. If it is not, append .worktrees/ to $(git rev-parse --git-path info/exclude) (never the tracked .gitignore) and re-check. If a project rule still keeps it visible, stop and report the conflict. See hooks-and-excludes.md.

  2. Resolve the base to a commit without touching the caller's checkout. Fetch into a private ref, pin its SHA, then remove the ref:

    fetch_ref="refs/whetstone/fetch/$(date +%s)-$$"
    if GIT_TERMINAL_PROMPT=0 git fetch --no-tags --refmap= origin "<base>:$fetch_ref"; then
      base_sha=$(git rev-parse --verify "$fetch_ref^{commit}")
    else
      base_sha=$(git rev-parse --verify "<base>^{commit}")
    fi
    git update-ref -d "$fetch_ref"
    

    Never check out <base> in the caller's working tree, and do not rely on origin/<base> or FETCH_HEAD, which other checkouts can move. To carry unpushed local commits on <base> into the branch, branch from the local ref deliberately and say so.

  3. Create the tree: git worktree add -b <branch> .worktrees/<name> "$base_sha", then verify git -C .worktrees/<name> rev-parse HEAD equals $base_sha. For an untrusted base (PR heads, fork or origin-only branches, third-party code), run git -c core.hooksPath=/dev/null worktree add ... so checkout hooks do not run.

  4. Environment files (trusted bases only). Copy .env, .env.local, .env.test, and similar files from the main checkout only when the base is the default branch or a local branch that already contains the fetched commit. Never overwrite or follow an existing file or symlink in the new tree (cp -n, after checking with test -L). Never copy them into an untrusted tree.

  5. Dependencies. For trusted bases, install what the project declares: package.json → npm install, composer.json → composer install, pyproject.toml → pip install -e ., go.mod → go mod download. For untrusted bases, skip installs where possible; if one is necessary, disable lifecycle scripts and plugins (npm ci --ignore-scripts, composer install --no-scripts --no-plugins), and do not run pip install -e ., which runs the build backend. Keep credentials out of commands run in that tree.

Read the full file on GitHub · 94 lines

Files

What ships with it

3 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.

Changes

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.

  1. yesterday Changed · -11 lines b2487043a6fe
  2. 1mo ago Changed 77b2c21faf27
  3. 1mo ago Changed · +2 lines d29bff181abf
  4. 1mo ago Changed · +1 lines 5846ed556934
  5. 2mo ago Changed · -1 lines fd2307cab5b4
  6. 2mo ago Changed 2bdedd9c91c3
  7. 2mo ago Changed 37a2040337f6
  8. 2mo ago Changed · -35 lines 9d11243e4761
  9. 2mo ago First seen · 138 lines · 42 tokens per session scan A e43fc08c5675

Subscribe to this mod's changes

ia-git-worktree is a skill published in the GitHub repository iliaal/whetstone (37 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 2,149 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-09-07.

Related

ia-git-worktree compared with skills from other repositories

ia-git-worktree next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ia-git-worktreeiliaal/whetstoneSkill37todayMITA42Claude Code
pr-sweepharnessprotocol/harness-kitSkill13yesterdayApache-2.0A115Claude Code
open-prharnessprotocol/harness-kitSkill13yesterdayApache-2.0A111Claude Code
avi-pr-flowavi1234/claude-team-pluginsSkill59mo agoMITA15Claude Code
release-pr-reviewcyanheads/obsidian-mcp-serverSkill72119d agoApache-2.0A136Claude Code
pr-threads-addressposit-dev/skillsSkill57617d agoMITA48Claude Code
OCR Review-to-Approval Loopspencermarx/open-code-reviewSkill39519d agoApache-2.0A213Claude Code