worktree
Skill1 starsChanged 47 days agoMITView on GitHub
Create and prepare a git worktree for a Maestro backlog issue, then pull the issue so the agent is ready to implement; also lists and removes leftover worktrees. Use in the Maestro repo when the user asks, in any language, to start an issue in a worktree or to clean up worktrees. Maestro-specific: a session that already stands in a workspace worktree (~/orca/workspaces/maestro/<name>) uses it; otherwise worktrees live at ~/Projects/maestro/.claude/worktrees/issue<N> on branch feature/issue<N>.
62 other projects use a version of this.
Adopted by
Most recently taken up by
- Vlor999/pr-radartheir own version, first seen Nov 16, 2026
- emadabdulrahim/claude-skillstheir own version, first seen Nov 16, 2026
- ShalomPrinz/go2-dispatchertheir own version, first seen Nov 16, 2026
- oberemokis/skillstheir own version, first seen Nov 15, 2026
- kortix-ai/sunatheir own version, first seen Nov 15, 2026
- Significant-Gravitas/AutoGPTtheir own version, first seen Nov 14, 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
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 4 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
Other versions62 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 62
- Significant-Gravitas/AutoGPT★ 188ksame name
- kortix-ai/CompanyOS★ 21ksame name
- kortix-ai/suna★ 21ksame name
- gitkraken/vscode-gitlens★ 10ksame name
- Zipstack/unstract★ 7.5ksame name
- mistralai/mistral-vibe★ 5.4ksame name
- nubjs/nub★ 4.4ksame name
- raine/workmux★ 3ksame name
- astashov/liftosaur★ 780same name
- nudgebee/nudgebee★ 525same name
52 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 repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- find-duplicate-abstractionsSkill
- verify-in-smokeSkill
- verify-uiSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 49 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create one worktree per backlog issue, prepared and ready to implement.
- Very specific: line 17
Read <N> from the user's message.
- Very specific: line 45
Look for a ## Blocked by section in the body (the to-tickets convention — a list of blocking issues, or "None — can start immediately").
- Distinctive: line 55
If step 4 found an open blocker, stop here and ask Michiel whether to proceed anyway or wait — do not enter the worktree or hand off to …
- Very specific: line 60
Call EnterWorktree with the absolute path, exactly as git -C ~/Projects/maestro worktree list printed it …
“Common” is measured: kept by at least 6 in 10 of the 49 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
Maestro worktree
Create one worktree per backlog issue, prepared and ready to implement. The convention is fixed for this repo.
Anchor repo: ~/Projects/maestro (the primary checkout — run every git command with -C against it, never rely on cwd).
Workspace worktree: ~/orca/workspaces/maestro/<name> on a fimoklei/* branch — orca creates these before the session starts. A session standing in one already has its worktree.
Created worktree: ~/Projects/maestro/.claude/worktrees/issue<N> on branch feature/issue<N> (under the repo's .claude/worktrees/, so EnterWorktree can switch this session into it — paths elsewhere are refused).
Steps
1. Get the issue number
Read <N> from the user's message. If no number is present, ask for it and stop — do not guess.
Done when: you have a single integer <N>.
2. Use the worktree the session stands in, or create one
First check where the session is: git rev-parse --git-common-dir differs from git rev-parse --git-dir when the cwd is a linked worktree of the anchor repo. In that case use it: report path and branch, skip the rest of this step and step 3 (deps are installed by orca; run pnpm install only if node_modules/ is missing), and skip EnterWorktree in step 5. A second worktree for the same issue leaves a stray one behind.
Otherwise fetch, then add the worktree branched off origin's main:
git -C ~/Projects/maestro fetch origin
git -C ~/Projects/maestro worktree add ~/Projects/maestro/.claude/worktrees/issue<N> -b feature/issue<N> origin/mainHandle what already exists — check first with git -C ~/Projects/maestro worktree list:
- Worktree path already exists → skip creation, report it, continue to step 3.
- Branch
feature/issue<N>already exists (but no worktree) → drop-b origin/main, check it out instead:git -C ~/Projects/maestro worktree add ~/Projects/maestro/.claude/worktrees/issue<N> feature/issue<N>.
Done when: git -C ~/Projects/maestro worktree list shows the path on branch feature/issue<N>.
3. Prepare it
A fresh worktree has no node_modules — install deps (the pnpm store is shared, so this is fast):
pnpm -C ~/Projects/maestro/.claude/worktrees/issue<N> installDone when: install exits 0 with node_modules/ present.
4. Pull the issue, check its blockers, and explain it for a product manager
gh issue view <N> --repo fimoklei/maestroLook for a ## Blocked by section in the body (the to-tickets convention — a list of blocking issues, or "None — can start immediately"). The body's own annotation can be stale, so check each referenced issue's live state instead of trusting it:
gh issue view <blocker-N> --repo fimoklei/maestro --json state,stateReason,titleAny blocker still OPEN means starting <N> now risks a conflict with work still in flight — this is exactly the parallel-start collision the check exists to catch. No ## Blocked by section means treat the issue as unblocked; don't invent a dependency that isn't written down.
Explain the issue in two or three sentences a product manager can read aloud: what will change for the user, and how we will know it's done (the acceptance signal). Use plain words — spell out any technical term. If the issue names a spec, board job, or linked doc, note it. Done when: you've stated the blocker status (none / all closed / open — name them) AND you have a plain-language, PM-readable explanation covering the user-facing change and the acceptance signal.
5. Enter the worktree and implement
If step 4 found an open blocker, stop here and ask Michiel whether to proceed anyway or wait — do not enter the worktree or hand off to implement on an unconfirmed conflict risk.
Already standing in a workspace worktree (step 2) → skip the EnterWorktree call; confirm and hand off as below.
Switch this session into the worktree — no manual cd, no new session:
- Call EnterWorktree with the absolute path, exactly as
git -C ~/Projects/maestro worktree listprinted it (/Users/<you>/Projects/maestro/.claude/worktrees/issue<N>). EnterWorktree does not expand~— a literal tilde is joined to the cwd and fails with ENOENT. This session now runs there. (It only enters — it never removes your worktree, since you created it withgit worktree add.) - Confirm in Dutch: worktree path, branch, that deps are installed, the blocker status, and the one-line task summary from step 4.
Then hand off to the implement skill to build the issue — it runs the work through TDD at the agreed seams and keeps the repo's rules. Do not start /tdd directly from here.
Done when: the session's working directory is the worktree and the implement skill has taken over the issue.
Cleaning up
Shipping a branch handles its own worktree (workflow-ship step 9). This is for the leftovers — a worktree
whose issue was abandoned, or whose branch was merged elsewhere.
git -C ~/Projects/maestro worktree list # what still exists
git -C ~/Projects/maestro branch --merged main # which of those branches are already inName only paths that worktree list printed just now; a path from the session preamble or an earlier turn may be gone already. Remove one, always from the anchor repo and never while the session stands inside it (call ExitWorktree with action: "keep" first when the session entered it that way). The worktree goes before the branch: branch -d refuses a branch a worktree still holds.
git -C ~/Projects/maestro worktree remove <path>
git -C ~/Projects/maestro branch -d <branch> # -D only if the PR state says MERGED
git -C ~/Projects/maestro worktree pruneA worktree with uncommitted work is not leftover — report it and ask, never --force.
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.

