git-worktrees
Installation
SKILL.md
Git Worktrees
Purpose
Ensure implementation happens in an isolated workspace, protecting the user's current checkout. Detect existing isolation first, prefer native harness tools, and fall back to git worktree — never fight the harness, never eyeball detection.
Workflow
- Detect existing isolation — run the checks, never assume:
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
git rev-parse --show-superproject-working-tree 2>/dev/null # submodule guard