worktree
Skill3 starsChanged 21 days agoMITView on GitHub
Spin up a parallel git worktree (own directory, own branch off the integration branch) so a second Claude Code session can advance a second track concurrently; also lists and safely removes worktrees. Use when the user types /worktree, asks for a parallel worktree/track/session, or wants to work two branches at once.
- Reads credentials
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 repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- braintrustSkill
- demoSkill
- explain-prSkill
- full-output-enforcementSkill
- gateSkill
- impeccableSkill
- sanad-implementationSkill
- sanadSkill
- shipSkill
- specSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
3
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
- Distinctive: line 16
Guardrail check first — disjoint tracks only: Ask (or infer from the stated task) what the new track will touch:
- Very specific: line 18
EF migrations / model snapshot: if ANY existing branch or worktree already carries a pending migration or touches *ModelSnapshot.cs, a …
- Distinctive: line 36
Every session working in a worktree reads the board FIRST, before touching code.
- Distinctive: line 40
One schema branch at a time: Only one track may add EF migrations or touch the model snapshot until it merges.
“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
<!-- Author: Eng. Mohammed Almutairi - Developzone.net -->/worktree — parallel tracks via git worktrees
Create, list, or remove sibling worktrees so two Claude Code sessions can work the same repo on different branches without colliding. The point is throughput: PRs merge fast, so two disjoint tracks ≈ 2× delivery. The guardrails below exist because the repo shares one schema snapshot, one dev container, and one local DB — read them before creating anything.
Usage: /worktree <track-name> (create) · /worktree list · /worktree remove <track-name>
Create — /worktree <track-name>
- Guardrail check first — disjoint tracks only. Ask (or infer from the stated task) what the new track will touch:
- The status board (see below): any task already marked In progress is owned by another terminal — the new track must not overlap it.
- EF migrations / model snapshot: if ANY existing branch or worktree already carries a pending migration or touches
*ModelSnapshot.cs, a second schema track is BLOCKED — the snapshot merge-conflicts miserably. One schema branch at a time; say so and propose a non-schema track instead. - Same files/services as an in-flight track → warn about merge-conflict risk and suggest a more disjoint split (e.g. backend track A, frontend track B).
- Fresh base.
git fetch origin, then discover the integration branch —staging→develop→dev, first that exists (nevermain/master; if onlymainexists, STOP and ask, per CLAUDE.md). - Create. Sibling directory next to the repo root, branch named with the repo's convention (default
feat/<track-name>):git worktree add ../<repo>-<track-name> -b feat/<track-name> origin/<integration> - Claim the task on the status board. Mark the new track's task
In progress — <branch>on the board so other terminals see it's taken. - Report — the user opens the second session themselves; tell them exactly how:
- Path of the new worktree and its branch.
- Open a new terminal/window there and run
claude(or open the folder in the IDE). - Remind: untracked local files (
.env, local overrides) do NOT come along — copy them manually only if that track truly needs them.
The status board — how terminals know about each other
Sessions in different terminals do NOT see each other; the project's work-tracker MD file is the coordination board (EduQuest: EduQuest.Api\Doc\New Technology\PAGES-STATUS.md). The convention:
In progress — <branch>on a task = a terminal owns it. Other terminals must not touch that task or its files.- Claim before you start, update when you merge (In progress → Done, from the merging terminal).
- Single source of truth = the copy in the MAIN checkout (the original repo directory, e.g.
<your repos folder>\EduQuest\...), read/updated by absolute path from every worktree. Each worktree has its own stale copy of this tracked file — never use the local copy for coordination. - Every session working in a worktree reads the board FIRST, before touching code.
The two standing guardrails (repeat them in the report)
- One schema branch at a time. Only one track may add EF migrations or touch the model snapshot until it merges.
- One app-runner at a time. The dev container bind-mounts ONE checkout and there is one local DB / one app port. Only one worktree runs the app or the container; the other track verifies at the unit-test rung on the host (isolated artifacts, e.g.
dotnet test --artifacts-path <scratch>) and gets its live smoke after merging.
Each track = its own PR to the integration branch, its own /gate, its own /ship. Never share a branch between worktrees.
List — /worktree list
git worktree list plus, per worktree: current branch, dirty/clean (git -C <dir> status --porcelain), and ahead/behind the integration branch. Flag any worktree whose branch has already merged — it's cleanup-ready.
Remove — /worktree remove <track-name>
Removal is destructive — check before acting:
- Dirty working tree (
git -C <dir> status --porcelainnon-empty) → STOP, show what's uncommitted, ask for explicit confirmation. Never--forcesilently. - Branch not merged into the integration branch → say so and confirm the branch should be kept (remove the worktree, keep the branch) or deleted too.
- Then:
git worktree remove ../<repo>-<track-name>,git branch -d feat/<track-name>only if merged, andgit worktree prune.
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.

