git-worktree
Installation
SKILL.md
Git Worktree
Use the bundled CLI as the state authority. Read repository instructions and status first.
Lifecycle
uv run python <skill-root>/scripts/git_worktree.py --repo <repo> owner-status
uv run python <skill-root>/scripts/git_worktree.py --repo <repo> create --branch <branch> [--base <base>] [--path <path>] [--temporary]
uv run python <skill-root>/scripts/git_worktree.py --repo <worktree> owner-finish --validated-source-head <exact-head>
For maintenance, run maintenance-audit --target <branch> --all, review only review_required, then submit evidence-backed decisions to maintenance-run.
For triage, run conflict-preview --target <branch> --all to dry-run each unmerged branch against the target, then follow references/branch-triage.md to merge the valuable, retain the merged, delete only the unmergeable and worthless after explicit user confirmation, and summarize conflicts for the user.
Safety
- Never claim completion for dirty source, detached, conflicted, moved, unvalidated, main, or blocked state. A merge target may contain only non-overlapping, uncommitted
docs/drafts. - Re-audit after rescue, merge, deletion, movement, or state changes; validate the target before removing a source.
- Protect completion and no-auto-merge refs. Never push, alter remote refs, rebase, squash, stash, force-remove, or change normal tags.
- Stage or commit another owner’s changes only with that owner’s authority.