[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F92WKTHA8J3QGYRS76KPEW":3,"skill-same:01M7F92WKTHA8J3QGYRS76KPEW":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7F92WKTHA8J3QGYRS76KPEW","start-debugging",null,"Debug a defect with a gated flow: reproduce, isolate, find the root cause, prove a regression test, then fix through the lean path. Use for an error message or stack trace, a failing test nobody owns, 'works in staging but not in prod', a regression after a deploy, or a failed post-deploy health check. Replaces report-template debugging for work in these trees. Read-only until the fix phase.","szymonrychu\u002Fworkbench","szymonrychu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2943524?v=4","01M7F8VBGRDFJ2PSH14RM80E4G","Szymon Richert","01M7F8VBHCQTC2RMKXJ93RHMB3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fstart-debugging\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: start-debugging\ndescription: \"Debug a defect with a gated flow: reproduce, isolate, find the root cause, prove a regression test, then fix through the lean path. Use for an error message or stack trace, a failing test nobody owns, 'works in staging but not in prod', a regression after a deploy, or a failed post-deploy health check. Replaces report-template debugging for work in these trees. Read-only until the fix phase.\"\n---\n\n# Start debugging\n\n## Iron law\n\nNo fix without a root cause, and no fix without a red regression test. Three gates, in order:\n\n1. Gate 1 - a red-capable feedback loop exists (end of phase 1).\n2. Gate 2 - the root cause is one sentence backed by evidence (end of phase 5).\n3. Gate 3 - the regression test was seen failing for the right reason (end of phase 6).\n\nNothing is edited in the product code before gate 3.\n\n## Phase 0 - Intake\n\nWrite down: expected vs actual, when it started (commit, deploy, date), who or what is affected. Verify the claim: reproduce it yourself, or it is a report, not a bug. Quote the command and its output.\n\nDone when: expected, actual, onset and blast radius are written, and the symptom was seen with your own command.\n\n## Phase 1 - Feedback loop\n\nBuild one command that is `red-capable` (asserts the exact symptom, not \"something failed\"), `deterministic`, fast, and `agent-runnable` (no human, no prompt). Show the invocation and its output:\n\n```\n$ pytest tests\u002Ftest_x.py::test_symptom -q\nFAILED ... AssertionError: expected 3, got 0\n```\n\nPick the loop type in preference order from `references\u002Floops.md`. Flaky: raise the reproduction rate first (pin seeds, tighten inputs, loop N times and count). No red-capable command, no phase 2.\n\nDone when: the command fails with the exact symptom, repeatedly, and the output is quoted.\n\n## Phase 2 - Minimise\n\nConfirm the minimal case is the same failure, not a nearby one: compare the error text and the failing line. Cut inputs, config, services and steps one at a time, re-running the loop after each cut, until every element left is load-bearing.\n\nDone when: removing any remaining element makes the symptom disappear, and the failure signature is unchanged.\n\n## Phase 3 - Hypothesise\n\nWrite 3-5 ranked falsifiable hypotheses, each in the form \"if X is the cause, changing Y makes it disappear\". Find similar working code and list every difference. Walk back the call chain to the trigger: never fix just where the error appears.\n\nDone when: the ranked list exists, each hypothesis names the one change that would falsify it.\n\n## Phase 4 - Instrument and test\n\nOne variable per experiment, top hypothesis first. Tag every debug log `[DEBUG-\u003C4 hex>]` (one random tag per session) so cleanup is one grep. Performance problems: Measure first, with a profile or timing, before any guess. A surviving hypothesis must explain every earlier observation; one it cannot explain is wrong or incomplete.\n\nDone when: one hypothesis survived its experiment and explains all observations, the others are marked refuted with the evidence.\n\n## Phase 5 - Root cause\n\nState it in one sentence with the evidence (command, output, file:line). Count the fixes tried: after three failed fixes, stop. Run `workbench:interrogate` on the hypotheses; if that does not settle it, it is a design question for the user - the one permitted stop. Do not try a fourth fix.\n\nDone when: the sentence is written, the evidence is quoted, and a change at the cause (not the symptom site) is identified.\n\n## Phase 6 - Regression test, proven\n\nWrite the regression test at the seam where the cause lives, before the fix, and watch it fail for the reason in the root-cause sentence. If the red was forced by a mutation (reverting a line, injecting the bug), diff the tree against a pristine copy to prove the mutation landed and nothing else changed. Recipes: `references\u002Floops.md`.\n\nDone when: the test is red for the right reason, with the failure output quoted.\n\n## Phase 7 - Fix\n\nImplement through `start-development`'s lean path with the regression test as the acceptance condition. Then the proof: test passes; revert the fix, test fails; restore, test passes. Finally the original un-minimised loop from phase 1 is green.\n\nDone when: the revert proof ran with output quoted, and the original loop is green.\n\n## Phase 8 - Cleanup and record\n\nRun `grep -rn \"DEBUG-\u003Ctag>\"` over the tree: it must be empty. Put the confirmed hypothesis in the commit message. Write the record with `doc_path.sh record \"\u003Cslug>-debug\"` (see `${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fstart-research\u002Fscripts\u002Fdoc_path.sh`), listing: loop command, hypotheses tried, root cause, regression test, fix commit.\n\nDone when: the grep is empty, the commit message names the hypothesis, and the record exists.\n\n## Red flags\n\nAny of these sends the flow back to phase 1:\n\n- \"quick fix for now\"\n- \"one more attempt\"\n- \"skip the test, I will verify manually\"\n- \"just try changing X\"\n- a fix proposed before phase 5, or \"it works now\" with no loop output\n\n## Agans' nine rules\n\n1. Understand the system.\n2. Make it fail.\n3. Quit thinking and look.\n4. Divide and conquer.\n5. Change one thing at a time.\n6. Keep an audit trail.\n7. Check the plug.\n8. Get a fresh view.\n9. If you did not fix it, it is not fixed.\n\n## Rules\n\n- Read-only until phase 7: no product edits, only the loop, tests and tagged debug logs.\n- Every claim is backed by a command output pasted in the record.\n- Models are explicit on every subagent call; never inherit the default.\n- Plain hyphens and straight quotes, ASCII only.\n\nSources: superpowers systematic-debugging, mattpocock diagnosing-bugs, Agans (Debugging, nine rules), Zeller (Why Programs Fail), code.claude.com best-practices.\n","# Start debugging\n\n## Iron law\n\nNo fix without a root cause, and no fix without a red regression test. Three gates, in order:\n\n1. Gate 1 - a red-capable feedback loop exists (end of phase 1).\n2. Gate 2 - the root cause is one sentence backed by evidence (end of phase 5).\n3. Gate 3 - the regression test was seen failing for the right reason (end of phase 6).\n\nNothing is edited in the product code before gate 3.\n\n## Phase 0 - Intake\n\nWrite down: expected vs actual, when it started (commit, deploy, date), who or what is affected. Verify the claim: reproduce it yourself, or it is a report, not a bug. Quote the command and its output.\n\nDone when: expected, actual, onset and blast radius are written, and the symptom was seen with your own command.\n\n## Phase 1 - Feedback loop\n\nBuild one command that is `red-capable` (asserts the exact symptom, not \"something failed\"), `deterministic`, fast, and `agent-runnable` (no human, no prompt). Show the invocation and its output:\n\n```\n$ pytest tests\u002Ftest_x.py::test_symptom -q\nFAILED ... AssertionError: expected 3, got 0\n```\n\nPick the loop type in preference order from `references\u002Floops.md`. Flaky: raise the reproduction rate first (pin seeds, tighten inputs, loop N times and count). No red-capable command, no phase 2.\n\nDone when: the command fails with the exact symptom, repeatedly, and the output is quoted.\n\n## Phase 2 - Minimise\n\nConfirm the minimal case is the same failure, not a nearby one: compare the error text and the failing line. Cut inputs, config, services and steps one at a time, re-running the loop after each cut, until every element left is load-bearing.\n\nDone when: removing any remaining element makes the symptom disappear, and the failure signature is unchanged.\n\n## Phase 3 - Hypothesise\n\nWrite 3-5 ranked falsifiable hypotheses, each in the form \"if X is the cause, changing Y makes it disappear\". Find similar working code and list every difference. Walk back the call chain to the trigger: never fix just where the error appears.\n\nDone when: the ranked list exists, each hypothesis names the one change that would falsify it.\n\n## Phase 4 - Instrument and test\n\nOne variable per experiment, top hypothesis first. Tag every debug log `[DEBUG-\u003C4 hex>]` (one random tag per session) so cleanup is one grep. Performance problems: Measure first, with a profile or timing, before any guess. A surviving hypothesis must explain every earlier observation; one it cannot explain is wrong or incomplete.\n\nDone when: one hypothesis survived its experiment and explains all observations, the others are marked refuted with the evidence.\n\n## Phase 5 - Root cause\n\nState it in one sentence with the evidence (command, output, file:line). Count the fixes tried: after three failed fixes, stop. Run `workbench:interrogate` on the hypotheses; if that does not settle it, it is a design question for the user - the one permitted stop. Do not try a fourth fix.\n\nDone when: the sentence is written, the evidence is quoted, and a change at the cause (not the symptom site) is identified.\n\n## Phase 6 - Regression test, proven\n\nWrite the regression test at the seam where the cause lives, before the fix, and watch it fail for the reason in the root-cause sentence. If the red was forced by a mutation (reverting a line, injecting the bug), diff the tree against a pristine copy to prove the mutation landed and nothing else changed. Recipes: `references\u002Floops.md`.\n\nDone when: the test is red for the right reason, with the failure output quoted.\n\n## Phase 7 - Fix\n\nImplement through `start-development`'s lean path with the regression test as the acceptance condition. Then the proof: test passes; revert the fix, test fails; restore, test passes. Finally the original un-minimised loop from phase 1 is green.\n\nDone when: the revert proof ran with output quoted, and the original loop is green.\n\n## Phase 8 - Cleanup and record\n\nRun `grep -rn \"DEBUG-\u003Ctag>\"` over the tree: it must be empty. Put the confirmed hypothesis in the commit message. Write the record with `doc_path.sh record \"\u003Cslug>-debug\"` (see `${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fstart-research\u002Fscripts\u002Fdoc_path.sh`), listing: loop command, hypotheses tried, root cause, regression test, fix commit.\n\nDone when: the grep is empty, the commit message names the hypothesis, and the record exists.\n\n## Red flags\n\nAny of these sends the flow back to phase 1:\n\n- \"quick fix for now\"\n- \"one more attempt\"\n- \"skip the test, I will verify manually\"\n- \"just try changing X\"\n- a fix proposed before phase 5, or \"it works now\" with no loop output\n\n## Agans' nine rules\n\n1. Understand the system.\n2. Make it fail.\n3. Quit thinking and look.\n4. Divide and conquer.\n5. Change one thing at a time.\n6. Keep an audit trail.\n7. Check the plug.\n8. Get a fresh view.\n9. If you did not fix it, it is not fixed.\n\n## Rules\n\n- Read-only until phase 7: no product edits, only the loop, tests and tagged debug logs.\n- Every claim is backed by a command output pasted in the record.\n- Models are explicit on every subagent call; never inherit the default.\n- Plain hyphens and straight quotes, ASCII only.\n\nSources: superpowers systematic-debugging, mattpocock diagnosing-bugs, Agans (Debugging, nine rules), Zeller (Why Programs Fail), code.claude.com best-practices.\n",{"name":5,"description":7},"main","ce8273d3492a5008dd408c4823db370b23e18863","plugins\u002Fworkbench\u002Fskills\u002Fstart-debugging","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench","https:\u002F\u002Fgithub.com\u002Fszymonrychu","www.szymonrichert.pl","2026-10-26 04:36:12",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add szymonrychu\u002Fworkbench --skill start-debugging",{"tool":37,"command":38},"bunx","bunx skills add szymonrychu\u002Fworkbench --skill start-debugging",{"tool":40,"command":41},"pnpm","pnpm dlx skills add szymonrychu\u002Fworkbench --skill start-debugging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fstart-debugging\u002FSKILL.md",true,[45,51,57],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Floops.md","REFERENCE","参考文档",2523,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fstart-debugging\u002Freferences\u002Floops.md",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"tests\u002Ftest_debug_alias.py","SCRIPT","脚本",1311,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fstart-debugging\u002Ftests\u002Ftest_debug_alias.py",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"tests\u002Ftest_start_debugging_structure.py",3683,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fstart-debugging\u002Ftests\u002Ftest_start_debugging_structure.py",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7F949PAG534XSY6BXH4GKY0","claudy","d claudy","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Fgolden\u002Fskills\u002Fclaudy\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7F947QH8VQ5WGVMFWFS57M0","gamma","Literal line one.\nLiteral line two.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fextra\u002Fskills\u002Fgamma\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7F944VTWR1AAACZGTNWYJYP","beta","Quoted: description with a colon.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Fbeta\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7F941QWM4KQTX9KA6JQKF2G","alpha","Folded description that spans two lines and ends here.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7F93XXR4JY2S2KXD70JY4GM","worktree-merge","Rebases one subagent's worktree onto the base branch, optionally verifies the rebased tree, fast-forwards it into the worktree that has the base checked out (an epic integration tree or the main checkout), verifies every commit landed, and only then removes the worktree and its branch. Keeps the worktree intact on any conflict, dirty tree, or failed check. Use after a subagent returns work created with worktree-create.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-merge\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7F93TBQKKF3KM4VDVQ8PVHR","worktree-create","Creates one isolated git worktree for one subagent, at \u003Cworkbench>\u002F.claude\u002Fworktrees\u002F\u003Cname>, branched from main with the newest origin\u002Fmain and local main merged in. Refuses a name already in use so two agents can never share a tree. Use once per implementation or review subagent before dispatching it; pair with worktree-merge to land the work and clean up.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-create\u002FSKILL.md",[],[]]