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.
git clone --depth 1 https://github.com/jerseycheese/agent-skillsnpx agentmods add skills/jerseycheese/agent-skills/worktree-enhancedWrote 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/jerseycheese/agent-skills/worktree-enhanced)<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.
<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>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.00067 | $0.02483 |
| Opus 5.5 | $0.00027 | $0.00993 |
| Sonnet 5.5 | $0.00013 | $0.00497 |
| Haiku 4.5 | $0.00007 | $0.00248 |
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.
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))
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.
- 26d ago Changed · +1 lines 7e406eca4005
- 1mo ago Changed · +2 lines 2823fc5a52f8
- 1mo ago Changed · +6 lines 791040a06497
- 1mo ago Changed · -2 lines · -30 tokens per session 0c83dd9c0faf
- 3mo ago First seen · 332 lines · 97 tokens per session scan A a6efdd3fc259
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.
worktree-enhanced compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| worktree-enhancedjerseycheese/agent-skills | Skill | 4 | 5d ago | MIT | A | 67 | Claude Code |
| githubAceDataCloud/Skills | Skill | 17 | today | none | A | 62 | Claude Code |
| gitlabAceDataCloud/Skills | Skill | 17 | today | none | A | 54 | Claude Code |
| githubgeezerrrr/motive | Skill | 120 | 1mo ago | MIT | A | 44 | Claude Code, Codex |
| spec-kitty-git-workflowPriivacy-ai/spec-kitty | Skill | 1.7k | 8d ago | MIT | A | 125 | Claude Code, Codex |
| version-control-strategyOwl-Listener/designer-skills | Skill | 3.5k | 11d ago | MIT | A | 50 | Claude Code, Codex |
| spk-admin-git-workflowPriivacy-ai/spec-kitty | Skill | 1.7k | 8d ago | MIT | A | 32 | Claude Code, Codex |