diagnose

Installation
SKILL.md

Diagnose

处理困难 bug 的纪律。只有在理由明确时才跳过阶段。

Phase 1 — Build a feedback loop

这就是这个 skill 的核心。 其他部分都是机械流程。如果你有一个快速、确定、agent 可运行的 pass/fail 信号来覆盖这个 bug,你就能找到原因;bisection、hypothesis-testing 和 instrumentation 都只是消费这个信号。没有它,盯着代码看再久也救不了你。

在这里投入不成比例的精力。要主动。要有创造性。不要轻易放弃。

构造反馈环的方式,按大致顺序尝试

  1. Failing test,放在能触达 bug 的 seam 上,可以是 unit、integration、e2e。
  2. 针对运行中 dev server 的 Curl / HTTP script
  3. 带 fixture input 的 CLI invocation,把 stdout 和已知正确 snapshot 做 diff。
  4. Headless browser script(Playwright / Puppeteer),驱动 UI,并断言 DOM/console/network。
  5. Replay a captured trace. 把真实 network request、payload 或 event log 存到磁盘,隔离重放到对应 code path。
  6. Throwaway harness. 启动系统的最小子集(一个 service、mocked deps),用一次函数调用触发 bug code path。
  7. Property / fuzz loop. 如果 bug 是“有时输出错误”,运行 1000 个随机输入来寻找失败模式。
Related skills
Installs
112
GitHub Stars
132
First Seen
8 days ago