worktree
Installation
SKILL.md
/worktree
Create a git worktree for the current repo (named repo-<slug>, placed at <repo-parent>/repo-<slug>), enter an existing worktree, list them, or remove one. Worktrees let the agent or user work on a separate branch in parallel without touching the current checkout.
When to use
- User wants to start parallel work on a branch without losing in-progress state on the current checkout.
- User says "/worktree", "make a worktree for X", "branch off into a worktree", "spin up a sandbox".
- User wants to switch into ("hop into", "enter") an existing worktree to continue prior work.
Do NOT use for plain branch switching (git switch -c) when there is no in-progress work to preserve — a worktree is heavier than a branch.
Subcommands
If the user did not name one, infer:
- create → mentions "new", "make", "spin up", or names a branch/slug that does not match an existing worktree.
- enter → mentions "hop", "enter", "go to", or names a slug/path that matches an existing worktree.
- list → mentions "list", "show", "what worktrees".
- remove → mentions "remove", "delete", "tear down".