debug-diagnose
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "debug-diagnose":https://skillpi.com/zh/skills/deepskill-2e69221516ebe74946c128bfdf899c17f34a1622c499cda31580321aa93c9b50。安装前核对上游来源和版本:https://github.com/theneoai/awesome-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
以构建可靠反馈循环为核心的结构化六阶段调试流程,适用于在提出假设之前建立反馈机制。适用场景:难以复现的问题、性能退化、神秘故障、基于智能体的根因分析、系统性缺陷修复。
介绍来源: third_party · theneoai · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: debug-diagnose
kind: workflow
version: 1.0.0
tags:
- domain: engineering
- subtype: debug-diagnose
- methodology: structured-debugging
description: "Structured six-phase debugging workflow centered on building a reliable feedback loop before theorizing. Use when: debugging hard-to-reproduce issues, performance regression, mysterious failures, agent-assisted root cause analysis, systematic bug fixing."
license: MIT
metadata:
author: theNeoAI <lucas_hsueh@hotmail.com>
inspired_by: mattpocock/skillsDebug & Diagnose
One-Liner
Build a fast, deterministic, agent-runnable pass/fail signal first — the bug is 90% fixed once you have that.
§ 1 · Core Philosophy
The critical insight: If you have a fast, deterministic, agent-runnable pass/fail signal for the bug, you will find the cause. Without it, you are guessing.
Most debugging fails not because the engineer lacks knowledge, but because they skip directly to hypotheses without first establishing a reproducible signal. Build the loop, then let the loop drive everything else.
§ 2 · The Six Phases
Phase 1 — Build a Feedback Loop
Create the fastest reproducible test signal you can. Options in order of preference:
- Unit test — isolates the exact failing condition
- Integration test — exercises the real subsystem path
- CLI script — passes known-bad input, asserts known-bad output
- REPL session — interactive exploration to narrow the search space
- Fuzz input — for non-deterministic or data-dependent failures
Key constraints:
- Must be runnable by the agent without human interaction
- Must produce pass/fail, not just "looks wrong"
- Must be deterministic (same input → same result)
Be aggressive and creative. Refuse to give up. A slow loop is better than no loop; a noisy loop can be narrowed.
Gate: You have a script/test that reproducibly demonstrates the failure.
Phase 2 — Reproduce
Run the loop and confirm it demonstrates exactly the reported failure — not a nearby issue, not a similar symptom.
If the loop shows a different failure than reported:
- You have found a second bug (note it, don't pursue it now)
- Continue narrowing until the loop matches the report precisely
Gate: Loop output matches the failure description word-for-word.
Phase 3 — Hypothesize
Before touching any code, generate 3–5 ranked hypotheses. Each must be:
- Falsifiable — a specific, testable prediction
- Ranked — order by likelihood given what you know
- Independent — don't let one hypothesis assume another is true
Write them down. Do not skip this step even if one hypothesis feels obvious — the obvious hypothesis is frequently wrong.
Phase 4 — Instrument
Test hypotheses in ranked order. For each:
- Add targeted instrumentation at the relevant boundary (not blanket logging)
- Use a debugger or tagged log output, not
print-everywhere - Run the feedback loop
- Does the output confirm or falsify the hypothesis?
Stop when one hypothesis is confirmed. Remove instrumentation from all falsified hypotheses immediately to keep signal clean.
Anti-pattern: Adding instrumentation for all hypotheses at once. You lose the ability to read the signal.
Phase 5 — Fix + Regression Test
- Write a test at the appropriate architectural seam that fails because of the bug — before writing the fix
- Implement the minimal fix
- Confirm: feedback loop is now green, new regression test is green, existing tests still green
- If the fix required touching more than one module, consider whether the modules should be decoupled
Phase 6 — Cleanup + Post-Mortem
- Remove all debug instrumentation
- Verify the feedback loop test is committed (it is now a permanent regression guard)
- Document findings:
- Root cause in one sentence
- Why the bug was not caught earlier
- What architectural change (if any) would prevent the class of bug
§ 3 · Quick Reference
Phase 1: BUILD THE LOOP (deterministic, agent-runnable, pass/fail)
Phase 2: REPRODUCE (confirm the loop shows exactly the reported failure)
Phase 3: HYPOTHESIZE (3-5 ranked, falsifiable hypotheses — written down)
Phase 4: INSTRUMENT (targeted, one hypothesis at a time)
Phase 5: FIX + REGRESSION TEST (test first, then fix)
Phase 6: CLEANUP + POST-MORTEM (remove debug code, document root cause)
§ 4 · When to Use This Skill
Use when:
- A bug is hard to reproduce or intermittent
- A performance regression appeared without obvious cause
- The same bug keeps recurring
- An agent is stuck in a "try random things" loop
- You need to present root cause analysis to stakeholders
Do NOT use when:
- The bug is a typo or trivially obvious from the error message
- You need to design a new feature (use
to-prd) - The codebase is unfamiliar — run
zoom-outfirst
§ 5 · Relationship to Other Skills
| Skill | When to reach for it |
|---|---|
zoom-out |
Unfamiliar codebase — map it before Phase 1 |
tdd-workflow |
Once the bug is fixed — retrofit the regression test into the test suite |
architecture-review |
Post-mortem reveals a structural issue |
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供结构化六阶段调试方法论,解决难复现问题和性能退化等高频痛点
- 强调构建确定性反馈循环的核心理念,具有强实践指导价值
亮点
- description明确覆盖多种调试场景变体,边界清晰
待提升项
-
缺少When to Use显式章节标题 原报告严重程度:轻微
§4内容实质完整但未使用标准'When to Use'标题
改进建议:建议将'§ 4 · When to Use This Skill'改为标准'## When to Use'格式以保持一致性
-
文档结构可优化 原报告严重程度:轻微
Phase间分隔符风格不完全统一
改进建议:建议统一使用相同的分隔符样式(如全部使用---或全部使用空行+标题)
亮点
- 六阶段划分清晰,每阶段有明确目标和出口门控
- frontmatter完整,包含必要元数据和许可证信息
亮点
- 方法论定义明确,各阶段操作参数正确
- 覆盖主要异常情况并提供处理建议
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。