Use when starting feature work that needs isolation or before executing implementation plans. Creates isolated git worktrees with safety verification.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Follow this priority order:
Check for .worktrees (preferred) or worktrees in the project root. If found, use that directory.
Check CLAUDE.md or other project guidelines for worktree preferences. If specified, use it.
If no directory is found and no preference is specified, ask the user: "No worktree directory found. Where should I create worktrees?
.worktrees/ (project-local, hidden)~/.config/junie/worktrees/<project-name>/ (global location)
Which would you prefer?"MUST verify directory is ignored before creating worktree:
git check-ignore -q .worktrees
If NOT ignored:
.gitignore.Why critical: Prevents accidentally committing worktree contents to the repository.
git worktree add <path> -b <branch-name>cd <path>Auto-detect and run appropriate setup (e.g., npm install, pip install -e ., uv sync).
.gitignore first.