nx/skills/git-worktrees/SKILL.md
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
npx skillsauth add hellblazer/nexus git-worktreesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Git worktrees create isolated workspaces sharing the same repository.
.worktrees/ (preferred) or worktrees/.worktrees/ (project-local, hidden) or ~/.config/nexus/worktrees/<project>/ (global)Before creating project-local worktrees:
git check-ignore -q .worktrees 2>/dev/null
If NOT ignored: add to .gitignore and commit, then proceed.
project=$(basename "$(git rev-parse --show-toplevel)")
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
[ -f pyproject.toml ] && { command -v uv &>/dev/null && uv sync || pip install -e .; }
[ -f requirements.txt ] && ! [ -f pyproject.toml ] && pip install -r requirements.txt
[ -f package.json ] && npm install
[ -f Cargo.toml ] && cargo build
[ -f go.mod ] && go mod download
Run project test suite. If tests fail: report failures, ask whether to proceed.
Follow project convention. For beads-tracked work: feature/<bead-id>-<description>.
The Agent tool supports isolation: "worktree" natively — it creates a temporary git worktree automatically and cleans up if no changes are made. Prefer this for parallel agent work over manual worktree management.
| Situation | Action |
|---|---|
| .worktrees/ exists | Use it (verify ignored) |
| worktrees/ exists | Use it (verify ignored) |
| Both exist | Use .worktrees/ |
| Neither exists | Check CLAUDE.md → ask user |
| Not ignored | Add to .gitignore + commit |
| Tests fail baseline | Report + ask |
| Parallel agents | Use isolation: "worktree" on Agent tool |
Pairs with: /nx:finishing-branch for merge/PR/cleanup after work is done.
development
Use when critiquing / auditing / reviewing a change set against decision history — tries the review plan library first (catalog lookup → decision-evolution traversal → extract → compare), falls through to /nx:query if nothing matches
documentation
Use when doing design / architecture / planning work that walks from prose (RDRs, docs, knowledge) into the modules implementing a concept
development
Use when surveying the plan library's runtime metrics to propose plans for promotion to a higher scope — advisory-only; dispatches the plan-promote-propose meta-seed (no lifecycle ops — those ship in RDR-079)
business
Use when inspecting plan runtime metrics or enumerating dimension-registry usage — dispatches plan_match with dimensions={verb:plan-inspect}; strategy:default reports per-plan metrics, strategy:dimensions reports registry usage counts