[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72XSK87MGS4TPV5DWCTN4BV":3,"skill-same:01M72XSK87MGS4TPV5DWCTN4BV":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":50},"01M72XSK87MGS4TPV5DWCTN4BV","finalize",null,"Use when the user says \"finalize\", \"\u002Ffinalize\", \"prepare this branch for main\", \"clean up history\", \"squash the branch\", or landing a branch on `main`. Rewrites Checkpoint working-phase commits into clean Conventional Commits before fast-forward merge. Flags: `--squash-all`, `--dry-run`.","grimoire-rs\u002Fgrimoire","grimoire-rs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F298895348?v=4","01M72XK7XKYKMET2MMHCAQ3X6C","01M72XK7Y647QCPS3Z02ZYTJTT",15,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffinalize\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: finalize\ndescription: 'Use when the user says \"finalize\", \"\u002Ffinalize\", \"prepare this branch for main\", \"clean up history\", \"squash the branch\", or landing a branch on `main`. Rewrites Checkpoint working-phase commits into clean Conventional Commits before fast-forward merge. Flags: `--squash-all`, `--dry-run`.'\nuser-invocable: true\ndisable-model-invocation: false\nargument-hint: \"[--squash-all | --dry-run]\"\ntriggers:\n  - \"finalize\"\n  - \"prepare this branch\"\n  - \"prepare the branch\"\n  - \"clean up history\"\n  - \"squash the branch\"\n---\n\n# \u002Ffinalize — Prepare Branch for Fast-Forward Merge\n\nRewrites commits in `main..HEAD` so branch fast-forwards onto `main` as clean Conventional Commits sequence. **Rebasing phase** of two-phase branch workflow — see [workflow-git.md](..\u002F..\u002Frules\u002Fworkflow-git.md) for full model.\n\nSibling `\u002Fcommit` skill handles **working phase** (save progress during dev). `\u002Ffinalize` takes messy result, produces what lands in main-branch changelog.\n\n## When To Use\n\n| Situation | Use |\n|---|---|\n| Branch has multiple `Checkpoint` commits | `\u002Ffinalize` |\n| Branch has working-phase bundles (\"chore(claude): bundle skill + rules + agents\") | `\u002Ffinalize` |\n| Rebasing branch onto current `main` before fast-forward | `\u002Ffinalize` |\n| Branch is one changelog entry with noise between | `\u002Ffinalize --squash-all` |\n| Already one-concern-per-commit and rebased | don't — fast-forward |\n\n## Flags\n\n- `--squash-all` — skip per-commit analysis, collapse `main..HEAD` into single commit. Skill drafts one message for whole diff, asks approval.\n- `--dry-run` — produce classification + rebase plan, show, no execute. Useful for review.\n- `--force` — skip the active-phase check (still honors other refuse conditions). Use when no plan tracks the branch or Status block is intentionally stale.\n\n## Workflow\n\n### 1. Snapshot state (parallel batch)\n\n- `git rev-parse --abbrev-ref HEAD` — current branch\n- `git status --porcelain=v1` — working tree clean?\n- `git fetch origin main --quiet 2>\u002Fdev\u002Fnull` then `git rev-parse main` and `git rev-parse origin\u002Fmain 2>\u002Fdev\u002Fnull` — detect if local `main` lags `origin\u002Fmain`\n- `git log --oneline main..HEAD` — commits to finalize\n- `git log -1 --pretty=%s main` — tip of main (plan reference)\n- `git rev-list --count main..HEAD` — commit count\n- `git diff --stat main..HEAD` — diff shape\n- `git merge-base --is-ancestor main HEAD; echo $?` — local `main` ancestor of HEAD? (`0` = yes, branch based on current local main; `1` = no, needs rebase onto main as part of finalize)\n\n**Refuse to proceed if**:\n\n- Current branch is `main` — tell user switch to feature\u002Fworktree branch first.\n- `main..HEAD` empty — nothing to finalize.\n- Working tree dirty — tell user commit or stash with `\u002Fcommit` first. No auto-stash; user must consciously save state.\n- **Plan still in flight** — read `.claude\u002Fstate\u002Fcurrent_plan.md`; if pointer present, parse the referenced plan's `## Status` block. **Refuse** if `Step` is not `finalized`\u002F`awaiting \u002Ffinalize` or `Active phase` is not the last plan phase. `--force` overrides. Schema → [`meta-ai-config.md`](..\u002F..\u002Frules\u002Fmeta-ai-config.md) \"Plan Status Protocol\".\n  - **Stale-pointer exception**: if the pointer's `Branch:` is not the branch being finalized AND that branch's work already landed on `main` (`git rev-list --count main..\u003Cbranch>` is 0, or the branch is gone), the pointer is stranded — do not refuse on it. Repair it instead: set the referenced plan's `Step:` to `finalized` and delete `current_plan.md`, then continue.\n\n**Rebase target — always current local `main`.** `\u002Ffinalize` produces branch fast-forwarding onto local `main` HEAD. Two cases:\n\n1. **Branch already based on current `main`** (`merge-base --is-ancestor main HEAD` returns 0). Rebase only rewrites commits in `main..HEAD` for hygiene — no parent change, no upstream-drift conflict risk.\n2. **Branch behind `main`** (returns 1). Rebase does double duty: rewrites commits in `main..HEAD` for hygiene **and** moves branch onto current `main` HEAD. Conflicts here real, human resolves (see Step 4).\n\nBoth cases use `git rebase -i main`, replays `merge-base..HEAD` onto current `main`.\n\n**`origin\u002Fmain` handling.** If local `main` behind `origin\u002Fmain`, surface before drafting plan, ask user how to proceed:\n\n| Option | Effect |\n|---|---|\n| **Fast-forward local `main` first, then finalize** (default) | `git fetch origin main && git checkout main && git merge --ff-only origin\u002Fmain && git checkout \u003Cbranch>` then continue. Branch lands on top of latest published main. |\n| **Finalize against current local `main`** | Skip fetch. Branch fast-forwards onto local main but may lag origin once published. |\n| **Abort** | Stop without changes. |\n\nNever touch `origin\u002Fmain` directly (no force-push, no remote updates beyond `fetch`).\n\n### 2. Classify each commit in `main..HEAD`\n\nFor every commit in `main..HEAD`, assign one category:\n\n| Category | Signal | Action |\n|---|---|---|\n| **Keep** | Clean Conventional Commits subject, single concern, useful changelog entry | Leave alone |\n| **Reword** | Single concern but subject non-conventional, typo'd, or mis-typed (e.g. `fix:` for real `feat:`) | Rewrite subject only, keep diff |\n| **Squash** | Two+ adjacent commits cover same concern (fix + follow-up fixup, feat + missed test, rolling checkpoint amendments) | Collapse into one with drafted message |\n| **Split** | One commit mixes unrelated concerns | Offer `git reset HEAD^` workflow; defer to human if non-trivial |\n| **Drop** | Empty commit, reverted earlier in branch, pure noise | Remove |\n| **Checkpoint** | Subject exactly `Checkpoint` | Reword (single concern inside) or squash into neighbour |\n\n**Classification heuristics:**\n\n- Subject line first. Non-conventional → Reword candidate.\n- `git show --stat \u003Csha>` for diff shape. Small diff, one module → likely Keep\u002FReword. Large diff, many modules → inspect body for multi-concern signals (`- bullet lists`, `and`, `also`, `plus`, bundle language).\n- `chore(claude):` commits touching only `.claude\u002F`, `AGENTS.md` or `CLAUDE.md` belong in working-phase, but on finalized branch should still be individually legitimate `chore(claude):` entries, not bundles.\n- `git log --format=%B \u003Csha> -1` for full message when subject ambiguous.\n\n### 3. Draft the rebase plan\n\nPresent as numbered list user can scan. Example:\n\n```\nRebase plan for evelynn (5 commits in main..HEAD):\n\n  1. KEEP    a2a7072 feat(mirror): per-platform asset_type override\n  2. SQUASH  b1c2d3e Checkpoint              → fold into (3)\n  3. REWORD  e4f5g6h chore(claude): wip             → feat(cli): add --remote flag to catalog\n  4. DROP    9a8b7c6 Revert previous wip fix  (undone later in the branch)\n  5. KEEP    1234567 docs(guide): document --remote flag\n\nTarget base: main (039c066)\nFinal commit count: 3\n```\n\nUse `AskUserQuestion` with three options:\n\n| Option | Effect |\n|---|---|\n| **Execute plan** (default) | Run scripted rebase |\n| **Edit plan** | Let user adjust before exec (describe change in prose, redraw) |\n| **Abort** | Stop without changes |\n\nIf user picked `--dry-run`, print plan and stop regardless of choice.\n\n### 4. Execute the rebase (non-interactive)\n\nUse scripted non-interactive `git rebase -i` pattern — **never** launch `$EDITOR`. Base always current local `main`, so same command both rewrites internal history (per plan) and replays branch onto latest local main HEAD.\n\n```sh\n# Capture starting state for emergency rollback\nSTART_SHA=$(git rev-parse HEAD)\n\n# Build a rebase-todo file from the plan, then run rebase with\n# GIT_SEQUENCE_EDITOR pointing at `cat` on that file, and\n# GIT_EDITOR pointing at a script that replaces any commit message\n# during reword\u002Fsquash with the pre-drafted one.\nGIT_SEQUENCE_EDITOR=\"cp $TODO_FILE\" \\\nGIT_EDITOR=\"$MSG_SCRIPT\" \\\ngit rebase -i main\n```\n\nImplementation notes:\n\n- Generate rebase-todo file in temp dir. Each line is `pick|reword|squash|fixup|drop \u003Csha> \u003Csubject>`.\n- For reword\u002Fsquash, pre-write target message to files named by SHA; `GIT_EDITOR` script reads matching file, overwrites message.\n- On rebase conflict: stop, print conflicted file list, tell user what to do (`git status`, edit, `git rebase --continue`), exit. Do **not** auto-resolve.\n- On success: show rewritten `git log --oneline main..HEAD` and final commit count.\n- Backout: `git rebase --abort` (if still rebasing) or `git reset --hard $START_SHA` (if rebase done but user unhappy). Offer both explicitly.\n\n### 5. `--squash-all` mode\n\nWhen `--squash-all` passed, skip steps 2–4, instead:\n\n1. Draft single Conventional Commits message covering full `main..HEAD` diff. Read `git log main..HEAD` for scope\u002Fconcern inspiration but result is **one** commit — subject describes real user-visible change, not enumerate fixups.\n2. Show drafted message. Ask approval.\n3. Execute:\n   ```sh\n   git reset --soft main\n   git commit -s -m \"$(cat \u003C\u003C'EOF'\n   \u003Cdrafted message>\n   EOF\n   )\"\n   ```\n4. Report new HEAD sha + subject.\n\nSquash-all right when branch really one changelog entry — e.g. feature across 8 checkpoints + 3 fixups. Wrong when branch has independent concerns (refactor + unrelated bug fix) — decline, use per-commit plan instead.\n\n### 6. Quality gate after rebase\n\nAfter rebase, `task verify` must still pass on new HEAD. Run it. On fail:\n\n1. Show failure.\n2. User fixes (rebases can expose test interactions invisible in messy history).\n3. On fix, rerun `\u002Fcommit` (working phase for fix) then `\u002Ffinalize` again if more shaping needed.\n\nNo push. Never push.\n\n### 7. Mark plan finalized + clear `current_plan.md`\n\nAfter successful rebase, if a Status block exists in the plan referenced by `.claude\u002Fstate\u002Fcurrent_plan.md`: set `Step:` to `finalized`, bump `Last update:` (with new HEAD sha), delete `.claude\u002Fstate\u002Fcurrent_plan.md`. Skip silently when no plan \u002F no Status block \u002F `--force` was used.\n\n### 8. Report\n\nStarting → final commit count, whether `task verify` passed, whether Status was marked `finalized` and `current_plan.md` cleared, next step for user (`git checkout main && git merge --ff-only \u003Cbranch>` if asked; else stop).\n\n## Safety Rules\n\n- **Always capture `START_SHA`** before first destructive op. Offer `git reset --hard $START_SHA` as recovery command if user unhappy.\n- **Never force-push.** Skill only rewrites local history. Human decides push.\n- **Never touch commits already on `origin\u002F\u003Cbranch>` without explicit confirmation.** Rewriting published history fine on feature branch human controls, but skill must flag (`git rev-list origin\u002F\u003Cbranch>..HEAD` for local-only vs published).\n- **Never auto-resolve conflicts.** On conflict, stop, hand back to user.\n- **Never launch `$EDITOR`.** Always scripted `GIT_SEQUENCE_EDITOR` + `GIT_EDITOR` pattern with pre-written files.\n\n## References\n\n- [workflow-git.md](..\u002F..\u002Frules\u002Fworkflow-git.md) — shared branch\u002Fcommit hygiene: branching model, two-phase model, Checkpoint convention, land-ready definition\n- [`commit_reference.md`](..\u002Fcommit\u002Fcommit_reference.md) — Conventional Commits v1.0.0 cheat sheet (types, scopes, footers, breaking changes)\n- `\u002Fcommit` skill (`..\u002Fcommit\u002FSKILL.md`) — working-phase sibling\n- AGENTS.md \"Landing a feature\" — manual procedure this skill automates","# \u002Ffinalize — Prepare Branch for Fast-Forward Merge\n\nRewrites commits in `main..HEAD` so branch fast-forwards onto `main` as clean Conventional Commits sequence. **Rebasing phase** of two-phase branch workflow — see [workflow-git.md](..\u002F..\u002Frules\u002Fworkflow-git.md) for full model.\n\nSibling `\u002Fcommit` skill handles **working phase** (save progress during dev). `\u002Ffinalize` takes messy result, produces what lands in main-branch changelog.\n\n## When To Use\n\n| Situation | Use |\n|---|---|\n| Branch has multiple `Checkpoint` commits | `\u002Ffinalize` |\n| Branch has working-phase bundles (\"chore(claude): bundle skill + rules + agents\") | `\u002Ffinalize` |\n| Rebasing branch onto current `main` before fast-forward | `\u002Ffinalize` |\n| Branch is one changelog entry with noise between | `\u002Ffinalize --squash-all` |\n| Already one-concern-per-commit and rebased | don't — fast-forward |\n\n## Flags\n\n- `--squash-all` — skip per-commit analysis, collapse `main..HEAD` into single commit. Skill drafts one message for whole diff, asks approval.\n- `--dry-run` — produce classification + rebase plan, show, no execute. Useful for review.\n- `--force` — skip the active-phase check (still honors other refuse conditions). Use when no plan tracks the branch or Status block is intentionally stale.\n\n## Workflow\n\n### 1. Snapshot state (parallel batch)\n\n- `git rev-parse --abbrev-ref HEAD` — current branch\n- `git status --porcelain=v1` — working tree clean?\n- `git fetch origin main --quiet 2>\u002Fdev\u002Fnull` then `git rev-parse main` and `git rev-parse origin\u002Fmain 2>\u002Fdev\u002Fnull` — detect if local `main` lags `origin\u002Fmain`\n- `git log --oneline main..HEAD` — commits to finalize\n- `git log -1 --pretty=%s main` — tip of main (plan reference)\n- `git rev-list --count main..HEAD` — commit count\n- `git diff --stat main..HEAD` — diff shape\n- `git merge-base --is-ancestor main HEAD; echo $?` — local `main` ancestor of HEAD? (`0` = yes, branch based on current local main; `1` = no, needs rebase onto main as part of finalize)\n\n**Refuse to proceed if**:\n\n- Current branch is `main` — tell user switch to feature\u002Fworktree branch first.\n- `main..HEAD` empty — nothing to finalize.\n- Working tree dirty — tell user commit or stash with `\u002Fcommit` first. No auto-stash; user must consciously save state.\n- **Plan still in flight** — read `.claude\u002Fstate\u002Fcurrent_plan.md`; if pointer present, parse the referenced plan's `## Status` block. **Refuse** if `Step` is not `finalized`\u002F`awaiting \u002Ffinalize` or `Active phase` is not the last plan phase. `--force` overrides. Schema → [`meta-ai-config.md`](..\u002F..\u002Frules\u002Fmeta-ai-config.md) \"Plan Status Protocol\".\n  - **Stale-pointer exception**: if the pointer's `Branch:` is not the branch being finalized AND that branch's work already landed on `main` (`git rev-list --count main..\u003Cbranch>` is 0, or the branch is gone), the pointer is stranded — do not refuse on it. Repair it instead: set the referenced plan's `Step:` to `finalized` and delete `current_plan.md`, then continue.\n\n**Rebase target — always current local `main`.** `\u002Ffinalize` produces branch fast-forwarding onto local `main` HEAD. Two cases:\n\n1. **Branch already based on current `main`** (`merge-base --is-ancestor main HEAD` returns 0). Rebase only rewrites commits in `main..HEAD` for hygiene — no parent change, no upstream-drift conflict risk.\n2. **Branch behind `main`** (returns 1). Rebase does double duty: rewrites commits in `main..HEAD` for hygiene **and** moves branch onto current `main` HEAD. Conflicts here real, human resolves (see Step 4).\n\nBoth cases use `git rebase -i main`, replays `merge-base..HEAD` onto current `main`.\n\n**`origin\u002Fmain` handling.** If local `main` behind `origin\u002Fmain`, surface before drafting plan, ask user how to proceed:\n\n| Option | Effect |\n|---|---|\n| **Fast-forward local `main` first, then finalize** (default) | `git fetch origin main && git checkout main && git merge --ff-only origin\u002Fmain && git checkout \u003Cbranch>` then continue. Branch lands on top of latest published main. |\n| **Finalize against current local `main`** | Skip fetch. Branch fast-forwards onto local main but may lag origin once published. |\n| **Abort** | Stop without changes. |\n\nNever touch `origin\u002Fmain` directly (no force-push, no remote updates beyond `fetch`).\n\n### 2. Classify each commit in `main..HEAD`\n\nFor every commit in `main..HEAD`, assign one category:\n\n| Category | Signal | Action |\n|---|---|---|\n| **Keep** | Clean Conventional Commits subject, single concern, useful changelog entry | Leave alone |\n| **Reword** | Single concern but subject non-conventional, typo'd, or mis-typed (e.g. `fix:` for real `feat:`) | Rewrite subject only, keep diff |\n| **Squash** | Two+ adjacent commits cover same concern (fix + follow-up fixup, feat + missed test, rolling checkpoint amendments) | Collapse into one with drafted message |\n| **Split** | One commit mixes unrelated concerns | Offer `git reset HEAD^` workflow; defer to human if non-trivial |\n| **Drop** | Empty commit, reverted earlier in branch, pure noise | Remove |\n| **Checkpoint** | Subject exactly `Checkpoint` | Reword (single concern inside) or squash into neighbour |\n\n**Classification heuristics:**\n\n- Subject line first. Non-conventional → Reword candidate.\n- `git show --stat \u003Csha>` for diff shape. Small diff, one module → likely Keep\u002FReword. Large diff, many modules → inspect body for multi-concern signals (`- bullet lists`, `and`, `also`, `plus`, bundle language).\n- `chore(claude):` commits touching only `.claude\u002F`, `AGENTS.md` or `CLAUDE.md` belong in working-phase, but on finalized branch should still be individually legitimate `chore(claude):` entries, not bundles.\n- `git log --format=%B \u003Csha> -1` for full message when subject ambiguous.\n\n### 3. Draft the rebase plan\n\nPresent as numbered list user can scan. Example:\n\n```\nRebase plan for evelynn (5 commits in main..HEAD):\n\n  1. KEEP    a2a7072 feat(mirror): per-platform asset_type override\n  2. SQUASH  b1c2d3e Checkpoint              → fold into (3)\n  3. REWORD  e4f5g6h chore(claude): wip             → feat(cli): add --remote flag to catalog\n  4. DROP    9a8b7c6 Revert previous wip fix  (undone later in the branch)\n  5. KEEP    1234567 docs(guide): document --remote flag\n\nTarget base: main (039c066)\nFinal commit count: 3\n```\n\nUse `AskUserQuestion` with three options:\n\n| Option | Effect |\n|---|---|\n| **Execute plan** (default) | Run scripted rebase |\n| **Edit plan** | Let user adjust before exec (describe change in prose, redraw) |\n| **Abort** | Stop without changes |\n\nIf user picked `--dry-run`, print plan and stop regardless of choice.\n\n### 4. Execute the rebase (non-interactive)\n\nUse scripted non-interactive `git rebase -i` pattern — **never** launch `$EDITOR`. Base always current local `main`, so same command both rewrites internal history (per plan) and replays branch onto latest local main HEAD.\n\n```sh\n# Capture starting state for emergency rollback\nSTART_SHA=$(git rev-parse HEAD)\n\n# Build a rebase-todo file from the plan, then run rebase with\n# GIT_SEQUENCE_EDITOR pointing at `cat` on that file, and\n# GIT_EDITOR pointing at a script that replaces any commit message\n# during reword\u002Fsquash with the pre-drafted one.\nGIT_SEQUENCE_EDITOR=\"cp $TODO_FILE\" \\\nGIT_EDITOR=\"$MSG_SCRIPT\" \\\ngit rebase -i main\n```\n\nImplementation notes:\n\n- Generate rebase-todo file in temp dir. Each line is `pick|reword|squash|fixup|drop \u003Csha> \u003Csubject>`.\n- For reword\u002Fsquash, pre-write target message to files named by SHA; `GIT_EDITOR` script reads matching file, overwrites message.\n- On rebase conflict: stop, print conflicted file list, tell user what to do (`git status`, edit, `git rebase --continue`), exit. Do **not** auto-resolve.\n- On success: show rewritten `git log --oneline main..HEAD` and final commit count.\n- Backout: `git rebase --abort` (if still rebasing) or `git reset --hard $START_SHA` (if rebase done but user unhappy). Offer both explicitly.\n\n### 5. `--squash-all` mode\n\nWhen `--squash-all` passed, skip steps 2–4, instead:\n\n1. Draft single Conventional Commits message covering full `main..HEAD` diff. Read `git log main..HEAD` for scope\u002Fconcern inspiration but result is **one** commit — subject describes real user-visible change, not enumerate fixups.\n2. Show drafted message. Ask approval.\n3. Execute:\n   ```sh\n   git reset --soft main\n   git commit -s -m \"$(cat \u003C\u003C'EOF'\n   \u003Cdrafted message>\n   EOF\n   )\"\n   ```\n4. Report new HEAD sha + subject.\n\nSquash-all right when branch really one changelog entry — e.g. feature across 8 checkpoints + 3 fixups. Wrong when branch has independent concerns (refactor + unrelated bug fix) — decline, use per-commit plan instead.\n\n### 6. Quality gate after rebase\n\nAfter rebase, `task verify` must still pass on new HEAD. Run it. On fail:\n\n1. Show failure.\n2. User fixes (rebases can expose test interactions invisible in messy history).\n3. On fix, rerun `\u002Fcommit` (working phase for fix) then `\u002Ffinalize` again if more shaping needed.\n\nNo push. Never push.\n\n### 7. Mark plan finalized + clear `current_plan.md`\n\nAfter successful rebase, if a Status block exists in the plan referenced by `.claude\u002Fstate\u002Fcurrent_plan.md`: set `Step:` to `finalized`, bump `Last update:` (with new HEAD sha), delete `.claude\u002Fstate\u002Fcurrent_plan.md`. Skip silently when no plan \u002F no Status block \u002F `--force` was used.\n\n### 8. Report\n\nStarting → final commit count, whether `task verify` passed, whether Status was marked `finalized` and `current_plan.md` cleared, next step for user (`git checkout main && git merge --ff-only \u003Cbranch>` if asked; else stop).\n\n## Safety Rules\n\n- **Always capture `START_SHA`** before first destructive op. Offer `git reset --hard $START_SHA` as recovery command if user unhappy.\n- **Never force-push.** Skill only rewrites local history. Human decides push.\n- **Never touch commits already on `origin\u002F\u003Cbranch>` without explicit confirmation.** Rewriting published history fine on feature branch human controls, but skill must flag (`git rev-list origin\u002F\u003Cbranch>..HEAD` for local-only vs published).\n- **Never auto-resolve conflicts.** On conflict, stop, hand back to user.\n- **Never launch `$EDITOR`.** Always scripted `GIT_SEQUENCE_EDITOR` + `GIT_EDITOR` pattern with pre-written files.\n\n## References\n\n- [workflow-git.md](..\u002F..\u002Frules\u002Fworkflow-git.md) — shared branch\u002Fcommit hygiene: branching model, two-phase model, Checkpoint convention, land-ready definition\n- [`commit_reference.md`](..\u002Fcommit\u002Fcommit_reference.md) — Conventional Commits v1.0.0 cheat sheet (types, scopes, footers, breaking changes)\n- `\u002Fcommit` skill (`..\u002Fcommit\u002FSKILL.md`) — working-phase sibling\n- AGENTS.md \"Landing a feature\" — manual procedure this skill automates",{"name":5,"triggers":23,"description":7,"argument-hint":28,"user-invocable":29,"disable-model-invocation":19},[5,24,25,26,27],"prepare this branch","prepare the branch","clean up history","squash the branch","[--squash-all | --dry-run]",true,"main","ec018c25128e4b5b2e08679288e9e9153085830a",".claude\u002Fskills\u002Ffinalize",1,"https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire","https:\u002F\u002Fgrimoire.rs","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs","2026-11-14 09:47:24",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":29},[40,43,46],{"tool":41,"command":42},"npx","npx skills add grimoire-rs\u002Fgrimoire --skill finalize",{"tool":44,"command":45},"bunx","bunx skills add grimoire-rs\u002Fgrimoire --skill finalize",{"tool":47,"command":48},"pnpm","pnpm dlx skills add grimoire-rs\u002Fgrimoire --skill finalize","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffinalize\u002FSKILL.md",[],[52,60,67,74,81,88],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":59},"01M78R7R0RQWY8BC0AQSB3E6NX","rca","Use when a bug ticket, GitHub issue or error report needs a root cause analysis before code is touched — \"is this a bug\", \"why does this fail\". Read-only. Gives a verdict (bug or not-a-bug kind), file:line evidence, ruled-out hypotheses, other affected sites, fix direction and size. A ticket, not a diff (hex-review).","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frca\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":59},"01M78R7JY3CY2XDNTB330GXTJK","fix","Use when a bug ticket or GitHub issue should go from report to an approved fix plan — \"plan a fix\", \"fix this issue\". Root-causes it via rca, then plans in plan mode with the failing regression test first. Routes to hex-plan instead when the fix is large or moves an interface contract.","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffix\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M72XYVY9FGB38MZDJ0QFFMCC","p9-skill","Principle 9 differential fixture skill (v2).","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002Ftest\u002Ftools\u002Fp9_fixtures\u002Fv2\u002Fskills\u002Fp9-skill\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M72XYT3PPTXEFWCR8H4GWKEG","p9-member","Bundle member skill for the Principle 9 fixture (v2).","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002Ftest\u002Ftools\u002Fp9_fixtures\u002Fv2\u002Fskills\u002Fp9-member\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M72XYRWQWZ4BD0367QWG96TB","p9-hookish","Hook-free skill carrying an ignored hook.toml (v2).","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002Ftest\u002Ftools\u002Fp9_fixtures\u002Fv2\u002Fskills\u002Fp9-hookish\u002FSKILL.md",[],[],{"skillNo":89,"name":69,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M72XYPDXXK5C6ZDD5BS2N6HS","Principle 9 differential fixture skill (v1).","https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002Ftest\u002Ftools\u002Fp9_fixtures\u002Fv1\u002Fskills\u002Fp9-skill\u002FSKILL.md",[],[]]