worktree

worktree is a skill for Claude Code from escoffier-labs/skillet. It costs 75 tokens per session (1,026 once invoked), scanned A, original, MIT.

A workflow for creating an isolated Git workspace for feature development. A Git worktree is a separate directory linked to the same repository, so changes can be made on another branch without disturbing the current one.

In plain words
What is it for?
Use it before risky feature work, executing a plan, or splitting work across parallel tasks. It prefers the environment's built-in worktree support and can fall back to Git worktrees.
Why use it?
It reduces the chance that experimental or parallel work will mix with the branch already in use. It also checks whether the current directory is already isolated before creating another workspace.

Skill for Claude Code

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

Part of the skillet plugin — 39 skills, 1 hook shipped together

Good fit Use it before risky feature work, executing a plan, or splitting work across parallel tasks. It prefers the environment's built-in worktree support and can fall back to Git worktrees.

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

Made for: Claude Code.

Or install skillet, the plugin that ships this one along with the rest of its 39 skills, 1 hook.

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 worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/escoffier-labs/skillet/worktree.svg)](https://agentmods.dev/skills/escoffier-labs/skillet/worktree)
Your own site
<a href="https://agentmods.dev/skills/escoffier-labs/skillet/worktree"><img src="https://agentmods.dev/badge/skills/escoffier-labs/skillet/worktree.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,026 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.00075 $0.01026
Opus 5 $0.00037 $0.00513
Sonnet 5 $0.00015 $0.00205
Haiku 4.5 $0.00007 $0.00103

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

Security

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

skillet/skills/worktree/SKILL.md · 59 lines

How it starts

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

worktree

A cook does not prep on the same board the plates are leaving from. A clean station is the first move of service, not an afterthought: it keeps the work in front of you from contaminating what is already plated. This skill sets up that clean station for code, an isolated workspace where a feature or a risky change can be built without touching the branch the user is standing on.

Core principle: detect existing isolation first, then prefer the harness's native worktree tool, then fall back to git. Never fight the harness by stacking a manual worktree on top of one it already gave you.

Step 0: are you already isolated?

Before creating anything, check. Stacking a worktree inside a worktree is the most common mistake.

GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
git rev-parse --show-superproject-working-tree 2>/dev/null   # non-empty = submodule, not a worktree

If GIT_DIR != GIT_COMMON and you are not in a submodule, you are already in a linked worktree. Report the path and branch, skip to Step 2. If they are equal (or you are in a submodule), you are in a normal checkout: continue.

If the user's instructions already declare a worktree preference, honor it without asking. Otherwise ask once: "Want me to set up an isolated worktree so your current branch stays untouched?" If they decline, work in place and skip to Step 2.

1a. Native tool first (preferred). If the harness gives you a worktree mechanism, a tool named something like EnterWorktree or WorktreeCreate, a /worktree command, or a --worktree flag, use it and skip to Step 2. Native tools own directory placement, branch creation, and cleanup; a hand-rolled git worktree add on top of them leaves phantom state the harness cannot see.

1b. Git fallback (only when no native tool exists). Pick the directory by priority: explicit user preference, then an existing .worktrees/ (wins) or worktrees/, else default to .worktrees/ at the repo root. For a project-local directory, verify it is ignored before creating anything (git check-ignore -q .worktrees); if not, add it to .gitignore and commit that first, or the worktree contents get tracked. Then:

Read the full file on GitHub · 59 lines

Files

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.

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. 7d ago First seen · 59 lines · 75 tokens per session scan A 10be5735a5b8

Subscribe to this mod's changes

worktree is a skill published in the GitHub repository escoffier-labs/skillet (4 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 1,026 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

release

CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.

oliver-kriska/claude-elixir-phoenix · 60 tokens

changelog-rules

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

tobihagemann/turbo · 29 tokens

accessing-github-repos

GitHub repository access in containerized environments using REST API and credential detection. Use when git clone fails, or when accessing private repos/writing files via API.

oaustegard/claude-skills · 39 tokens

opening-prs

Open a GitHub PR via API as a flowing graph — branch + push + createpr + mergeable poll, with structural protection against pushing to main/master/etc. Use when a Claude Code or Claude.ai container needs to land changes on GitHub via the API (no git CLI required) and the prose "create branch, push, open PR, wait for…

oaustegard/claude-skills · 86 tokens

suede-play-release

Suede Labs Google Play delivery skill: ship an Android release end to end from the agent interface, without opening the Play Console. Set up credentials, upload an AAB, promote between tracks, stage or complete a rollout, push per-locale release notes, and prove against the Play Developer API what is actually live.…

JasonColapietro/suede-creator-skills · 200 tokens