worktree-manager
Skill2 starsChanged 9 months agoMITView on GitHub
Git worktree management with safe defaults and flexible placement strategies. Use when users ask to: (1) create a new worktree or work on multiple branches in parallel, (2) list existing worktrees, (3) remove or clean up worktrees, (4) manage worktree placement (subfolder vs sibling directory), or any other git worktree operations.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- kopp0510/claude-ddtheir own version, first seen Oct 5, 2026
- IGTA-Tech/claude-skills-researchtheir own version, first seen Oct 3, 2026
- kanopi/cms-cultivatortheir own version, first seen Jul 7, 2026
- miptah21/skillstheir own version, first seen May 26, 2026
- microsoft/WindowsAppSDKtheir own version, first seen Jan 13, 2026
- Wirasm/worktree-manager-skilltheir own version, first seen Jan 7, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- microsoft/WindowsAppSDK★ 4.7ksame name
- Wirasm/worktree-manager-skill★ 139same name
- kanopi/cms-cultivator★ 17same name
- kopp0510/claude-dd★ 12same name
- IGTA-Tech/claude-skills-research★ 2same name
- miptah21/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.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
5
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
- Very specific: line 11
Always use --force when removing worktrees — repos with submodules will fail without it.
- Distinctive: line 12
Always run git worktree prune after removing a worktree to clean up stale references.
- Very specific: line 13
When creating subfolder worktrees, ensure .worktrees/ is in .gitignore before creating.
- Distinctive: line 14
Never hardcode worktree paths in remove operations — always read from git worktree list.
- Distinctive: line 15
Default to subfolder placement unless the user explicitly chooses parent folder.
- Distinctive: line 16
Default the worktree folder name to the last segment of the branch name.
- Very specific: line 20
If the user provided a sub-command (:create, :list, or :remove), use that action.
- Distinctive: line 21
If no sub-command was provided, ask the user which action they want:
“Common” is measured: kept by at least 6 in 10 of the 5 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
Fast, interactive management of git worktrees with consistent conventions and automatic housekeeping.
Agent behavior contract
- Always use
--forcewhen removing worktrees — repos with submodules will fail without it. - Always run
git worktree pruneafter removing a worktree to clean up stale references. - When creating subfolder worktrees, ensure
.worktrees/is in.gitignorebefore creating. - Never hardcode worktree paths in remove operations — always read from
git worktree list. - Default to subfolder placement unless the user explicitly chooses parent folder.
- Default the worktree folder name to the last segment of the branch name.
Triage (detect action)
If the user provided a sub-command (:create, :list, or :remove), use that action.
If no sub-command was provided, ask the user which action they want:
- :create — Create a new worktree with a new branch (
/worktree-manager create) - :list — List all current worktrees (
/worktree-manager list) - :remove — Remove an existing worktree (
/worktree-manager remove)
Then read the appropriate reference:
Routing map
- Creating a worktree →
references/creating.md - Listing worktrees →
references/listing.md - Removing a worktree →
references/removing.md - Placement strategies & conventions →
references/placement.md - Common issues & troubleshooting →
references/troubleshooting.md
Common errors → next best move
- "working trees containing submodules cannot be moved or removed" → use
--forceflag (seereferences/removing.md) - Stale worktree references after manual deletion → run
git worktree prune(seereferences/removing.md) - Branch already checked out in another worktree → list worktrees to find which one, remove or use a different branch
.worktrees/showing up in git status → add to.gitignore(seereferences/placement.md)
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.

