git-worktrees

git-worktrees is a skill for Claude Code from wei6bin/skills. It costs 29 tokens per session (400 once invoked), scanned A, original, MIT.

A workflow for creating isolated Git worktrees, which are separate working folders sharing one repository. It includes choosing a location and checking safety before setup.

In plain words
What is it for?
Setting up an isolated workspace before implementing a feature or following a larger coding plan.
Why use it?
It lets feature work proceed separately from the current files and branch, reducing the chance of mixing changes between tasks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the jidoka-copilot plugin — 17 skills shipped together

Good fit Setting up an isolated workspace before implementing a feature or following a larger coding plan.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wei6bin/skills/git-worktrees
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 wei6bin/skills --skill git-worktrees
Clone the repo
git clone --depth 1 https://github.com/wei6bin/skills

Made for: Claude Code.

Or install jidoka-copilot, the plugin that ships this one along with the rest of its 17 skills.

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 git-worktrees

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

agentmods 80×15 button for git-worktrees

Your own site · 80×15
<a href="https://agentmods.dev/skills/wei6bin/skills/git-worktrees"><img src="https://agentmods.dev/badge/skills/wei6bin/skills/git-worktrees.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 400 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.00029 $0.00400
Opus 5.5 $0.00012 $0.00160
Sonnet 5.5 $0.00006 $0.00080
Haiku 4.5 $0.00003 $0.00040

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

Security

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 10d 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.

jidoka-copilot/skills/git-worktrees/SKILL.md · 47 lines

What it actually says

Git Worktrees

Announce at start: "I'm using the git-worktrees skill to set up an isolated workspace."

Where

In priority order:

  1. An existing .worktrees/ (preferred) or worktrees/ directory in the repo.
  2. A location named in CLAUDE.md (grep -i "worktree.*director" CLAUDE.md).
  3. Otherwise ask: .worktrees/ (project-local, hidden) or ~/.config/jidoka/worktrees/<project>/ (global).

For a project-local directory, verify it is ignored (git check-ignore -q <dir>, where <dir> is .worktrees or worktrees, whichever was chosen); if not, add it to .gitignore and commit before creating the worktree, so worktree contents never get tracked.

Create

git worktree add "$path/$BRANCH_NAME" -b "$BRANCH_NAME"    # $path absolute
cd "$path/$BRANCH_NAME"

Then run the project's dependency install (detect from package.json, Cargo.toml, pyproject.toml/requirements.txt, go.mod, *.sln/*.csproj) and the test suite to establish a clean baseline. If tests fail, report the failures and ask whether to proceed or investigate; a dirty baseline makes new bugs indistinguishable from pre-existing ones.

Report

Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>
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. 10d ago Changed · -3 lines 859bb7cb9fae
  2. 17d ago Changed · -87 lines · -4 tokens per session 2eb40cbda5fd
  3. 24d ago Changed · -39 lines 8a539ab953de
  4. 1mo ago Changed 5ff8799fc4f5
  5. 1mo ago First seen · 176 lines · 33 tokens per session scan A 768a30baec0c

Subscribe to this mod's changes

git-worktrees is a skill published in the GitHub repository wei6bin/skills (2 stars, last pushed 11d ago), licensed MIT. It adds 29 tokens to every session and 400 once invoked, about $0.0001 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.