worktree-manager
Original:🇺🇸 English
Translated
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.
1installs
Added on
NPX Install
npx skill4agent add jamesyorke/worktree-agent-skill worktree-managerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Worktree Manager
Fast, interactive management of git worktrees with consistent conventions and automatic housekeeping.
Agent behavior contract
- Always use when removing worktrees — repos with submodules will fail without it.
--force - Always run after removing a worktree to clean up stale references.
git worktree prune - When creating subfolder worktrees, ensure is in
.worktrees/before creating..gitignore - 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 an argument (create, list, or remove), use that action.
If no argument was provided, ask the user which action they want:
- create — Create a new worktree with a new branch
- list — List all current worktrees
- remove — Remove an existing worktree
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 flag (see
--force)references/removing.md - Stale worktree references after manual deletion → run (see
git worktree prune)references/removing.md - Branch already checked out in another worktree → list worktrees to find which one, remove or use a different branch
- showing up in git status → add to
.worktrees/(see.gitignore)references/placement.md