diagnose
Diagnose
处理困难 bug 的纪律。只有在理由明确时才跳过阶段。
Phase 1 — Build a feedback loop
这就是这个 skill 的核心。 其他部分都是机械流程。如果你有一个快速、确定、agent 可运行的 pass/fail 信号来覆盖这个 bug,你就能找到原因;bisection、hypothesis-testing 和 instrumentation 都只是消费这个信号。没有它,盯着代码看再久也救不了你。
在这里投入不成比例的精力。要主动。要有创造性。不要轻易放弃。
构造反馈环的方式,按大致顺序尝试
- Failing test,放在能触达 bug 的 seam 上,可以是 unit、integration、e2e。
- 针对运行中 dev server 的 Curl / HTTP script。
- 带 fixture input 的 CLI invocation,把 stdout 和已知正确 snapshot 做 diff。
- Headless browser script(Playwright / Puppeteer),驱动 UI,并断言 DOM/console/network。
- Replay a captured trace. 把真实 network request、payload 或 event log 存到磁盘,隔离重放到对应 code path。
- Throwaway harness. 启动系统的最小子集(一个 service、mocked deps),用一次函数调用触发 bug code path。
- Property / fuzz loop. 如果 bug 是“有时输出错误”,运行 1000 个随机输入来寻找失败模式。
More from vinvcn/mattpocock-skills-zh-cn
grill-me
围绕 plan 或 design 持续 interview user,直到达成 shared understanding,并逐一解决 decision tree 的每个分支。Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
121grill-with-docs
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
117tdd
使用 red-green-refactor loop 做 test-driven development。Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
116setup-matt-pocock-skills
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
113caveman
>
112zoom-out
让 agent zoom out,并给出更广的 context 或更高层 perspective。Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
111