ce-worktree

ce-worktree is a skill for Claude Code from EveryInc/compound-engineering-plugin. It costs 46 tokens per session (1,465 once invoked), scanned A, original, MIT.

A guide for using Git worktrees, which are separate working folders connected to the same repository. It helps create an isolated branch or open an existing branch, pull request, or commit in its own folder.

In plain words
What is it for?
Use it when starting isolated feature work or inspecting an existing branch, pull request, or commit without switching the main working folder.
Why use it?
It prevents unfinished changes in one task from interfering with another task or the main checkout.

Skill for Claude Code

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

Part of the compound-engineering plugin — 36 skills, 1 command shipped together

not rated 25krepo +161 today A scan Socket: passSnyk: warnSkillSpector: pass 46 tokens original MIT

Good fit Use it when starting isolated feature work or inspecting an existing branch, pull request, or commit without switching the main working folder.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/everyinc/compound-engineering-plugin/ce-worktree
About the project

Compound Engineering is a plugin that organizes software work into brainstorming, planning, implementation, review, and recording lessons for future changes. It is used with AI coding agents including Claude Code, Cursor, and Codex, and the catalogue entries provide parts of its agent, skill, command, and hook workflow.

EveryInc/compound-engineering-plugin · 25,026 stars · on GitHub · every.to

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 EveryInc/compound-engineering-plugin --skill ce-worktree
Clone the repo
git clone --depth 1 https://github.com/EveryInc/compound-engineering-plugin

Made for: Claude Code.

Or install compound-engineering, the plugin that ships this one along with the rest of its 36 skills, 1 command.

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 ce-worktree

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/everyinc/compound-engineering-plugin/ce-worktree"><img src="https://agentmods.dev/badge/skills/everyinc/compound-engineering-plugin/ce-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,465 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
  • Socket pass 5 May 2026
  • Snyk warn 5 May 2026
  • 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.00046 $0.01465
Opus 5 $0.00023 $0.00732
Sonnet 5 $0.00009 $0.00293
Haiku 4.5 $0.00005 $0.00146

Measured 8d ago against content hash 832f90ee9bb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/ce-worktree/SKILL.md · 55 lines

How it starts

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

Worktree Isolation

Ensure the current work happens in an isolated workspace, without disturbing the user's main checkout. Most coding harnesses now create a worktree by default at session start, so the common case is that isolation already exists.

Done when: the caller is working in an isolated tree — existing or newly created — and its path and branch have been reported, or a blocker has been reported instead.

Order of operations: detect existing isolation -> prefer a native worktree tool -> fall back to plain git. Never create a worktree the harness cannot see.

Two modes, set by the caller's need:

  • New work (default). No ref named — create a fresh branch from a base (trunk). This is what ce-work and ce-code-review use when the user picks the worktree option.
  • Isolate an existing ref. The caller names a PR head, branch, or commit — attach the worktree to that ref instead of creating a new branch. A branch can be checked out in only one worktree at a time. If the named ref is already checked out anywhere (most commonly as the primary checkout's current branch), do not create a second worktree — report that it is already checked out at <path> and let the caller act (work there in place; or, only if a clean separate tree is essential, create a detached worktree at the same commit).

Step 0: Detect existing isolation

Compare the resolved absolute git dir against the resolved absolute common git dir. Git mixes absolute and relative forms depending on the current directory (from a subdirectory of a normal checkout, --git-dir comes back absolute while --git-common-dir may be relative), so a raw string compare yields a false "already isolated":

git rev-parse --absolute-git-dir                     # absolute git dir for this worktree
(cd "$(git rev-parse --git-common-dir)" && pwd -P)   # absolute shared (common) git dir

Equal -> normal checkout; continue to Step 1.

Different -> a linked worktree or a submodule. Distinguish with git rev-parse --show-superproject-working-tree:

Read the full file on GitHub · 55 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. 8d ago First seen · 55 lines · 46 tokens per session scan A 832f90ee9bb7

Subscribe to this mod's changes

ce-worktree is a skill published in the GitHub repository EveryInc/compound-engineering-plugin (25,026 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,465 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

release-versioning

Discipline for release classification, version bumps, and changelogs, Conventional Commits classify the release range, SemVer computes the version from those commits, Keep a Changelog renders the result. Use when the user asks to cut a release, bump a version, write a changelog, decide if a change is a…

aethrox/doctrine · 84 tokens

pr-summarizer

Use when opening a PR — produces a clean PR description (what / why / how to verify / risks) from a branch diff against base.

oxbshw/LLM-Agents-Ecosystem-Handbook · 34 tokens

resolving-merge-conflicts

Discipline for resolving an in-progress git merge or rebase conflict, a conflict marker names two divergent intents from a shared ancestor, resolved by tracing each side back to what it was trying to accomplish, never by blindly picking one side's raw text. Use when a merge or rebase has stopped with conflict markers…

aethrox/doctrine · 97 tokens

safe-deployment

Discipline for shipping changes reversibly, decouple deploy (code reaches production) from release (users see it) with feature flags, roll out progressively, and define the automated rollback trigger before shipping, not during the incident. Use when the user asks how to deploy a risky change, choose between…

aethrox/doctrine · 93 tokens

repo-ship

Split existing repository work into commits by intent as it happens, or give a new repository its name, visibility, description, and topics at creation. Use the matching path when work is about to be committed or pushed, before a push that would otherwise land as one large commit, or when a new repository is being…

aethrox/doctrine · 68 tokens

superpowers-finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup.

regen-coordination/org-os-template · 47 tokens