Use when starting feature work that needs isolation from current workspace. Creates isolated git worktrees with directory selection, safety verification, and baseline testing.
SKILL.md
Git Worktrees
Critical rules
Prefer the bundled script over hand-rolled commands.
Project-local worktree dirs must be git-ignored before use.
Run baseline tests before starting work; ask before proceeding on failure.
Prefer: scripts/create-worktree.sh <branch-name> [base-dir] (from this skill). Exit 2 = not ignored; exit 3 = baseline tests failed.
If the script cannot run or you must deviate: follow directory priority, gitignore check, create branch worktree, project setup, baseline tests (see reference).
Report location and baseline status; only then implement.
Cleanup via git worktree remove (or branch-completion for land/discard options).
Resources
scripts/create-worktree.sh — deterministic create + setup + baseline. Run when creating a worktree; use --help for usage and exit codes.
references/directory-and-setup.md — directory priority, gitignore, manual steps, cleanup. Read when not using the script or on edge cases.
Validation
Directory chosen by priority order
Project-local dir git-ignored
Setup ran; baseline tests pass (or failures reported and approved)
Worktree path reported
Constraints
Skip for trivial one-line fixes on the current branch.