[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6R62DKRZSJC7T055G17V3ZJ":3,"skill-same:01M6R62DKRZSJC7T055G17V3ZJ":67},{"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":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":13,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":40,"install":41,"resources":54},"01M6R62DKRZSJC7T055G17V3ZJ","diagnosing-bugs",null,"Diagnosis loop for hard bugs and performance regressions. Use when asked to diagnose or debug, or when something is broken, throwing, failing, or slow.","r3dlex\u002Fskills","r3dlex","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F291373160?v=4","01M6PEFNGGBVB7SHAPWXFFX933","01M6R5SDWFHT94734KJFMYE1SX",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F04-validate-handoff\u002Fdiagnosing-bugs\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29],"diagnosing bugs","bugs","performance","debug","diagnose","loop","broken","use","diagnosis","for","when","failing","2026-11-10 10:12:30",false,"---\nname: diagnosing-bugs\ndescription: 'Diagnosis loop for hard bugs and performance regressions. Use when asked to diagnose or debug, or when something is broken, throwing, failing, or slow.'\n---\n\n# Diagnosing Bugs\n\nA discipline for hard bugs. Skip phases only when explicitly justified. When exploring the\ncodebase, read `CONTEXT.md` if it exists for a mental model of the relevant modules, and\ncheck ADRs in the area you are touching.\n\n## Redact\n\nThis skill has you show commands, outputs, and captured artifacts. **Redact every secret\nfirst** — write `\u003CREDACTED>` in its place. Build loops against env vars so the credential\nstays in the environment rather than in what you show. Captured artifacts carry auth\nheaders: quote only the lines that carry the signal. If the redacted output is not enough to\ndiagnose the bug, say so and ask the user.\n\n## Phase 1: Build a feedback loop\n\n**This is the skill.** Everything else is mechanical. With a **tight** pass\u002Ffail signal that\ngoes red on *this* bug, you will find the cause — bisection, hypothesis-testing, and\ninstrumentation all just consume it. Without one, no amount of staring at code will save you.\nSpend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**\n\n### Completion criterion — a tight loop that goes red\n\nPhase 1 is done when you can name **one command** — a script path, a test invocation, a\ncurl — that you have **already run at least once** (show the invocation and its output,\nredacted), and that is:\n\n- [ ] **Red-capable** — drives the actual bug code path and asserts the **user's exact\n      symptom**, so it goes red on this bug and green once fixed. Not \"runs without\n      erroring\"; it must be able to catch *this specific bug*.\n- [ ] **Deterministic** — same verdict every run (for flaky bugs, a pinned high\n      reproduction rate).\n- [ ] **Fast** — seconds, not minutes.\n- [ ] **Agent-runnable** — runnable unattended; a human enters the loop only via the HITL\n      template.\n\nIf you catch yourself reading code to build a theory before this command exists, **stop.**\nJumping straight to a hypothesis is the exact failure this skill prevents. No red-capable\ncommand, no Phase 2.\n\n## Phase 2 — Reproduce and minimise\n\nRun the loop. Watch it go red. Confirm it produces the failure mode the **user** described\n— not a nearby one, since the wrong bug gets the wrong fix — that it reproduces across runs,\nand that you captured the exact symptom.\n\n**Minimise.** Shrink to the smallest scenario that still goes red: cut inputs, callers,\nconfig, data, and steps **one at a time**, re-running after each cut. Done when every\nremaining element is load-bearing. This shrinks the Phase 3 hypothesis space and becomes the\nPhase 5 regression test. Do not proceed until you have reproduced *and* minimised.\n\n## Phase 3: Hypothesise\n\nGenerate **3–5 ranked hypotheses** before testing any; single-hypothesis generation anchors\non the first plausible idea. Each must be **falsifiable** — state its prediction: *\"If X is\nthe cause, then changing Y will make the bug disappear.\"* If you cannot state the\nprediction, it is a vibe. Discard or sharpen it.\n\n**Show the ranked list to the user before testing** — they often re-rank it instantly (\"we\njust deployed a change to #3\"). Do not block on it; proceed with your ranking if they are away.\n\n## Phase 4: Instrument\n\nEach probe maps to a specific Phase 3 prediction. **Change one variable at a time.** Prefer\na debugger or REPL — one breakpoint beats ten logs — then targeted logs at the boundaries\nthat distinguish hypotheses. Never \"log everything and grep\". **Tag every debug log** with a\nunique prefix such as `[DEBUG-a4f2]`, so cleanup is one grep: untagged logs survive, tagged\nlogs die. **Performance regressions take the other branch** — logs are usually wrong.\nEstablish a baseline (timing harness, profiler, query plan), then bisect. Measure first.\n\n## Phase 5 — Fix and regression test\n\nWrite the regression test **before the fix**, but only if a **correct seam** exists: one\nwhere the test exercises the real bug pattern as it occurs at the call site. A seam that is\ntoo shallow — a single-caller test when the bug needs several — gives false confidence.\n**If no correct seam exists, that itself is the finding**: the architecture is preventing\nthe bug from being locked down, so carry it into Phase 6.\n\nOtherwise: turn the minimised repro into a failing test at that seam, watch it fail, apply\nthe fix, watch it pass, then re-run the Phase 1 loop against the original scenario.\n\n## Phase 6 — Cleanup and post-mortem\n\nRequired before declaring done:\n\n- [ ] Original repro is gone and the regression test passes (or no-seam is documented).\n- [ ] All `[DEBUG-...]` instrumentation removed (grep the prefix).\n- [ ] Throwaway prototypes deleted, or moved somewhere clearly marked.\n- [ ] The hypothesis that turned out correct is stated in the commit or PR message, so the\n      next debugger learns.\n\n**Then ask: what would have prevented this bug?** If the answer involves architectural\nchange — no good test seam, tangled callers, hidden coupling — hand off by calling the\nSkill tool with `improve-codebase-architecture` and the specifics, **after** the fix is in: you know more\nnow than when you started.\n\n## References\n\n- [FEEDBACK-LOOP.md](FEEDBACK-LOOP.md) — constructing, tightening, and salvaging the loop.\n","# Diagnosing Bugs\n\nA discipline for hard bugs. Skip phases only when explicitly justified. When exploring the\ncodebase, read `CONTEXT.md` if it exists for a mental model of the relevant modules, and\ncheck ADRs in the area you are touching.\n\n## Redact\n\nThis skill has you show commands, outputs, and captured artifacts. **Redact every secret\nfirst** — write `\u003CREDACTED>` in its place. Build loops against env vars so the credential\nstays in the environment rather than in what you show. Captured artifacts carry auth\nheaders: quote only the lines that carry the signal. If the redacted output is not enough to\ndiagnose the bug, say so and ask the user.\n\n## Phase 1: Build a feedback loop\n\n**This is the skill.** Everything else is mechanical. With a **tight** pass\u002Ffail signal that\ngoes red on *this* bug, you will find the cause — bisection, hypothesis-testing, and\ninstrumentation all just consume it. Without one, no amount of staring at code will save you.\nSpend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**\n\n### Completion criterion — a tight loop that goes red\n\nPhase 1 is done when you can name **one command** — a script path, a test invocation, a\ncurl — that you have **already run at least once** (show the invocation and its output,\nredacted), and that is:\n\n- [ ] **Red-capable** — drives the actual bug code path and asserts the **user's exact\n      symptom**, so it goes red on this bug and green once fixed. Not \"runs without\n      erroring\"; it must be able to catch *this specific bug*.\n- [ ] **Deterministic** — same verdict every run (for flaky bugs, a pinned high\n      reproduction rate).\n- [ ] **Fast** — seconds, not minutes.\n- [ ] **Agent-runnable** — runnable unattended; a human enters the loop only via the HITL\n      template.\n\nIf you catch yourself reading code to build a theory before this command exists, **stop.**\nJumping straight to a hypothesis is the exact failure this skill prevents. No red-capable\ncommand, no Phase 2.\n\n## Phase 2 — Reproduce and minimise\n\nRun the loop. Watch it go red. Confirm it produces the failure mode the **user** described\n— not a nearby one, since the wrong bug gets the wrong fix — that it reproduces across runs,\nand that you captured the exact symptom.\n\n**Minimise.** Shrink to the smallest scenario that still goes red: cut inputs, callers,\nconfig, data, and steps **one at a time**, re-running after each cut. Done when every\nremaining element is load-bearing. This shrinks the Phase 3 hypothesis space and becomes the\nPhase 5 regression test. Do not proceed until you have reproduced *and* minimised.\n\n## Phase 3: Hypothesise\n\nGenerate **3–5 ranked hypotheses** before testing any; single-hypothesis generation anchors\non the first plausible idea. Each must be **falsifiable** — state its prediction: *\"If X is\nthe cause, then changing Y will make the bug disappear.\"* If you cannot state the\nprediction, it is a vibe. Discard or sharpen it.\n\n**Show the ranked list to the user before testing** — they often re-rank it instantly (\"we\njust deployed a change to #3\"). Do not block on it; proceed with your ranking if they are away.\n\n## Phase 4: Instrument\n\nEach probe maps to a specific Phase 3 prediction. **Change one variable at a time.** Prefer\na debugger or REPL — one breakpoint beats ten logs — then targeted logs at the boundaries\nthat distinguish hypotheses. Never \"log everything and grep\". **Tag every debug log** with a\nunique prefix such as `[DEBUG-a4f2]`, so cleanup is one grep: untagged logs survive, tagged\nlogs die. **Performance regressions take the other branch** — logs are usually wrong.\nEstablish a baseline (timing harness, profiler, query plan), then bisect. Measure first.\n\n## Phase 5 — Fix and regression test\n\nWrite the regression test **before the fix**, but only if a **correct seam** exists: one\nwhere the test exercises the real bug pattern as it occurs at the call site. A seam that is\ntoo shallow — a single-caller test when the bug needs several — gives false confidence.\n**If no correct seam exists, that itself is the finding**: the architecture is preventing\nthe bug from being locked down, so carry it into Phase 6.\n\nOtherwise: turn the minimised repro into a failing test at that seam, watch it fail, apply\nthe fix, watch it pass, then re-run the Phase 1 loop against the original scenario.\n\n## Phase 6 — Cleanup and post-mortem\n\nRequired before declaring done:\n\n- [ ] Original repro is gone and the regression test passes (or no-seam is documented).\n- [ ] All `[DEBUG-...]` instrumentation removed (grep the prefix).\n- [ ] Throwaway prototypes deleted, or moved somewhere clearly marked.\n- [ ] The hypothesis that turned out correct is stated in the commit or PR message, so the\n      next debugger learns.\n\n**Then ask: what would have prevented this bug?** If the answer involves architectural\nchange — no good test seam, tangled callers, hidden coupling — hand off by calling the\nSkill tool with `improve-codebase-architecture` and the specifics, **after** the fix is in: you know more\nnow than when you started.\n\n## References\n\n- [FEEDBACK-LOOP.md](FEEDBACK-LOOP.md) — constructing, tightening, and salvaging the loop.\n",{"name":5,"description":7},"main","037fe34299eb9c4a30b51f1a6bd101eae1c469b1","04-validate-handoff\u002Fdiagnosing-bugs","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills","https:\u002F\u002Fgithub.com\u002Fr3dlex","2026-10-29 16:22:54",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add r3dlex\u002Fskills --skill diagnosing-bugs",{"tool":47,"command":48},"bunx","bunx skills add r3dlex\u002Fskills --skill diagnosing-bugs",{"tool":50,"command":51},"pnpm","pnpm dlx skills add r3dlex\u002Fskills --skill diagnosing-bugs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F04-validate-handoff\u002Fdiagnosing-bugs\u002FSKILL.md",true,[55,61],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"FEEDBACK-LOOP.md","REFERENCE","参考文档",2519,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F04-validate-handoff\u002Fdiagnosing-bugs\u002FFEEDBACK-LOOP.md",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"scripts\u002Fhitl-loop.template.sh","SCRIPT","脚本",1316,"https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002F04-validate-handoff\u002Fdiagnosing-bugs\u002Fscripts\u002Fhitl-loop.template.sh",[68,76,84,92,101,124],{"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":30},"01M6R652E42RZT7M2V3RWW991Z","skill","Fixture.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-malformed\u002Fskill\u002FSKILL.md",[],[75],"fixture",{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":30},"01M6R64MTPF0FGWHFS4DWP40GR","stable-skill","Fixture stable-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fstable-skill\u002FSKILL.md",[],[83,75],"stable skill",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":30},"01M6R64HD4QVAYM2R0JSYNVDJW","experimental-skill","Fixture experimental-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fexperimental-skill\u002FSKILL.md",[],[91,75],"experimental skill",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":30},"01M6R64FZH05TEJQW75QX1E5XD","deprecated-skill","Fixture deprecated-skill.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fcatalog-lifecycle\u002Fdeprecated-skill\u002FSKILL.md",[],[99,100,75],"deprecated skill","deprecated",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":30},"01M6R64D13X5DC980GREWFSSFQ","karpathy-guidelines","Apply think-before-coding, simplicity, surgical-change, and goal-driven engineering rules. Use when planning, implementing, or reviewing code.","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Freference\u002Fgolden-skills\u002F.agents\u002Fskills\u002Fkarpathy-guidelines\u002FSKILL.md",[],[108,109,110,111,25,112,113,114,115,116,117,118,28,119,120,121,122,123],"karpathy guidelines","karpathy","guidelines","Rules","simplicity","goal","think","driven","reviewing code","implementing","apply","coding","change","code","planning","engineering",{"skillNo":125,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":30},"01M6R640ZS60BRV9P49FT46ZJX","https:\u002F\u002Fgithub.com\u002Fr3dlex\u002Fskills\u002Fblob\u002Fmain\u002Freference\u002Fgolden-root\u002F.agents\u002Fskills\u002Fkarpathy-guidelines\u002FSKILL.md",[],[110,108,109,120,115,121,122,123,119,111,25,112,113,114,116,117,118,28]]