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.
Safety
- Never claim completion for dirty, detached, conflicted, moved, unvalidated, main, or blocked state.
- 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.
Read references/owner-delivery.md, maintenance.md, and safety.md when completing, maintaining, or recovering work.
Report
Include exact source/target HEADs, ownership and delivery state, refs, validation, decisions, retained or removed worktrees, blockers, and untouched remote refs.
1---2name: git-worktree3description: Manage local Git worktrees and branches with exact-HEAD safeguards; never publish or rewrite remote state.4---5# Git Worktree67Use the bundled CLI as the state authority. Read repository instructions and status first.89## Lifecycle10```bash11uv run python <skill-root>/scripts/git_worktree.py --repo <repo> owner-status12uv run python <skill-root>/scripts/git_worktree.py --repo <repo> create --branch <branch> [--base <base>] [--path <path>] [--temporary]13uv run python <skill-root>/scripts/git_worktree.py --repo <worktree> owner-finish --validated-source-head <exact-head>14```15For maintenance, run `maintenance-audit --target <branch> --all`, review only `review_required`, then submit evidence-backed decisions to `maintenance-run`.1617## Safety18- Never claim completion for dirty, detached, conflicted, moved, unvalidated, main, or blocked state.19- Re-audit after rescue, merge, deletion, movement, or state changes; validate the target before removing a source.20- Protect completion and no-auto-merge refs. Never push, alter remote refs, rebase, squash, stash, force-remove, or change normal tags.21- Stage or commit another owner’s changes only with that owner’s authority.2223Read `references/owner-delivery.md`, `maintenance.md`, and `safety.md` when completing, maintaining, or recovering work.2425## Report26Include exact source/target HEADs, ownership and delivery state, refs, validation, decisions, retained or removed worktrees, blockers, and untouched remote refs.