Internal shared skill. Optional create/detect isolation before production implementation. Hosts declare it in
dependenciesand abort if missing.Name note: intentionally not named
using-git-worktrees. Use this name only.
When to offer
After design-approval-gate passes (or auto escape), before non-trivial production edits. Skip offer only when: already isolated for this change, or lean/hotfix in-place 留痕, or user preference already recorded this session.
Loop
- Detect — existing worktree / isolated path for this branch or change?
- Offer — create isolation (prefer agent/platform native workspace tools if available; else
git worktree addunder.worktrees/<branch-slug>/). Ensure.worktrees/is gitignored when creating. - Consent — user declines → continue in current worktree; record decline briefly.
- Lean/hotfix escape —
【工作区隔离跳过】escape=lean-hotfix|user-decline;reason=…
Do not replace design approval. Do not silently destroy isolation mid-run.
Cleanup ownership
Destroy/remove isolated workspaces after verify/archive → feature-branch-closeout optional cleanup. This skill may document the remove command it used for create symmetry.
Forbidden
- Mandatory isolation with no decline path
- Implementing full closeout menu here
- Renaming to
using-git-worktreesin this repository
Integration guide
- Hosts: one-line before execution — load this skill (optional isolation).
- Compose with
feature-branch-closeoutfor cleanup only. - Prefer
user-invocable: false.