ce-worktree
Skill26k starsChanged 3 months agoMITView on GitHub
Set up isolated git worktrees — create a new branch for fresh work, or attach a worktree to an existing branch, PR, or commit. Use when starting isolated work or isolating an existing ref.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Ensure the current work happens in an isolated workspace, without disturbing the user's main checkout.
- Very specific: line 16
New work (default): No ref named — create a fresh branch from a base (trunk).
- Distinctive: line 41
Only when there is no native tool and Step 0 found no existing isolation.
- Distinctive: line 47
Create the worktree, per mode:
- Distinctive: line 51
If git reports the ref is already checked out elsewhere, apply the one-branch-one-worktree rule above — do not force a second worktree.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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-workandce-code-reviewuse 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 dirEqual -> normal checkout; continue to Step 1.
Different -> a linked worktree or a submodule. Distinguish with git rev-parse --show-superproject-working-tree:
- Non-empty -> submodule; treat it as a normal checkout and continue to Step 1.
- Empty -> already isolated. Report the worktree path (
git rev-parse --show-toplevel) and current branch, then work in place — a worktree-from-worktree lands in the wrong tree and is invisible to the harness that made the current one. In isolate-an-existing-ref mode, check that ref out here (unless it is already current) rather than nesting a worktree.
Step 1: Prefer the harness's native worktree tool
If the harness provides a native worktree primitive — for example an EnterWorktree / WorktreeCreate tool, a /worktree command, or a --worktree flag — use it and stop. Native tools place, track, and clean up the worktree so the harness can manage it. A behind-the-back git worktree add creates phantom state the harness cannot see, navigate to, or clean up.
Step 2: Git fallback
Only when there is no native tool and Step 0 found no existing isolation.
- Run from the repo root:
cd "$(git rev-parse --show-toplevel)". The paths below are repo-root-relative, but the skill runs from the user's current directory — without this,.worktrees/<branch>and the.gitignoreedit land in a subdirectory (e.g.src/.worktrees/...). - Choose a meaningful branch name from the work description (e.g.
feat/login,fix/email-validation) — never an opaque auto-generated one. Base: origin's default branch, elsemain. - Ensure
.worktrees/is gitignored before creating anything:git check-ignore -q .worktrees/— with the trailing slash, so an existing directory-only.worktrees/rule is honored even before the directory exists (without the slash the probe misses it and dirties a correctly-configured repo). Not ignored -> add a.worktrees/line to.gitignore. - Refresh the base with
git fetch origin <from-branch>. This is non-fatal — nooriginremote, a differently-named remote, or a local-only branch is not an abort; continue with the local ref. - Create the worktree, per mode:
- New work:
git worktree add -b <branch-name> .worktrees/<branch-name> origin/<from-branch>(use the local<from-branch>ref iforigin/<from-branch>does not exist). - Existing branch or tag:
git worktree add .worktrees/<slug> <target-ref>. - PR: check it out on a local branch —
git fetch origin pull/<n>/head:pr-<n>thengit worktree add .worktrees/pr-<n> pr-<n>. Never a detachedFETCH_HEAD: that orphans the fix loop's commits instead of updating the PR. (For push-tracking back to the PR, create it detached —git worktree add --detach .worktrees/pr-<n>— thencdin and rungh pr checkout <n>, which is fork-safe.) - If git reports the ref is already checked out elsewhere, apply the one-branch-one-worktree rule above — do not force a second worktree.
- New work:
cdinto it, then report the path and branch.
If git worktree add fails with a sandbox or permission error, the requested isolation does not exist. Do not proceed in the current checkout — the user chose isolation specifically to avoid it. Report the failure and ask, offering options such as "work in the current checkout" vs "stop and resolve the permission issue", using the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Only when no such tool is in the list or a real question call errors, present the numbered options in chat and wait for the reply. Never skip the confirmation, and do not retry alternative paths automatically.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about EveryInc/every-marketplace
- AI LABS“How to 10X Your Claude Code Workflow”YouTube · Oct 12, 2025 · 28k views
- A Hacker News story“Compounding Engineering for Claude Code”Hacker News · Oct 11, 2025 · 2 points
- EveryInc/compound-engineering-plugin“Request to merge PR #11 - Comprehensive standardization”GitHub · Nov 11, 2025 · 1 reactions
- aj-ebels/rapid-scribe“Add Every compound-engineering plugin marketplace to project settings”GitHub · Jul 7, 2026
- EveryInc/compound-engineering-plugin“Installing via README vs guide”GitHub · Feb 25, 2026
The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 12
Talked about on GitHub, YouTube and Hacker News (12 times).
On GitHub · 10
- Nov 11, 2025Request to merge PR #11 - Comprehensive standardization — EveryInc/compound-engineering-plugin1 reaction · 1 comment
- Jul 7, 2026Add Every compound-engineering plugin marketplace to project settings — aj-ebels/rapid-scribe0 reactions
- Feb 25, 2026Installing via README vs guide — EveryInc/compound-engineering-plugin0 reactions · 3 comments
- Nov 30, 2025Compound engineering Command not installed with Droid — EveryInc/compound-engineering-plugin0 reactions · 8 comments
- Nov 25, 2025feat: Add plan mode support to /issue, /architect, and /product-manager commands — psd401/psd-claude-plugins0 reactions · 1 comment
5 more on GitHub
- Nov 18, 2025Install compounding-engineering plugin from Every marketplace — ThePharmer/stepmania0 reactions
- Nov 13, 2025Enhance issue with planner — minyk/lazy-bird0 reactions
- Nov 6, 2025feat: install Compounding Engineering plugin from Every marketplace — nerdymil30/gmail_classifier_speckit0 reactions
- Oct 15, 2025Add one-command installation option via Claude Plugins CLI — EveryInc/compound-engineering-plugin0 reactions · 1 comment
- Oct 10, 2025Claude v 2.013 - Failed to closne repository.. — EveryInc/compound-engineering-plugin0 reactions · 1 comment
On YouTube · 1
- Oct 12, 2025How to 10X Your Claude Code Workflow — AI LABS28k views · 197 comments
On Hacker News · 1
- Oct 11, 2025Compounding Engineering for Claude Code2 points
Other versions5 projects use a version of this.
Word for word · 4
- EveryInc/compounding-engineering-plugin★ 26k100% same
- EveryInc/compound-engineering-plugin★ 26k100% same
- kieranklaassen/compound-engineering-plugin★ 26k100% same
- MortuisVMain/ai-agent-superpowers★ 0100% same
Edited · 1
- Pdbjork/hermosskills-site★ 039% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ce-skill-workSkill
- ce-babysit-prSkill
- ce-bakeoffSkill
- ce-brainstormSkill
- ce-code-reviewSkill
- ce-commit-push-prSkill
- ce-commitSkill
- ce-compound-refreshSkill
- ce-compoundSkill
- ce-debugSkill
- ce-doc-reviewSkill
- ce-dogfoodSkill
- ce-explainSkill
- ce-handoffSkill
- ce-ideateSkill
- ce-noslopSkill
- ce-optimizeSkill
- ce-planSkill
- ce-polishSkill
- ce-povSkill
- ce-product-pulseSkill
- ce-promoteSkill
- ce-proofSkill
- ce-prototypeSkill
- ce-resolve-pr-feedbackSkill
- ce-retuneSkill
- ce-riffrec-feedback-analysisSkill
- ce-setupSkill
- ce-simplify-codeSkill
- ce-strategySkill
- ce-sweepSkill
- ce-test-browserSkill
- ce-test-xcodeSkill
- ce-workSkill
- lfgSkill
- wtfSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

