worktrunk
Skill5 starsChanged 8 months agoMITView on GitHub
MUST USE when coordinating parallel AI coding agents with worktrunk (`wt`), or when creating, merging, pruning, and cleaning git worktrees. Covers worktree creation and switching, sub-agent prompt scaffolding, merge order, validation, hooks, and cleanup. Do NOT use for plain git tasks that do not involve worktrees or parallel agent workflows.
- Installs packages
6 other projects use a version of this.
Adopted by
Most recently taken up by
- delorenj/skillstheir own version, first seen Nov 7, 2026
- max-sixty/worktrunktheir own version, first seen Nov 5, 2026
- LuisUrrutia/skillstheir own version, first seen Oct 18, 2026
- goern/forgejo-mcptheir own version, first seen Oct 9, 2026
- Spoon94/skill-vaulttheir own version, first seen Aug 5, 2026
- gmdotdev/skillstheir own version, first seen Feb 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- max-sixty/worktrunk★ 12ksame name
- goern/forgejo-mcp★ 152same name
- delorenj/skills★ 17same name
- Spoon94/skill-vault★ 5same name
- gmdotdev/skills★ 2same name
- LuisUrrutia/skills★ 2same name
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- charm-vhsSkill
- cloud-foundation-fabricSkill
- d2Skill
- duckdbSkill
- github-profile-architectSkill
- jqSkill
- opencode-devSkill
- playwright-cliSkill
- skill-crawlerSkill
- skill-registry-syncSkill
- tech-writerSkill
- terminal-ui-engineerSkill
- terraformSkill
- writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 7 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Read references/configuration.md when the user needs custom wt.toml configuration, path templates, hooks, or LLM commit generation.
- Distinctive: line 66
Ensure main is clean, up to date, and validated before spawning agent branches.
- Distinctive: line 69
Create one worktree per ownership slice.
- Very specific: line 71
Use short, scope-based names such as terminal-selection, judge-semantics, or session-history.
- Distinctive: line 83
Run the repo's build or test command in the worktree that changed.
- Very specific: line 102
Use wt switch --create <branch> to create a new branch and worktree from the current default branch.
- Very specific: line 108
Use wt list to inspect active worktrees, ahead or behind state, and whether a branch is already integrated into the default branch.
- Very specific: line 113
Use wt merge inside an agent worktree when you want worktrunk to handle the full squash, rebase, merge, and cleanup flow.
- Very specific: line 127
Use wt remove from a safe worktree, usually main, when you want to purge completed branches and their worktrees.
- Very specific: line 135
Use --force when untracked build artefacts would otherwise block removal.
- Very specific: line 139
Use wt step prune for bulk cleanup after a merge wave.
- Distinctive: line 148
When coordinating sub-agents, always define:
- Distinctive: line 156
Do not ask multiple agents to edit the same hot files unless the user explicitly accepts integration overhead.
- Very specific: line 161
Prefer wt merge when the branch is clearly bounded and conflict risk is low.
- Distinctive: line 162
Prefer a dedicated integration worktree when multiple agents touched adjacent layers and the next step depends on reconciling them together.
- Very specific: line 164
If the current worktree itself needs to be deleted, switch to main first or run wt remove <branch> from another worktree.
- Distinctive: line 166
Keep worktree names stable across prompts, commits, and merge notes.
- Very specific: line 167
After a merge wave, rerun wt list to confirm only the intended worktrees remain.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Worktrunk skill
Worktrunk (wt) is the right layer when the user wants parallel coding work split
across multiple git worktrees and then merged back together cleanly. Use it for
branch creation, switching, integration, cleanup, and disciplined sub-agent
orchestration.
Quick start
# Install and enable shell integration
brew install worktrunk
wt config shell install
# Create a new worktree from the default branch
wt switch --create feature-auth
# See all worktrees and their status
wt list
# Merge the current worktree back into the default branch
wt merge
# Remove merged worktrees from a safe worktree such as main
wt remove feature-auth --foreground -yShell integration is required. Without wt config shell install, wt switch
prints the path but does not move the shell into the worktree.
When to read references
Read references/configuration.md when the user needs
custom wt.toml configuration, path templates, hooks, or LLM commit generation.
Read references/agent-orchestration.md when the user wants to:
- spawn multiple coding agents in parallel;
- generate consistent branch-specific prompts;
- define ownership boundaries and validation commands;
- merge work back in a controlled order; or
- clean up completed worktrees after integration.
Recommended multi-agent workflow
Stabilise the default branch.
Ensure
mainis clean, up to date, and validated before spawning agent branches. Record the baseline commit if the user wants exact reproducibility.Create one worktree per ownership slice.
Use short, scope-based names such as
terminal-selection,judge-semantics, orsession-history. Prefer module ownership over vague labels likefixesormisc.Give every agent a bounded prompt.
Each agent should receive the same shared operator preamble plus a narrow ownership list, a concrete task, and explicit success criteria. Use the orchestration reference for prompt templates.
Validate inside each worktree.
Run the repo's build or test command in the worktree that changed. If the repo has multiple runtimes, require secondary validation when the agent touches those layers.
Integrate one branch at a time.
Merge foundational branches first, then higher-level UI or orchestration work. If conflicts are likely, use a dedicated integration worktree instead of merging directly into the default branch.
Clean up aggressively.
Once work is integrated and pushed, remove completed worktrees so the next batch starts from a clean state.
Core commands
wt switch
Use wt switch --create <branch> to create a new branch and worktree from the
current default branch. Use wt switch <branch> to jump back into an existing
one.
wt list
Use wt list to inspect active worktrees, ahead or behind state, and whether a
branch is already integrated into the default branch.
wt merge
Use wt merge inside an agent worktree when you want worktrunk to handle the
full squash, rebase, merge, and cleanup flow. This is the simplest path when the
branch is self-contained.
Useful variants:
wt merge --no-remove
wt merge --no-squash
wt merge --no-ffwt remove
Use wt remove from a safe worktree, usually main, when you want to purge
completed branches and their worktrees.
wt remove branch-a branch-b --foreground -y
wt remove feature-x --force --foreground -yUse --force when untracked build artefacts would otherwise block removal.
wt step prune
Use wt step prune for bulk cleanup after a merge wave.
wt step prune --dry-run
wt step prunePrompt discipline
When coordinating sub-agents, always define:
- the shared operator preamble;
- owned files or modules;
- one concrete task per agent;
- repo-specific validation commands; and
- a completion report format.
Do not ask multiple agents to edit the same hot files unless the user explicitly accepts integration overhead.
Practical rules
- Prefer
wt mergewhen the branch is clearly bounded and conflict risk is low. - Prefer a dedicated integration worktree when multiple agents touched adjacent layers and the next step depends on reconciling them together.
- If the current worktree itself needs to be deleted, switch to
mainfirst or runwt remove <branch>from another worktree. - Keep worktree names stable across prompts, commits, and merge notes.
- After a merge wave, rerun
wt listto confirm only the intended worktrees remain.
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.

