worktree-manager
Skill2 starsChanged 2 months agoMITView on GitHub
Manage Git worktrees. Use when asked to create/switch/list/merge/remove worktrees, to keep multiple branches in parallel directories, or to clean up worktrees safely during development.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- kanopi/cms-cultivatortheir own version, first seen Nov 1, 2026
- kopp0510/claude-ddtheir own version, first seen Oct 30, 2026
- alessiogarifo92/claude-skillstheir own version, first seen Oct 25, 2026
- chmouel/lazyworktreetheir own version, first seen Oct 8, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
- TarasShyn/skillstheir own version, first seen Aug 30, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- microsoft/WindowsAppSDK★ 4.7ksame name
- chmouel/lazyworktree★ 315same name
- Wirasm/worktree-manager-skill★ 138same name
- kanopi/cms-cultivator★ 17same name
- kopp0510/claude-dd★ 12same name
- TarasShyn/skills★ 5same name
- IGTA-Tech/claude-skills-research★ 2same name
- miptah21/skills★ 2same name
- vlting/claude-skills★ 2same name
- alessiogarifo92/claude-skills★ 0same 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 repository34 other files it gives its agents.
- agent-native-redesignSkill
- assess-source-project-fitSkill
- brainstormingSkill
- coaching-engineSkill
- codex-skill-creatorSkill
- cubox-researchSkill
- dev-browserSkill
- diffusion-mapSkill
- exa-web-searchSkill
- executing-plansSkill
- general-skill-creatorSkill
- harnessSkill
- i-diagramSkill
- memosSkill
- merge-and-rebaseSkill
- paseo-relaySkill
- plan-coachingSkill
- plan-meSkill
- plan-reviewSkill
- problem-framingSkill
- prove-itSkill
- pruneSkill
- raise-ambitionSkill
- readwise-researchSkill
- report-coachingSkill
- report-meSkill
- report-reviewSkill
- seeSkill
- shapeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- use-remote-skillSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 10 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
10
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
- could be automatic: a setting could enforce it
- Very specific: line 10
Use Worktrunk (wt) as the single interface for Git worktree management: create/switch worktrees, list global status, merge back to the …
- Very specific: line 16
Do not preflight-check wt on every invocation.
- Very specific: line 18
Ask the user: "I can't run wt because it isn't installed.
- Distinctive: line 19
If the user says yes:
- Very specific: line 20
Run the installer script: scripts/install_worktrunk.sh
- Distinctive: line 25
Do not install shell integration without confirmation (it edits shell rc files):
- Very specific: line 26
Ask before running: wt config shell install
- Very specific: line 30
Before wt merge / wt remove / anything with --force / -D:
- Distinctive: line 47
If the user gave a branch/worktree name:
- Distinctive: line 49
If the user asked to create a new branch/worktree:
- Distinctive: line 50
Default (this repo): create the worktree by copying the current working state from the current worktree, so experiments are isolated but …
- Distinctive: line 53
If the user gave no name:
- Distinctive: line 57
Do not invent naming conventions.
- Very specific: line 58
If wt switch does not change directories in the current shell, suggest enabling shell integration (with confirmation) via wt config shell …
- Very specific: line 60
If the user explicitly wants a completely clean worktree (skip all hooks/copy behavior), pass --no-verify (e.g.
- Distinctive: line 67
If the user needs machine-readable output, use the JSON option supported by Worktrunk (if available in their version) and paste only the …
- Very specific: line 75
If any flag/target behavior is unclear, check: wt merge --help
- Distinctive: line 77
If the user wants to keep the worktree, use the appropriate Worktrunk flag (only if requested) to prevent removal.
- Very specific: line 80
Do not run wt merge if the tree is dirty unless the user explicitly tells you to proceed and how to handle changes.
- Distinctive: line 89
Only use destructive options if the user explicitly asks:
- Very specific: line 92
If flags/behavior are unclear, check: wt remove --help
“Common” is measured: kept by at least 6 in 10 of the 9 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 Manager
Overview
Use Worktrunk (wt) as the single interface for Git worktree management: create/switch worktrees, list global status, merge back to the default branch, and remove worktrees safely. Prefer safe operations; never use destructive flags unless the user explicitly requests them.
Workflow Decision Tree
Recovery: If a wt command fails because wt is missing
Do not preflight-check wt on every invocation. Instead, attempt the requested wt command. If it fails with an error like "command not found: wt" (or equivalent), then:
- Ask the user: "I can't run
wtbecause it isn't installed. Should I install Worktrunk now (recommended)?" - If the user says yes:
- Run the installer script:
scripts/install_worktrunk.sh- Example:
bash <SKILL_DIR>/scripts/install_worktrunk.sh
- Example:
- Verify:
wt --version - Re-run the original
wt ...command.
- Run the installer script:
- Do not install shell integration without confirmation (it edits shell rc files):
- Ask before running:
wt config shell install
- Ask before running:
Step 1: Always run guardrails before merge/remove
Before wt merge / wt remove / anything with --force / -D:
- Confirm repo context:
git rev-parse --show-toplevelpwd
- Confirm working tree cleanliness (if dirty, ask what to do; do not proceed):
git status --porcelain
- Confirm the current worktree and branch:
git branch --show-currentwt list(use as the global source of truth for other worktrees)
Step 2: Handle the user request via the matching workflow
A) Create or switch worktrees (most common)
Goal: "Put branch X into its own directory and switch into it."
- If the user gave a branch/worktree name:
wt switch <name>
- If the user asked to create a new branch/worktree:
- Default (this repo): create the worktree by copying the current working state from the current worktree, so experiments are isolated but start "warm" (deps + uncommitted changes).
- Implement with Worktrunk by creating from the current worktree as the base (use
--base=@unless the user explicitly wants a clean base). - Run:
wt switch --create <name> --base=@
- If the user gave no name:
- Show options with
wt listand ask which one to switch to.
- Show options with
Notes:
- Do not invent naming conventions; follow the repo's existing pattern (or ask).
- If
wt switchdoes not change directories in the current shell, suggest enabling shell integration (with confirmation) viawt config shell install. - This repo has Worktrunk hooks in
.config/wt.toml(notablypost-create) that may copy the base worktree's working directory into a new worktree. - If the user explicitly wants a completely clean worktree (skip all hooks/copy behavior), pass
--no-verify(e.g.wt switch --create <name> --base=@ --no-verify).
B) List and diagnose global worktree state
Goal: "What worktrees exist and which ones are dirty/out-of-date?"
wt list- If the user needs machine-readable output, use the JSON option supported by Worktrunk (if available in their version) and paste only the relevant fields.
C) Merge the current worktree branch back and clean up
Goal: "Finish this branch and get back to the default branch cleanly."
- Run guardrails (Step 1).
- Confirm intent (quickly): target branch is the default branch; merge strategy is Worktrunk defaults unless the user asked otherwise.
- If any flag/target behavior is unclear, check:
wt merge --help - Run:
wt merge - If the user wants to keep the worktree, use the appropriate Worktrunk flag (only if requested) to prevent removal.
Rules:
- Do not run
wt mergeif the tree is dirty unless the user explicitly tells you to proceed and how to handle changes.
D) Remove worktrees safely
Goal: "Delete a worktree directory safely without losing uncommitted work."
- Run guardrails (Step 1).
- Prefer safe removal:
wt remove <name>
- Only use destructive options if the user explicitly asks:
--force(can discard untracked files depending on tool behavior)-D(force-delete an unmerged branch/worktree)
- If flags/behavior are unclear, check:
wt remove --help
Installation Notes (read only when needed)
See references/install.md for platform-specific notes. Use scripts/install_worktrunk.sh to install after the user confirms.
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.

