diagnosing-bugs

Installation
SKILL.md

Diagnosing Bugs

面向棘手 bugs 的纪律。只有在明确说明理由时才跳过阶段。

探索 codebase 时,先读取 CONTEXT.md(如果存在),建立相关 modules 的清晰 mental model,并检查你将触碰区域的 ADRs。

Redact

这个 skill 会要求你展示 commands、outputs 和捕获的 artifacts。先 redact 掉每个 secret——用 <REDACTED> 替换。Build loops 要针对 env vars 进行,让 credential 留在 environment 里而不是你展示的内容中。捕获的 artifacts 带有 auth headers:只引用携带 signal 的那些行。

如果 redact 后的 output 不足以诊断 bug,就说明情况并询问用户。

Phase 1 - Build a feedback loop

这就是这个 skill 的核心。 其他所有内容都是机械步骤。如果你拥有一个针对该 bug 的 tight pass/fail signal,即它会在 这个 bug 上变红,你就能找到原因;bisection、hypothesis-testing 和 instrumentation 都只是消费这个 signal。没有它,盯着代码看多久都救不了你。

在这里投入不成比例的精力。要强硬、要有创造力、拒绝放弃。

Ways to construct one - try them in roughly this order

Installs
2.7K
GitHub Stars
3.6K
First Seen
Jul 3, 2026
diagnosing-bugs — vinvcn/mattpocock-skills-zh-cn