[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72XQMKA2TTXJ0B07AD39KC5":3,"skill-same:01M72XQMKA2TTXJ0B07AD39KC5":52},{"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":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":51},"01M72XQMKA2TTXJ0B07AD39KC5","bugfix",null,"Use when a bug is reported, something is broken, an error or crash needs fixing, a wrong output appears, or a regression shows up — guides Grimoire's Reproduce → Root-Cause → failing-test-FIRST → Fix → Verify discipline and will not let the fix begin until a failing regression test is recorded. Use also when the user says \"bugfix\", \"\u002Fbugfix\", \"fix this bug\", or \"something is broken\".","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\u002Fbugfix\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: bugfix\ndescription: Use when a bug is reported, something is broken, an error or crash needs fixing, a wrong output appears, or a regression shows up — guides Grimoire's Reproduce → Root-Cause → failing-test-FIRST → Fix → Verify discipline and will not let the fix begin until a failing regression test is recorded. Use also when the user says \"bugfix\", \"\u002Fbugfix\", \"fix this bug\", or \"something is broken\".\nuser-invocable: true\nargument-hint: \"[bug report \u002F repro steps \u002F issue number]\"\ntriggers:\n  - \"fix a bug\"\n  - \"bug fix\"\n  - \"something is broken\"\n  - \"regression test first\"\n  - \"reproduce the bug\"\n---\n\n# \u002Fbugfix — Guided Bug-Fix Workflow\n\nGuard rail for the #1 bug-fix failure: **fixing before a failing test exists.**\nThis skill walks [`workflow-bugfix.md`](..\u002F..\u002Frules\u002Fworkflow-bugfix.md) (the\nsingle source of truth) and adds one hard, non-skippable gate — **Phase 3 must\nproduce a test that fails on the current code before any fix is written.**\n\n> Why this exists: the rule alone was repeatedly skipped. This skill makes the\n> order explicit and the gate blocking. Read `workflow-bugfix.md` for the full\n> rationale; this file is the executable checklist.\n\n## The non-negotiable sequence\n\n```\nReproduce → Root-Cause Analysis → FAILING TEST → Fix → Verify → Review → Commit\n```\n\nEach phase finishes before the next starts. The **only** way past Phase 3 is a\ntest that you have **run** and **watched fail** for the right reason.\n\n## Phase 1 — Reproduce (no guessing)\n\n- State the exact wrong behavior: command, input, observed vs expected.\n- Find the surface: which entry point(s)? CLI command, TUI path, library seam?\n  A bug often lives on more than one surface (e.g. a CLI path AND its TUI twin);\n  list every one that shares the broken code.\n- Confirm it actually reproduces. If you can't reproduce it, keep digging —\n  **no speculative fixes.**\n\nWrite a one-line repro: `\"\u003Ccmd\u002Finputs> → \u003Cobserved>; expected \u003Cexpected>\"`.\n\n## Phase 2 — Root-Cause Analysis (write it down)\n\n- Trace the symptom to the line **and** the condition that made it fire.\n- Output a root-cause statement in this exact shape — no \"error on line N\":\n\n  > **X happens because Y, introduced by\u002Flocated at Z.**\n\n- Single bug or a pattern? Grep for the same defect elsewhere (sibling call\n  sites, the other surface from Phase 1). If it's a pattern, the fix covers all\n  instances.\n- If the real cause needs an architectural change, stop and escalate to the\n  feature workflow with a plan artifact — don't paper over it.\n\n## Phase 3 — Failing test FIRST 🚧 GATE\n\n**Do not edit any production code until this phase is done.**\n\n1. Write the test that exercises the Phase-1 repro and targets the Phase-2 root\n   cause (not just the symptom).\n   - Acceptance-level → `test\u002Ftests\u002Ftest_*.py` (real binary + registry).\n   - Unit-level → inline `#[cfg(test)]` in the affected module.\n2. **Run it. Paste the red output.** It must fail, and fail for the *bug's*\n   reason (assertion on the wrong behavior) — not a compile error, typo, or\n   missing fixture.\n3. If an **existing** test encodes the buggy behavior (it asserts the wrong\n   thing the user is now reporting), that test is part of the bug — note it; it\n   will be corrected in the fix, with the reason recorded.\n\n**Gate to pass Phase 3 — all three true:**\n- [ ] A test exists that exercises the repro.\n- [ ] You ran it and it **failed** (output shown).\n- [ ] The failure is the bug, not test scaffolding.\n\nIf you cannot make a test fail, you have not reproduced or understood the bug —\nreturn to Phase 1\u002F2. Skipping this gate is the failure mode this skill prevents.\n\n## Phase 4 — Fix (minimal, root-cause)\n\n- Smallest change that addresses the Phase-2 cause. No drive-by refactor, no\n  \"while I'm here\" cleanup (separate commit, separate type).\n- Fix **every** instance the Phase-2 pattern search found.\n- Correct any existing test that encoded the wrong behavior — state *why* in the\n  diff\u002Fcommit (user intent \u002F corrected contract supersedes the old assumption).\n\n## Phase 5 — Verify (evidence, not vibes)\n\n- The Phase-3 test now **passes** (show it).\n- Run the **subsystem** gate for the changed area (e.g. `task rust:verify`),\n  then cache-bust + re-run unit tests if Rust (`touch` the edited files so a\n  stale cache can't mask a failure).\n- Manually confirm the Phase-1 repro no longer reproduces.\n- Final gate before commit: `task --force verify` (fmt + clippy + build + unit +\n  acceptance). Verify it yourself — do not trust \"should pass\".\n\n## Phase 6 — Review-Fix Loop (+ optional Codex)\n\nApply the canonical Review-Fix Loop from `workflow-bugfix.md` (correctness vs\nroot cause, regression risk to other callers, minimality, test adequacy). For a\nnon-trivial fix, run one Codex adversarial pass over the diff as the cross-model\ngate; fix real findings, re-verify, then converge.\n\n## Phase 7 — Commit\n\n- `fix:` conventional commit; body names the root cause and the regression test.\n- Reference the issue (`fixes #N`) when one exists.\n- Never push — the human decides (see [`workflow-git.md`](..\u002F..\u002Frules\u002Fworkflow-git.md)).\n\n## Anti-rationalizations (stop if you think these)\n\n| Thought | Reality | Do this |\n|---|---|---|\n| \"I know the cause, I'll just fix it.\" | No Phase-2 statement written. | Write the root-cause line first. |\n| \"The test is trivial, I'll add it after.\" | A test added after the fix never proved it caught the bug. | Write it first, watch it fail. |\n| \"Existing tests cover this area.\" | They may encode the *buggy* behavior. | Add a test for the *exact* broken path. |\n| \"Clippy\u002Fformat nit nearby, I'll fix too.\" | Scope creep. | Separate `chore:`\u002F`refactor:` commit. |\n\n## References\n\n- [`workflow-bugfix.md`](..\u002F..\u002Frules\u002Fworkflow-bugfix.md) — full workflow + gates (source of truth)\n- [`workflow-intent.md`](..\u002F..\u002Frules\u002Fworkflow-intent.md) — work-type routing\n- [`quality-core.md`](..\u002F..\u002Frules\u002Fquality-core.md) — verification honesty, review checklist\n- [`workflow-git.md`](..\u002F..\u002Frules\u002Fworkflow-git.md) — `fix:` commits, never push\n","# \u002Fbugfix — Guided Bug-Fix Workflow\n\nGuard rail for the #1 bug-fix failure: **fixing before a failing test exists.**\nThis skill walks [`workflow-bugfix.md`](..\u002F..\u002Frules\u002Fworkflow-bugfix.md) (the\nsingle source of truth) and adds one hard, non-skippable gate — **Phase 3 must\nproduce a test that fails on the current code before any fix is written.**\n\n> Why this exists: the rule alone was repeatedly skipped. This skill makes the\n> order explicit and the gate blocking. Read `workflow-bugfix.md` for the full\n> rationale; this file is the executable checklist.\n\n## The non-negotiable sequence\n\n```\nReproduce → Root-Cause Analysis → FAILING TEST → Fix → Verify → Review → Commit\n```\n\nEach phase finishes before the next starts. The **only** way past Phase 3 is a\ntest that you have **run** and **watched fail** for the right reason.\n\n## Phase 1 — Reproduce (no guessing)\n\n- State the exact wrong behavior: command, input, observed vs expected.\n- Find the surface: which entry point(s)? CLI command, TUI path, library seam?\n  A bug often lives on more than one surface (e.g. a CLI path AND its TUI twin);\n  list every one that shares the broken code.\n- Confirm it actually reproduces. If you can't reproduce it, keep digging —\n  **no speculative fixes.**\n\nWrite a one-line repro: `\"\u003Ccmd\u002Finputs> → \u003Cobserved>; expected \u003Cexpected>\"`.\n\n## Phase 2 — Root-Cause Analysis (write it down)\n\n- Trace the symptom to the line **and** the condition that made it fire.\n- Output a root-cause statement in this exact shape — no \"error on line N\":\n\n  > **X happens because Y, introduced by\u002Flocated at Z.**\n\n- Single bug or a pattern? Grep for the same defect elsewhere (sibling call\n  sites, the other surface from Phase 1). If it's a pattern, the fix covers all\n  instances.\n- If the real cause needs an architectural change, stop and escalate to the\n  feature workflow with a plan artifact — don't paper over it.\n\n## Phase 3 — Failing test FIRST 🚧 GATE\n\n**Do not edit any production code until this phase is done.**\n\n1. Write the test that exercises the Phase-1 repro and targets the Phase-2 root\n   cause (not just the symptom).\n   - Acceptance-level → `test\u002Ftests\u002Ftest_*.py` (real binary + registry).\n   - Unit-level → inline `#[cfg(test)]` in the affected module.\n2. **Run it. Paste the red output.** It must fail, and fail for the *bug's*\n   reason (assertion on the wrong behavior) — not a compile error, typo, or\n   missing fixture.\n3. If an **existing** test encodes the buggy behavior (it asserts the wrong\n   thing the user is now reporting), that test is part of the bug — note it; it\n   will be corrected in the fix, with the reason recorded.\n\n**Gate to pass Phase 3 — all three true:**\n- [ ] A test exists that exercises the repro.\n- [ ] You ran it and it **failed** (output shown).\n- [ ] The failure is the bug, not test scaffolding.\n\nIf you cannot make a test fail, you have not reproduced or understood the bug —\nreturn to Phase 1\u002F2. Skipping this gate is the failure mode this skill prevents.\n\n## Phase 4 — Fix (minimal, root-cause)\n\n- Smallest change that addresses the Phase-2 cause. No drive-by refactor, no\n  \"while I'm here\" cleanup (separate commit, separate type).\n- Fix **every** instance the Phase-2 pattern search found.\n- Correct any existing test that encoded the wrong behavior — state *why* in the\n  diff\u002Fcommit (user intent \u002F corrected contract supersedes the old assumption).\n\n## Phase 5 — Verify (evidence, not vibes)\n\n- The Phase-3 test now **passes** (show it).\n- Run the **subsystem** gate for the changed area (e.g. `task rust:verify`),\n  then cache-bust + re-run unit tests if Rust (`touch` the edited files so a\n  stale cache can't mask a failure).\n- Manually confirm the Phase-1 repro no longer reproduces.\n- Final gate before commit: `task --force verify` (fmt + clippy + build + unit +\n  acceptance). Verify it yourself — do not trust \"should pass\".\n\n## Phase 6 — Review-Fix Loop (+ optional Codex)\n\nApply the canonical Review-Fix Loop from `workflow-bugfix.md` (correctness vs\nroot cause, regression risk to other callers, minimality, test adequacy). For a\nnon-trivial fix, run one Codex adversarial pass over the diff as the cross-model\ngate; fix real findings, re-verify, then converge.\n\n## Phase 7 — Commit\n\n- `fix:` conventional commit; body names the root cause and the regression test.\n- Reference the issue (`fixes #N`) when one exists.\n- Never push — the human decides (see [`workflow-git.md`](..\u002F..\u002Frules\u002Fworkflow-git.md)).\n\n## Anti-rationalizations (stop if you think these)\n\n| Thought | Reality | Do this |\n|---|---|---|\n| \"I know the cause, I'll just fix it.\" | No Phase-2 statement written. | Write the root-cause line first. |\n| \"The test is trivial, I'll add it after.\" | A test added after the fix never proved it caught the bug. | Write it first, watch it fail. |\n| \"Existing tests cover this area.\" | They may encode the *buggy* behavior. | Add a test for the *exact* broken path. |\n| \"Clippy\u002Fformat nit nearby, I'll fix too.\" | Scope creep. | Separate `chore:`\u002F`refactor:` commit. |\n\n## References\n\n- [`workflow-bugfix.md`](..\u002F..\u002Frules\u002Fworkflow-bugfix.md) — full workflow + gates (source of truth)\n- [`workflow-intent.md`](..\u002F..\u002Frules\u002Fworkflow-intent.md) — work-type routing\n- [`quality-core.md`](..\u002F..\u002Frules\u002Fquality-core.md) — verification honesty, review checklist\n- [`workflow-git.md`](..\u002F..\u002Frules\u002Fworkflow-git.md) — `fix:` commits, never push\n",{"name":5,"triggers":23,"description":7,"argument-hint":29,"user-invocable":30},[24,25,26,27,28],"fix a bug","bug fix","something is broken","regression test first","reproduce the bug","[bug report \u002F repro steps \u002F issue number]",true,"main","ec018c25128e4b5b2e08679288e9e9153085830a",".claude\u002Fskills\u002Fbugfix",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":40,"prompt":50,"zipAvailable":30},[41,44,47],{"tool":42,"command":43},"npx","npx skills add grimoire-rs\u002Fgrimoire --skill bugfix",{"tool":45,"command":46},"bunx","bunx skills add grimoire-rs\u002Fgrimoire --skill bugfix",{"tool":48,"command":49},"pnpm","pnpm dlx skills add grimoire-rs\u002Fgrimoire --skill bugfix","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgrimoire-rs\u002Fgrimoire\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbugfix\u002FSKILL.md",[],[53,61,68,75,82,89],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"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":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":60},"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":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"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":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"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":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"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":90,"name":70,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"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",[],[]]