Common issues & troubleshooting → references/troubleshooting.md
Common errors → next best move
"working trees containing submodules cannot be moved or removed" → use --force flag (see references/removing.md)
Stale worktree references after manual deletion → run git worktree prune (see references/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 (see references/placement.md)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: jamesyorke-worktree-agent-skill-worktree-manager3description: Worktree Manager4---5# Worktree Manager67Fast, interactive management of git worktrees with consistent conventions and automatic housekeeping.89## Agent behavior contract10111. Always use `--force` when removing worktrees — repos with submodules will fail without it.122. Always run `git worktree prune` after removing a worktree to clean up stale references.133. When creating subfolder worktrees, ensure `.worktrees/` is in `.gitignore` before creating.144. Never hardcode worktree paths in remove operations — always read from `git worktree list`.155. Default to subfolder placement unless the user explicitly chooses parent folder.166. Default the worktree folder name to the last segment of the branch name.1718## Triage (detect action)1920If the user provided an argument (create, list, or remove), use that action.21If no argument was provided, ask the user which action they want:22- **create** — Create a new worktree with a new branch23- **list** — List all current worktrees24- **remove** — Remove an existing worktree2526Then read the appropriate reference:2728## Routing map2930- **Creating a worktree** → `references/creating.md`31- **Listing worktrees** → `references/listing.md`32- **Removing a worktree** → `references/removing.md`33- **Placement strategies & conventions** → `references/placement.md`34- **Common issues & troubleshooting** → `references/troubleshooting.md`3536## Common errors → next best move3738- **"working trees containing submodules cannot be moved or removed"** → use `--force` flag (see `references/removing.md`)39- **Stale worktree references after manual deletion** → run `git worktree prune` (see `references/removing.md`)40- **Branch already checked out in another worktree** → list worktrees to find which one, remove or use a different branch41- **`.worktrees/` showing up in git status** → add to `.gitignore` (see `references/placement.md`)4243---44> Converted and distributed by [TomeVault](https://tomevault.io/claim/jamesyorke) — claim your Tome and manage your conversions.45<!-- tomevault:4.0:skill_md:2026-04-16 -->
Run npx skillmds@latest add tomevault-io/jamesyorke-worktree-agent-skill-worktree-manager in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Worktree Manager It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.