worktree
Skill1 starsChanged 2 months agoMITView on GitHub
Set up the isolated, clean-baseline workspace a slice gets built in — detect the isolation already there, prefer the host's worktree primitive over `git worktree add`, install what the manifest names, record the test baseline. Not what gets built in it (`incremental-implementation`), commits (`git-workflow`), or the wave (`orchestrator`).
- Installs packages
59 other projects use a version of this.
Adopted by
Most recently taken up by
- venhdev/skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- tardigrde/obsidian-agentic-chattheir own version, first seen Nov 8, 2026
- kortix-ai/CompanyOStheir own version, first seen Nov 8, 2026
Used with
Projects with it also use worktree-merge, resolve-conflicts and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
leessjuSkillworktree-merge
Squash-merge the current worktree branch into the main branch (or a specified target). Analyzes git history and source code to craft a comprehensive commit message.
Also in 3 projects that use this
ralphkraussSkillresolve-conflicts
Resolve git merge conflicts or re-apply changes from a stale branch onto current main. Use when user says "resolve conflicts", "merge conflicts", "rebase branch", "branch is behind", "re-apply changes", "port branch", or a branch is too far behind main to merge cleanly.
Also in 5 projects that use this
SentrySkille2e
Run E2E tests for Sentry JavaScript SDK test applications
Also in 5 projects that use this
hdcolaSkillpr-comments
Fetch unresolved review comments from a GitHub PR or mark comments as resolved. Use this when managing PR review feedback, checking pending comments, or marking review threads as resolved. Supports GitHub URLs or explicit owner/repo/PR-number from anywhere, or PR number auto-detection from within a git repository.
Also in 3 projects that use this
Google CloudSkillcontributing
Guides the developer workflow for contributing to Race Condition. Use when setting up pre-commit hooks, running tests before a PR, understanding code style requirements, or preparing a contribution.
Also in 3 projects that use this
PydanticSkillcoverage
Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.
Also in 3 projects that use this
Other versions59 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 59
- Significant-Gravitas/AutoGPT★ 188ksame name
- kortix-ai/suna★ 21ksame name
- kortix-ai/CompanyOS★ 21ksame name
- gitkraken/vscode-gitlens★ 10ksame name
- Zipstack/unstract★ 7.4ksame name
- mistralai/mistral-vibe★ 5.3ksame name
- nubjs/nub★ 4.4ksame name
- raine/workmux★ 3ksame name
- astashov/liftosaur★ 775same name
- nudgebee/nudgebee★ 520same name
49 more not listed
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 repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acceptance-criteriaSkill
- aim-higherSkill
- api-designSkill
- architecture-designSkill
- browser-testing-with-devtoolsSkill
- ci-cdSkill
- codebase-designSkill
- codebase-researchSkill
- code-reviewSkill
- code-simplificationSkill
- comprehension-quizSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environment-manifestSkill
- gauntlet-loopSkill
- git-workflowSkill
- handoffSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- literate-explainerSkill
- observability-and-instrumentationSkill
- orchestratorSkill
- performance-optimizationSkill
- plan-breakdownSkill
- preflight-readinessSkill
- project-setupSkill
- pull-requestSkill
- quality-verificationSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-grillingSkill
- spec-reviewSkill
- test-driven-developmentSkill
- to-prdSkill
- using-agent-skillsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
0
Distinctive
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
- Very specific: line 25
Not here: what gets built inside (incremental-implementation), branch naming and history (git-workflow), sorting slices into waves and …
“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Worktree — per-slice isolation mechanism
Purpose
Stage: Implement. Principles 6, 7, 9.
The workspace a slice gets built in: isolated from the checkout the person has open, and starting from a test baseline somebody measured rather than assumed. It emits the workspace itself and no artifact of its own. Two slices sharing one working tree overwrite each other's work, and an unrecorded baseline leaves every later failure unattributable.
When to use / when to skip
- A slice about to be implemented needs a workspace that cannot disturb the person's checkout — a wave of one included; isolation and a known baseline are the point at any size.
- Two pieces of work would otherwise share one working tree.
- Someone asks for a clean branch, an isolated workspace, or a worktree before feature work starts.
- Near-miss: a read-only investigation that commits nothing, or isolation the person declined — work in place, and still take the baseline.
- Not here: what gets built inside (
incremental-implementation), branch naming and history (git-workflow), sorting slices into waves and dispatching them (orchestrator).
Inputs
- the branch name handed at dispatch — helps: it is the branch the caller will look for · without
it: build one from the slice id and title (
git-workflowowns the shape) and mark itderived, rather than invent one in silence. - the slice id, e.g.
OFD-2— helps: names the branch, the directory and the hand-back · without it: read it offSTATE.md,docs/features/<slug>/plan.mdor the prompt, markedderived. - a worktree-directory preference — helps: an explicit instruction outranks whatever the filesystem shows · without it: the priority in Process 2.
- the repository —
git status,git rev-parse— helps: every step below reads it · without it, the directory being no repository: there is no worktree to cut, so say so, work in place, and leavegit inittogit-workflow.
In a person's own checkout, where no branch or directory was handed over, ask once before creating anything in it; with a branch handed, or with nobody there, create it and log the call.
Process
- Detect the isolation you already have before making any. Compare
--git-diragainst--git-common-diras absolute physical paths (git rev-parse --path-format=absolute --git-dir --git-common-dir, orcd "$(git rev-parse --git-dir)" && pwd -Pon each): raw, they differ in any subdirectory of a plain checkout, so every checkout reads as isolated. Differing means you are already in a linked worktree — create nothing, go to step 3; detached there, the branch is the caller's to create at finish time, so say so and carry on. They also differ inside a submodule, whichgit rev-parse --show-superproject-working-treeanswers with a path — a submodule is a plain checkout here. Prefer the host's own worktree primitive — a worktree tool such as
EnterWorktree, a/worktreecommand, a workflow already runningisolation: 'worktree'— since it owns placement, branch creation and retirement together, andgit worktree addon top of one makes state it cannot manage. Only where there is none, cut one with git:- Directory, in priority order: an explicit instruction, an existing project-local
.worktrees/orworktrees/(.worktreeswins when both are there), else.worktrees/at the repository root. git check-ignore -q .worktreesbefore creating a project-local one; not ignored, add the line to.gitignoreand commit that first.git worktree add "$dir/$branch" -b "$branch", then work from that path.- A permission or sandbox denial ends nothing: say the sandbox refused, work in the current directory, carry on to setup.
- Directory, in priority order: an explicit instruction, an existing project-local
- Install what the manifest names —
package.json→npm install,Cargo.toml→cargo build,requirements.txt→pip install -r,pyproject.toml→ the installer its lock file names (poetry.lock,uv.lock,pdm.lock), elsepip install -e .,go.mod→go mod download. No manifest: skip it and name the skip. - Run the suite before a line is written, and record what it said. Green is a clean baseline; red
is a baseline too — name the failing tests as the known-before set, so a later failure is
attributable to the slice. Nobody waits on that: a default with a reason, one
docs/session-log.mdentry, a Decided-for-you row; only the stop list (safety-rails.md) ends a slice. - Hand back the workspace itself, not a summary of it — the shape Outputs & handoff states, every
derivedvalue marked with its source.
Rationalizations
| Rationalization | Reality |
"I'll just git worktree add, it's the safe move" | A worktree cut inside one already there is state the harness can neither see nor retire. |
| "The baseline can wait — the suite's red anyway" | A suite first run after the slice exists cannot separate its failures from the ones already there. |
".worktrees/ is obviously ignored already" | An un-ignored worktree directory is the repository committed into itself. |
"I'll drop it under ~/tmp to keep the repo clean" | Placement improvised per run is placement the caller cannot find afterwards. |
| "Nobody handed me a branch name, so I'll choose a good one" | An unmarked invented name reads downstream as a name somebody signed. |
Red flags
- A second worktree cut inside one that was already there.
- A project-local worktree directory that
git check-ignorewas never run against. - A hand-back with no baseline in it, or a baseline reported from a suite nobody ran.
- A red suite repaired rather than recorded, or a slice held while somebody is asked about it.
- An invented branch name travelling without its
derivedmark. - A
STATE.mdrow or a gate flip written by this pass.
Verification
- One isolated workspace — found there, host-provisioned, or cut with git — sits on the intended branch, or a detached one is reported as externally managed, and nothing is nested inside a worktree.
- A project-local worktree directory is git-ignored, and
git check-ignoreis what says so. - Dependencies are installed, or the skip is named with its reason.
- The suite ran, and its result — the failing set included, where there is one — is in the hand-back by name.
- Every value the report carries that was reconstructed rather than handed over reads
derived.
Outputs & handoff
- The workspace, returned in conversation — absolute path · branch · baseline with its counts and
any failing test names · slice id · each
derivedvalue and its source. Live infrastructure is no file to open later, so this report is the whole hand-off:orchestratordispatches the slice into it, andincremental-implementationbuilds inside it rather than cutting isolation of its own. The run parses this shape, so a change to it changesorchestratorin the same commit. .gitignore— one line naming the worktree directory, committed before the worktree exists; only on the git fallback into a project-local directory.docs/session-log.md— one appended entry per decided-for-you call (a red baseline carried forward, isolation the sandbox refused, a derived branch name), cap 60 words, shaped asstate-schema.mdstates; report each entry's measured length against that cap, and trim an over-cap entry rather than hand it on.- No
STATE.mdrow and no gate flip — provisioning is a sub-step of a slice enteringimpl, and the caller owns the transition (state-schema.md). - Retirement belongs to the caller, once the slice is terminal: the tests verified, the work on its base branch, then the worktree removed and the branch deleted.
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.

