worktree-enhanced

worktree-enhanced is a skill for Claude Code from jerseycheese/agent-skills. It costs 67 tokens per session (2,483 once invoked), scanned A, original, MIT.

A workflow for creating a separate Git worktree, which is an additional checkout of a repository for isolated development. It also handles the branch, project setup, environment files, and development-server coordination.

In plain words
What is it for?
Use it to start work on a new branch, issue, feature, or bug fix in isolation, with project-specific setup handled automatically.
Why use it?
It keeps feature or bug-fix work separate from the current checkout and helps avoid conflicts between development servers or parallel tasks.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the TodoWrite tool; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is PORT="$(node scripts/worktree-port.cjs)".

Part of the workflow-skills plugin — 36 skills shipped together

Good fit Use it to start work on a new branch, issue, feature, or bug fix in isolation, with project-specific setup handled automatically.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills
agentmods
npx agentmods add skills/jerseycheese/agent-skills/worktree-enhanced

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 36 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 worktree-enhanced

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/worktree-enhanced"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/worktree-enhanced.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,483 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.00067 $0.02483
Opus 5.5 $0.00027 $0.00993
Sonnet 5.5 $0.00013 $0.00497
Haiku 4.5 $0.00007 $0.00248

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

Security

Grade A, and why

worktree-enhanced 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 26d 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.

skills/worktree-enhanced/SKILL.md · 339 lines

How it starts

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

Enhanced Worktree Workflow

When to Use This Skill

Use this skill when:

  • Starting work on a new feature or bug fix
  • Need isolation from current workspace
  • Want parallel development on multiple issues
  • Executing implementation plans that require clean state

This skill handles the full worktree setup workflow with:

  • Dev server detection and coordination
  • Local env file propagation from the main checkout
  • Automatic dev server startup option
  • Project-specific worktree conventions

Enhanced Features

1. Dev Server Awareness

Every worktree gets its own dev-server port — never assume port 3000 belongs to the worktree you're in. Resolve the port before checking it:

# Resolve this checkout's port: a project script if it has one
# (scripts/worktree-port.cjs), else the port recorded in .claude/launch.json.
# No fallback: guessing 3000 would report the main checkout's server as this one's.
if [ -f scripts/worktree-port.cjs ]; then
  PORT="$(node scripts/worktree-port.cjs)"
else
  PORT="$(node -p "require('./.claude/launch.json').configurations[0].port" 2>/dev/null)"
fi

if [ -z "$PORT" ] || [ "$PORT" = "undefined" ]; then
  echo "No port recorded for this worktree; assign one (below) before checking for a server"
elif DEV_SERVER_PID=$(lsof -ti:"$PORT"); [ -n "$DEV_SERVER_PID" ]; then
  echo "Dev server already running on port $PORT (PID: $DEV_SERVER_PID)"
else
  echo "No dev server running on port $PORT yet"
fi

configurations[0] assumes the dev server is the first entry. If launch.json lists Storybook or an API first, read the dev server's entry instead.

If the project has no per-worktree port yet, give each new worktree its own before starting a server — otherwise every worktree's npm run dev fights over the same port. A manual way: pick a free port per worktree and pass it to the dev server (PORT=3101 npm run dev, or the framework's port flag), or derive one from the worktree path:

PORT=$((3100 + $(pwd | cksum | cut -d' ' -f1) % 900))

Read the full file on GitHub · 339 lines

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. 26d ago Changed · +1 lines 7e406eca4005
  2. 1mo ago Changed · +2 lines 2823fc5a52f8
  3. 1mo ago Changed · +6 lines 791040a06497
  4. 1mo ago Changed · -2 lines · -30 tokens per session 0c83dd9c0faf
  5. 3mo ago First seen · 332 lines · 97 tokens per session scan A a6efdd3fc259

Subscribe to this mod's changes

worktree-enhanced is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed 5d ago), licensed MIT. It adds 67 tokens to every session and 2,483 once invoked, about $0.0003 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.

Related

worktree-enhanced compared with skills from other repositories

worktree-enhanced next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
worktree-enhancedjerseycheese/agent-skillsSkill45d agoMITA67Claude Code
githubAceDataCloud/SkillsSkill17todaynoneA62Claude Code
gitlabAceDataCloud/SkillsSkill17todaynoneA54Claude Code
githubgeezerrrr/motiveSkill1201mo agoMITA44Claude Code, Codex
spec-kitty-git-workflowPriivacy-ai/spec-kittySkill1.7k8d agoMITA125Claude Code, Codex
version-control-strategyOwl-Listener/designer-skillsSkill3.5k11d agoMITA50Claude Code, Codex
spk-admin-git-workflowPriivacy-ai/spec-kittySkill1.7k8d agoMITA32Claude Code, Codex