worktree
Skill122 starsChanged 3 months agoMITView on GitHub
Use when the user requests a Git worktree or a development task needs an isolated directory to create, find, reuse, hand off, or clean up. Exclude read-only work, non-Git repositories, and tasks that need no separate branch or directory.
40 other projects use a version of this.
Adopted by
Most recently taken up by
- Significant-Gravitas/AutoGPTtheir own version, first seen Nov 18, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- ShalomPrinz/go2-dispatchertheir own version, first seen Oct 4, 2026
- jantichy/claudetheir own version, first seen Oct 2, 2026
- domengabrovsek/agent-configtheir own version, first seen Oct 2, 2026
- craigcossairt/trellistheir own version, first seen Oct 1, 2026
Used with
Projects with it also use coverage, backlog and 9 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.
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
vertz-devSkillbacklog
Manages deferred/blocked work items as GitHub Issues with labels and blocker tracking
Also in 3 projects that use this
johnlindquistSkilldiagram
Maintain and synchronize Unified Impact Diagrams following Diagram Driven Development (DDD) methodology. Create, update, and manage diagrams that connect user value to technical implementation.
Also in 4 projects that use this
SentrySkille2e
Run E2E tests for Sentry JavaScript SDK test applications
Also in 3 projects that use this
nicolasestremSkillcleanup
Clean up code, remove dead code, and optimize project structure
Also in 3 projects that use this
MongoDBSkilljira
Use this skill for any Jira operation in the DOCSP project — creating, viewing, searching, updating, transitioning, commenting on, or linking tickets. Also handles follow-up ticket creation to manage scope creep. TRIGGER when: user mentions a DOCSP-XXXXX ticket number or any Jira ticket URL; user asks to view, open, check, update, transition, close, comment on, link, or search tickets; user references \"the ticket\", \"the Jira\", or \"open a ticket\". SKIP: GitHub issues; non-Jira platforms; questions unrelated to ticket operations.
Also in 3 projects that use this
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 40
- Significant-Gravitas/AutoGPT★ 188ksame name
- kortix-ai/suna★ 20ksame name
- Zipstack/unstract★ 7.3ksame name
- mistralai/mistral-vibe★ 5ksame name
- nudgebee/nudgebee★ 398same name
- microsoft/service-fabric-dotnet★ 277same name
- forrestchang/worktree-workflow★ 108same name
- Rune-kit/rune★ 88same name
- oprogramadorreal/optimus-claude★ 75same name
- DGouron/review-flow★ 44same name
30 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-agent-codebaseSkill
- campfireSkill
- cli-operationsSkill
- diagnosing-bugsSkill
- grill-duoSkill
- grill-duo-with-docsSkill
- member-studioSkill
- memory-stewardshipSkill
- review-duoSkill
- tddSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 35 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use one reusable branch and worktree per logical change.
- Distinctive: line 10
Do not silently stash, move uncommitted work, overwrite directories, or force-delete branches or worktrees.
- Distinctive: line 21
Read relevant repository instructions.
- Distinctive: line 23
If uncommitted changes must move, ask the user to choose committing, making a patch, or staying in the current worktree.
- Distinctive: line 27
Only when repository or user rules require governance documents to enter the mainline before coding:
- Distinctive: line 30
Use its existing clean checkout and synchronize according to repository rules without overwriting other work.
- Distinctive: line 35
If permissions or dirty state prevent this safely, report the obstacle before coding.
- Very specific: line 39
Prefer user-specified names and repository conventions.
- Very specific: line 43
Use the specified directory or repository convention.
- Distinctive: line 52
Stop for an existing unregistered target directory or unresolved ambiguous target.
- Distinctive: line 56
Check the actual root, branch, base SHA, worktree status, and required governance ancestry.
- Distinctive: line 62
Follow repository rules for merged or abandoned worktrees.
“Common” is measured: kept by at least 6 in 10 of the 35 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
Git Worktree
Use one reusable branch and worktree per logical change. Follow repository and user rules. Run later commands and edits in the selected worktree. Respond in the user's language.
Do not silently stash, move uncommitted work, overwrite directories, or force-delete branches or worktrees.
Inspect and reuse
git rev-parse --show-toplevel
git status --short --branch
git worktree list --porcelain
git branch --listRead relevant repository instructions. Determine whether the current worktree fits the task, the target branch is checked out elsewhere, an existing branch/directory can be reused, uncommitted work is required, or governance documents must precede coding.
If uncommitted changes must move, ask the user to choose committing, making a patch, or staying in the current worktree. Do not transport them silently.
Conditional governance baseline
Only when repository or user rules require governance documents to enter the mainline before coding:
- Identify the actual mainline; do not assume
main. - Use its existing clean checkout and synchronize according to repository rules without overwriting other work.
- Change only required governance documents, run documentation gates, and commit them separately on the mainline.
- Record the immutable commit SHA as the coding baseline.
- Bring an empty coding worktree to that baseline. If it already contains code, integrate by the repository's merge rules without rewriting history.
If permissions or dirty state prevent this safely, report the obstacle before coding.
Select branch, base, and directory
Prefer user-specified names and repository conventions; otherwise use a short task slug with feat/, fix/, docs/, chore/, or work/ as appropriate.
Choose the base in this order: required governance commit, explicit user choice, repository rule, related branch, then current HEAD. Clarify a choice that materially changes the work. Fetch only when requested for freshness or required by repository rules; disclose an offline baseline.
Use the specified directory or repository convention; otherwise a sibling <repo>-<slug>. Use .worktrees/ only under an existing ignored convention; do not edit .gitignore merely to create one.
Reuse in order:
- The current worktree if suitable.
- The existing worktree attached to the target branch.
- An existing unattached branch:
git worktree add <path> <branch>. - A new branch:
git worktree add -b <branch> <path> <base>.
Stop for an existing unregistered target directory or unresolved ambiguous target; do not delete or overwrite it.
Verify and hand off
Check the actual root, branch, base SHA, worktree status, and required governance ancestry. Run installs, builds, tests, and edits in that root. Do not copy secrets, runtime state, caches, or uncommitted changes from another worktree.
Record absolute path, branch, base, governance commit if applicable, status (active, ready, merged, or abandoned), changes, validation, and next action in the task, issue, handoff, or final report. Follow-up sessions reuse that checkout; a new session alone does not justify a new branch or worktree.
Clean up
Follow repository rules for merged or abandoned worktrees; otherwise clean up only when requested. Verify the worktree is clean, then use git worktree remove, safe branch deletion with git branch -d, and git worktree prune as appropriate. Preserve unmerged, dirty, or uncertain work. Force operations require explicit authorization.
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.

