worktree

worktree is a skill for Claude Code from EntityProcess/allagents. It costs 38 tokens per session (392 once invoked), scanned A, original, MIT.

A Git worktree helper that creates separate working folders for branches and removes them when the work is finished. A Git worktree lets you work on another branch without changing your current folder.

In plain words
What is it for?
Use it to start work in a dedicated worktree, choose its starting branch, fetch the latest remote state, or clean up a completed worktree.
Why use it?
It keeps feature or bug-fix work isolated and preserves Git’s safeguards when removing unfinished changes.

Skill for Claude Code

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

Part of the engineering plugin — 2 skills shipped together

Good fit Use it to start work in a dedicated worktree, choose its starting branch, fetch the latest remote state, or clean up a completed worktree.

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

Made for: Claude Code.

Or install engineering, the plugin that ships this one along with the rest of its 2 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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/entityprocess/allagents/worktree"><img src="https://agentmods.dev/badge/skills/entityprocess/allagents/worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 392 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.00392
Opus 5.5 $0.00015 $0.00157
Sonnet 5.5 $0.00008 $0.00078
Haiku 4.5 $0.00004 $0.00039

Measured 3mo ago against content hash f40ac45cd029, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/worktree.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/engineering/skills/worktree/SKILL.md · 42 lines

What it actually says

Git Worktrees

Resolve this skill's directory, then invoke its bundled scripts/worktree.sh. Pass -C <repo> when the shell is not already inside the target repository.

Add

<skill-directory>/scripts/worktree.sh -C <repo> add <branch> [start-point]

The script:

  1. uses an existing local branch when present;
  2. creates a tracking branch when <remote>/<branch> exists;
  3. otherwise creates the branch from start-point, the remote default branch, or HEAD;
  4. prints the created worktree path.

Fetch the remote before adding when the worktree must start from its latest state:

git -C <repo> fetch origin
<skill-directory>/scripts/worktree.sh -C <repo> add feat/example origin/main

Worktrees default to <repo>__worktrees/<branch-with-slashes-as-dashes>. Set WORKTREE_ROOT to use another parent and WORKTREE_REMOTE to use a remote other than origin.

Remove

<skill-directory>/scripts/worktree.sh -C <repo> remove <branch-or-path>
<skill-directory>/scripts/worktree.sh -C <repo> remove --force <branch-or-path>

Normal removal preserves Git's dirty-worktree protection. Use --force only when discarding the worktree's uncommitted files is intended. Removal unregisters and deletes the worktree directory; it leaves the branch intact.

An add is complete when the script prints the new path and git -C <repo> worktree list contains it. A removal is complete when that path is absent.

Files

What ships with it

1 file 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. 3mo ago First seen · 42 lines · 38 tokens per session scan A f40ac45cd029

Subscribe to this mod's changes

worktree is a skill published in the GitHub repository EntityProcess/allagents (11 stars, last pushed 2mo ago), licensed MIT. It adds 38 tokens to every session and 392 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-08-30.

Related

worktree compared with skills from other repositories

worktree next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
worktreeEntityProcess/allagentsSkill112mo agoMITA38Claude Code
github-proxyvolcengine/OpenVikingSkill43ktodayAGPL-3.0A94Claude Code, Codex
githubvolcengine/OpenVikingSkill43ktodayAGPL-3.0A44Claude Code, Codex
tools-checkoutGoldziher/ai-rulezSkill1825d agoMITA14Claude Code
pyo3-bindingsGoldziher/ai-rulezSkill1825d agoMITA61Claude Code, Codex
release-and-distributionGoldziher/ai-rulezSkill1825d agoMITA40Claude Code, Codex
commit-stagedGoldziher/ai-rulezSkill1825d agoMITA23Claude Code