diagnosing-bugs 是什么?
先建立能捕捉用户原始症状的快速反馈循环,再复现、缩小场景、检验可证伪假设并修复。它把‘能反复看见这个错误’作为诊断基础,避免只读代码就猜原因。
中文说明由本站依据来源整理;英文原文保留在页面下方。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
diagnosing-bugs,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 diagnosing-bugs
请在 Codex 的当前工作环境中安装并检查 diagnosing-bugs 这个 Skill。
项目身份:mattpocock/skills / diagnosing-bugs
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/diagnosing-bugs/SKILL.md
已定位的源文件:skills/engineering/diagnosing-bugs/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 diagnosing-bugs
请在 Claude Code 的当前工作环境中安装并检查 diagnosing-bugs 这个 Skill。
项目身份:mattpocock/skills / diagnosing-bugs
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/diagnosing-bugs/SKILL.md
已定位的源文件:skills/engineering/diagnosing-bugs/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 diagnosing-bugs
请在 Cursor Agent 的当前工作环境中安装并检查 diagnosing-bugs 这个 Skill。
项目身份:mattpocock/skills / diagnosing-bugs
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/diagnosing-bugs/SKILL.md
已定位的源文件:skills/engineering/diagnosing-bugs/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 diagnosing-bugs
请在 当前 Agent 的当前工作环境中安装并检查 diagnosing-bugs 这个 Skill。
项目身份:mattpocock/skills / diagnosing-bugs
来源:https://github.com/mattpocock/skills/blob/5863806dd4e15c63174bee4e7515a4256792ecfa/skills/engineering/diagnosing-bugs/SKILL.md
已定位的源文件:skills/engineering/diagnosing-bugs/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供具体症状、复现输入与可访问环境。可用失败测试、HTTP脚本、CLI夹具、浏览器操作或脱敏回放构建信号;完整目录包含人工介入反馈循环模板。
会得到什么
- 能复现原症状的命令、最小场景、被证据支持的原因和修复复测结果。
实际使用顺序
- 先做一个能对该症状判红/绿、实际至少运行过一次的命令;非确定性问题优先提高复现率,不能只检查进程没崩。
- 在这个循环里删除无关输入和依赖,直到剩余每个元素对复现都必要。
- 列3至5个可证伪假设,每个说明改变什么变量会看到什么;逐次只改一个变量,用定向日志、调试器或性能测量获取证据。
- 存在正确测试入口时先把最小场景固化成失败回归测试,再修复并重跑原始场景;最后清理临时日志和实验工件,记录确认的原因。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
教学示例:请用diagnosing-bugs调查搜索框输入‘部署’后结果为空的问题。先构建能触发并断言该症状的浏览器或接口命令,实际运行;缩小数据与输入后,再给可证伪假设逐个验证。日志脱敏,不先重写搜索实现,不以HTTP200作为搜索正常的证据。预期先得到真实可复现信号,之后才有因果诊断和修复;本站未运行此教学任务。
使用条件与边界
- 无法建立反馈循环时,来源要求说清尝试与缺失环境,不继续把猜想包装成原因。
- 回归测试必须覆盖真实调用链;过浅的测试通过不能锁住原故障。
常见问题
偶发错误不能稳定复现还能用吗?
可以,先通过固定种子、重复触发、并发或时序控制提高复现率,并记录实际概率;不能把一次没报错称作已修复。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/engineering/diagnosing-bugs/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
查看源文件章节 / Source sections
- 原文:Diagnosing Bugs
- 原文:Redact
- 原文:Phase 1: Build a feedback loop
- 原文:Ways to construct one, in roughly this order
- 原文:Tighten the loop
- 原文:Non-deterministic bugs
- 原文:When you genuinely cannot build a loop
- 原文:Completion criterion: a tight loop that goes red
- 原文:Phase 2: Reproduce + minimise
- 原文:Minimise
- 原文:Phase 3: Hypothesise
- 原文:Phase 4: Instrument
- 原文:Phase 5: Fix + regression test
- 原文:Phase 6: Cleanup
原文:Diagnosing Bugs
A discipline for hard bugs. Skip phases only when explicitly justified. When exploring the codebase, read `GLOSSARY.md` (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
原文:Redact
This skill has you show commands, outputs and captured artifacts. **Redact every secret first**: write `<REDACTED>` in its place. Build loops against env vars, so the credential stays in the environment rather than in what you show. Captured artifacts carry auth headers: quote only the lines that carry the signal. If the redacted output is not enough to diagnose the bug, say so and ask the user.
原文:Phase 1: Build a feedback loop
**This is the skill.** Everything else is mechanical. If you have a **tight** pass/fail signal for the bug (one that goes red on _this_ bug), you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you. Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**
原文:Ways to construct one, in roughly this order
1. **Failing test** at whatever seam reaches the bug: unit, integration, e2e. 2. **Curl / HTTP script** against a running dev server. 3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot. 4. **Headless browser script** (Playwright / Puppeteer) that drives the UI and asserts on DOM/console/network. 5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay it through the code path in isolation. 6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call. 7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode. 8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can `git bisect run` it. 9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs. 10. **HITL bash script.** Last resort. If a human must click, drive _them_ with `scripts/hitl-loop.template.sh` so the loop is still structured. Captured output feeds back to you. Build the right feedback loop, and the bug is 90% fixed.
原文:Tighten the loop
Treat the loop as a product. Once you have _a_ loop, **tighten** it: - Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.) - Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".) - Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.) A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight, a debugging superpower.
原文:Non-deterministic bugs
The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not, so keep raising the rate until it's debuggable.
文件 SHA256:849198df88cdb65fd0d97236604c1fca7ff2f22d2f705f9724a800d0266b118d
仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
历史收录数据
| Skill标识 | diagnosing-bugs |
|---|---|
| 来源仓库 | mattpocock/skills |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 90 |
| 快照累计安装量 | 257873 |
历史资料说明
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
