git-worktree-setup
Installation
SKILL.md
Git Worktree Setup
Start implementation in an isolated workspace without taking ownership of a worktree that the user or harness already manages.
Quick Path
- Read repository instructions and inspect Git state before changing anything.
- Detect whether the current checkout is already a linked worktree, including the submodule exception below. Reuse it when it is.
- If isolation is not already present, create it when the user has asked for a worktree or the active mission already grants isolation. Do not ask again for the same scope; an inspection-only request still does not grant creation.
- Honor an explicit creation mechanism or directory policy. Otherwise create a Git worktree under the repository's
.worktrees/directory. Use native creation when the user asks for harness-managed lifecycle behavior. - Run repository-defined setup and the smallest meaningful baseline check.
- Report the path, branch state, creation mechanism, and validation evidence.
Detect Existing Isolation
Resolve both paths rather than comparing Git's sometimes-relative output: