worktree
Skill4 starsChanged 3 months agoMITView on GitHub
Set up or manage worktrees for a Zazz-style repo; use when the user wants the opinionated bare-repo plus sibling-worktree pattern, needs help creating or repairing worktrees and flat branch names, or wants guidance on the Worktrunk workflow used with the Zazz methodology.
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 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.
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 repository21 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- architecture-doc-builderSkill
- confluenceSkill
- conformanceSkill
- doc-checkSkill
- feature-doc-builderSkill
- gh-issueSkill
- gh-stackSkill
- gh-wikiSkill
- handoffSkill
- jiraSkill
- pr-builderSkill
- proposal-builderSkill
- pr-reviewSkill
- psqlSkill
- qa-testingSkill
- spec-builderSkill
- spec-drivenSkill
- sqlcmdSkill
- standard-builderSkill
- zazz-boardSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 24 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
24
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Before doing any work:
- Distinctive: line 25
Read AGENTS.md if it exists and use it as the source of truth for repo-specific worktree, branch, docs-root, and tracking rules.
- Distinctive: line 26
Read the methodology guidance that applies to worktree setup and usage.
- Distinctive: line 29
Read the supporting Worktrunk docs selectively when they matter.
- Distinctive: line 30
Read docs/wt-cheat-sheet.md when the user needs day-to-day Worktrunk commands or quick command selection.
- Distinctive: line 41
Prefer the repo's existing declared pattern when it already matches the methodology.
- Distinctive: line 70
Use this mode when the repo is adopting the opinionated layout for the first time.
- Distinctive: line 81
Use this mode when the layout already exists and the user needs help with:
- Distinctive: line 92
Use this mode when Git worktree state is inconsistent or partially broken.
- Distinctive: line 103
Use this mode when the user wants command examples, operating guidance, or methodology-aware recommendations without filesystem changes.
- Distinctive: line 119
Do not remove a worktree or branch unless the user clearly intends that cleanup.
- Distinctive: line 120
Keep branch names flat when using sibling worktrees.
- Distinctive: line 121
Keep the integration worktree clean.
- Distinctive: line 122
Use Worktrunk for routine worktree management through this skill.
- Distinctive: line 123
If the repo is already using a different but stable layout, explain the tradeoff before trying to reshape it.
- Distinctive: line 140
every active worktree is a sibling directory
- Distinctive: line 147
If the user wants multiple versions, competing implementations, or independent concurrent deliverables, treat them as separate deliverables.
- Distinctive: line 158
Avoid when using sibling worktrees:
- Distinctive: line 184
Use plain git worktree references only as conceptual background or when debugging a lower-level Git issue outside this skill's normal …
- Distinctive: line 218
Before creating or modifying worktrees, confirm:
- Distinctive: line 226
Before cleanup actions, confirm:
- Distinctive: line 234
When a worktree effort goes wrong:
- Distinctive: line 236
Stop forcing the bad path forward.
- Distinctive: line 239
If abandoning, remove or archive the worktree intentionally and create a fresh sibling worktree for the corrected approach.
“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 Skill
Prerequisites
This skill requires:
gitinstalledworktrunkinstalled
Methodology note:
- Worktrees are required by the Zazz methodology.
- Worktrunk is optional at the methodology level.
- This specific skill requires Worktrunk because it assumes the
wtworkflow for setup, switching, cleanup, and day-to-day management.
Startup Sequence
Before doing any work:
- Read
AGENTS.mdif it exists and use it as the source of truth for repo-specific worktree, branch, docs-root, and tracking rules. - Read the methodology guidance that applies to worktree setup and usage.
- In the methodology source repo, that guidance is zazz-methodology.md and docs/worktree-setup.md.
- In consuming repos, use the repo's declared docs root and any equivalent worktree guidance there.
- Read the supporting Worktrunk docs selectively when they matter.
- Read docs/wt-cheat-sheet.md when the user needs day-to-day Worktrunk commands or quick command selection.
- Determine whether the user wants:
- a new opinionated worktree setup
- management of an existing worktree layout
- repair or cleanup of a broken worktree state
- command guidance only
- Inspect current Git reality before making recommendations or changes:
- current branch
- current worktree list
- whether the repo is already using a bare-repo container with sibling worktrees
- whether Worktrunk is installed
- Prefer the repo's existing declared pattern when it already matches the methodology. Do not "upgrade" a repo into the opinionated layout unless the user wants that change.
Purpose
This skill exists to solve two related problems:
- How to establish a clean, opinionated bare-repo container with sibling worktrees.
- How to operate that layout safely over time with a consistent Worktrunk workflow.
Its value is consistency, isolation, and recoverability. It helps teams keep one active deliverable or document effort per branch/worktree in the normal case, avoid naming patterns that fight the filesystem layout, and preserve a clear rollback path when execution goes wrong.
It is also a convenience skill for humans. Most of the underlying work can be done directly by a human with the right commands; this skill exists to make that workflow easier for people who want the methodology behavior without having to remember or type every command themselves.
That includes simple human requests such as "I need to review PR 193" or "create a deliverable worktree for me" where the skill can translate the request into the right Worktrunk flow and explain the next command or action clearly.
Methodology Alignment
- Worktrees are required by the methodology.
- The required model is a bare-repo container with sibling worktrees.
- Durable docs belong in Git; execution artifacts follow the repo's declared active-artifact policy.
- One active deliverable or document effort maps to one branch and one worktree in the normal case.
- A complex initiative may use one shared gh-stack lane worktree for multiple dependent deliverables; each deliverable still maps to its own branch and PR within that lane.
- Flat branch names are preferred because they map cleanly to sibling worktree directory names.
- Worktrunk is optional in the methodology, but required to use this skill.
Interaction Modes
Mode A: New setup
Use this mode when the repo is adopting the opinionated layout for the first time.
Expected outcomes:
- a bare Git directory such as
.bare/ - one integration worktree such as
main/ordev/ - sibling worktrees for deliverables, proposals, or document efforts
- a documented branch/worktree naming convention
Mode B: Ongoing management
Use this mode when the layout already exists and the user needs help with:
- adding a worktree
- listing worktrees
- pruning stale entries
- removing abandoned worktrees
- checking current branch/worktree state
- using the Worktrunk workflow correctly for day-to-day worktree management
Mode C: Recovery / repair
Use this mode when Git worktree state is inconsistent or partially broken.
Examples:
- stale worktree records
- missing directories
- abandoned branches
- branch/worktree name mismatches
Mode D: Guidance only
Use this mode when the user wants command examples, operating guidance, or methodology-aware recommendations without filesystem changes.
What This Skill Produces
Depending on the task, this skill may produce:
- a working bare-repo + sibling-worktree layout
- new worktrees and branches following Zazz naming conventions
- repaired or pruned worktree state
- repo guidance for worktree usage in
AGENTS.mdor related docs when explicitly requested - command examples for the Worktrunk workflow used by this skill
Core Rules
- Inspect before changing anything.
- Prefer non-destructive commands.
- Do not remove a worktree or branch unless the user clearly intends that cleanup.
- Keep branch names flat when using sibling worktrees.
- Keep the integration worktree clean; do not use it as the default place for feature implementation.
- Use Worktrunk for routine worktree management through this skill.
- If the repo is already using a different but stable layout, explain the tradeoff before trying to reshape it.
Required Layout
repo-container/
├── .bare/
├── dev/
├── proposal-role-management-options/
├── feature-rbac/
└── deliverable-zazz-142-role-management-ui/Conventions:
.bare/is the shared Git directory- the container directory is not itself the active checkout
- every active worktree is a sibling directory
- one active effort maps to one branch and one worktree in the normal case
For ordinary deliverables, do not create multiple worktrees for one active deliverable. If several agents are working different tasks from the same deliverable, they coordinate inside that single deliverable worktree.
For a gh-stack initiative, create one dedicated stack-lane worktree and keep every branch in that stack available to that worktree. Each dependent deliverable has its own branch and PR, while the Lead Agent uses gh-stack navigation and rebase commands inside the shared lane. Do not separately check out those stack branches into sibling worktrees: Git prevents gh-stack from navigating to a branch already checked out elsewhere.
If the user wants multiple versions, competing implementations, or independent concurrent deliverables, treat them as separate deliverables. Each gets its own sibling worktree and ordinary PR; do not use a locally managed gh-stack lane for that work.
Branch Naming Guidance
Preferred examples:
feature-rbacproposal-role-management-optionsdocs-reorg-mw1deliverable-zazz-142-role-management-ui
Avoid when using sibling worktrees:
feature/rbacdocs/reorg-mw1deliverable/ZAZZ-142-role-management-ui
Command Guidance
Worktrunk guidance
This skill assumes Worktrunk is installed and uses it for:
- creating worktrees
- switching between active efforts
- keeping worktree naming and lifecycle consistent
Representative commands:
wt -C .bare list
wt -C .bare switch --create feature-rbac
wt -C .bare switch proposal-role-management-options
wt -C .bare switch pr:193
wt -C .bare remove feature-rbacUse plain git worktree references only as conceptual background or when debugging a lower-level Git issue outside this skill's normal workflow.
Example Requests
Example human-to-skill requests:
Use worktree.
Please set up this repo with the required bare-repo plus sibling-worktree layout.Use worktree.
Please create a new deliverable worktree from the integration branch using a flat, worktree-safe branch name.Use worktree.
Please inspect the current worktree state, explain what is broken, and repair it safely.Use worktree.
I don't want to remember the Worktrunk commands. Please tell me exactly what to run to create, switch, and remove worktrees in this repo.Use worktree.
I need to review PR 193.
Please create the review worktree and tell me what to run next.Safety Checks
Before creating or modifying worktrees, confirm:
- the intended base branch
- the intended branch name
- whether the target directory already exists
- whether the worktree is for a deliverable, proposal, feature, or document effort
- whether the repo has a declared integration branch such as
mainordev
Before cleanup actions, confirm:
- whether unmerged or uncommitted work exists
- whether the branch is still needed
- whether the worktree record is stale or genuinely active
Recovery Guidance
When a worktree effort goes wrong:
- Stop forcing the bad path forward.
- Return to the governing proposal, feature requirements document, or deliverable specification.
- Decide whether to repair the same worktree or abandon it.
- If abandoning, remove or archive the worktree intentionally and create a fresh sibling worktree for the corrected approach.
Practical Worktrunk Note
In the workflow assumed by this skill, Worktrunk handles the worktree setup in a way that also carries over the ignored local files the program needs in order to run inside the new worktree. Treat that as part of the expected day-to-day developer ergonomics of the Worktrunk-based approach used here.
When To Escalate
Escalate to the user when:
- the repo's existing layout conflicts with the preferred Zazz pattern
- cleanup would delete or orphan work
- the base branch is unclear
- the branch naming policy is inconsistent with existing team practice
- Worktrunk is not installed but the user is trying to use this skill
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.

