diagnose 是什么?
历史版疑难故障诊断方法:先造出快速可重复的失败信号,再验证原始症状、提出可证伪假设、定向观测并修复,最后重跑原始场景和合适的回归测试。
中文说明由本站依据来源整理;英文原文保留在页面下方。
同名项目,请核对仓库和目录
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
diagnose,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 diagnose
请在 Codex 的当前工作环境中安装并检查 diagnose 这个 Skill。
项目身份:mattpocock/skills / diagnose
来源:https://github.com/mattpocock/skills/blob/7afa86d3a5dd96edde06ffa014e16c64e733681e/skills/engineering/diagnose/SKILL.md
已定位的源文件:skills/engineering/diagnose/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 diagnose
请在 Claude Code 的当前工作环境中安装并检查 diagnose 这个 Skill。
项目身份:mattpocock/skills / diagnose
来源:https://github.com/mattpocock/skills/blob/7afa86d3a5dd96edde06ffa014e16c64e733681e/skills/engineering/diagnose/SKILL.md
已定位的源文件:skills/engineering/diagnose/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 diagnose
请在 Cursor Agent 的当前工作环境中安装并检查 diagnose 这个 Skill。
项目身份:mattpocock/skills / diagnose
来源:https://github.com/mattpocock/skills/blob/7afa86d3a5dd96edde06ffa014e16c64e733681e/skills/engineering/diagnose/SKILL.md
已定位的源文件:skills/engineering/diagnose/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 diagnose
请在 当前 Agent 的当前工作环境中安装并检查 diagnose 这个 Skill。
项目身份:mattpocock/skills / diagnose
来源:https://github.com/mattpocock/skills/blob/7afa86d3a5dd96edde06ffa014e16c64e733681e/skills/engineering/diagnose/SKILL.md
已定位的源文件:skills/engineering/diagnose/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供真实症状、脱敏输入和可访问复现环境;可以用测试、HTTP/CLI脚本、浏览器操作或回放建立反馈循环。
会得到什么
- 可复现的失败信号、被验证的原因、修复与相关回归结果。
实际使用顺序
- 先构造能捕捉该症状的反馈循环,反复缩短并提高信号确定性;无法建立时明确列出所需环境或工件。
- 确认复现的是用户报告的同一个错误,再列3至5个可证伪假设,按预测一次改一个变量。
- 在能覆盖真实模式的入口先写失败回归测试,再修复并重跑完整原始场景,清理临时日志和实验文件,最后讨论什么能预防复发。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
教学示例:用历史diagnose研究接口偶发返回空列表的问题。先建立可重复输入并断言空列表症状的脚本,记录复现率,再逐项检验假设。所有凭证留在环境变量中,报告脱敏;不要凭一次成功请求就声称修复。预期有针对原症状的观测和诊断记录;本例未运行。
使用条件与边界
- 本页依据历史版本,另一个诊断Skill可能有新增阶段或不同完成标准,应读实际版本。
- 原文有‘一定找到原因’等鼓励性表达,本页不将其当作对所有故障的保证。
来源原文与资料状态
- 来源版本
- 历史源文件(2026-04-28T16:33:37+01:00);原目录已变更,本页解释所链接的历史版本,不代表当前安装方式。
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-17T10:52:05.731Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/engineering/diagnose/SKILL.md · 抓取时间 2026-11-17T10:52:05.731Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.
查看源文件章节 / Source sections
- 原文:Diagnose
- 原文:Phase 1 — Build a feedback loop
- 原文:Ways to construct one — try them in roughly this order
- 原文:Iterate on the loop itself
- 原文:Non-deterministic bugs
- 原文:When you genuinely cannot build a loop
- 原文:Phase 2 — Reproduce
- 原文:Phase 3 — Hypothesise
- 原文:Phase 4 — Instrument
- 原文:Phase 5 — Fix + regression test
- 原文:Phase 6 — Cleanup + post-mortem
原文:Diagnose
A discipline for hard bugs. Skip phases only when explicitly justified. When exploring the codebase, use the project's domain glossary to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
原文:Phase 1 — Build a feedback loop
**This is the skill.** Everything else is mechanical. If you have a fast, deterministic, agent-runnable pass/fail signal for the bug, you will find the cause — bisection, hypothesis-testing, and instrumentation all just consume that signal. 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 — try them 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) — drives the UI, 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.
原文:Iterate on the loop itself
Treat the loop as a product. Once you have _a_ loop, ask: - 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 loop is 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 — keep raising the rate until it's debuggable.
原文:When you genuinely cannot build a loop
Stop and say so explicitly. List what you tried. Ask the user for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do **not** proceed to hypothesise without a loop. Do not proceed to Phase 2 until you have a loop you believe in.
文件 SHA256:28886402bbfa0470248086eab9106a103b964b76ae9496e63ff0c8a6761b6d13
仓库许可证记录:未提供;not-established,查看来源。
Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user…
这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。
历史收录数据
| Skill标识 | diagnose |
|---|---|
| 来源仓库 | mattpocock/skills |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 95 |
| 快照累计安装量 | 234424 |
历史资料说明
- 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
