systematic-debugging 是什么?
systematic-debugging 用于定位程序故障的根因。它把工作拆成收集证据、比较正常模式、验证单一假设和修复复测四个阶段,要求先解释错误从哪里产生,再修改代码。
中文说明由本站依据来源整理;英文原文保留在页面下方。
适合用在
- 测试失败、运行行为异常、构建或集成出错,需要可复现地查明原因。
这些情况不适合
- 没有看到证据就连续尝试多个补丁,或借修一个Bug顺带大范围重构。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
systematic-debugging,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 systematic-debugging
请在 Codex 的当前工作环境中安装并检查 systematic-debugging 这个 Skill。
项目身份:obra/superpowers / systematic-debugging
来源:https://github.com/obra/superpowers/blob/22f0b463e7a5e579904dd6211a520321035526f7/skills/systematic-debugging/SKILL.md
已定位的源文件:skills/systematic-debugging/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 systematic-debugging
请在 Claude Code 的当前工作环境中安装并检查 systematic-debugging 这个 Skill。
项目身份:obra/superpowers / systematic-debugging
来源:https://github.com/obra/superpowers/blob/22f0b463e7a5e579904dd6211a520321035526f7/skills/systematic-debugging/SKILL.md
已定位的源文件:skills/systematic-debugging/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 systematic-debugging
请在 Cursor Agent 的当前工作环境中安装并检查 systematic-debugging 这个 Skill。
项目身份:obra/superpowers / systematic-debugging
来源:https://github.com/obra/superpowers/blob/22f0b463e7a5e579904dd6211a520321035526f7/skills/systematic-debugging/SKILL.md
已定位的源文件:skills/systematic-debugging/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 systematic-debugging
请在 当前 Agent 的当前工作环境中安装并检查 systematic-debugging 这个 Skill。
项目身份:obra/superpowers / systematic-debugging
来源:https://github.com/obra/superpowers/blob/22f0b463e7a5e579904dd6211a520321035526f7/skills/systematic-debugging/SKILL.md
已定位的源文件:skills/systematic-debugging/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 提供实际错误、复现步骤、相关代码与最近变动,准备能复现问题的环境或失败测试;跨服务问题需要各层日志与配置证据。
会得到什么
- 根因与证据链、最小复现或失败测试、修复差异,以及原故障和回归检查的实际结果。
实际使用顺序
- 先读完整错误和调用栈,尝试稳定复现,检查近期差异。多组件系统分别记录每层输入、输出与配置传播,沿错误数据追到首次产生异常的位置。
- 寻找相同工程中正常工作的实现,逐项比较差异和依赖,先理解完整模式再移植。
- 提出一个能被验证的具体假设,一次只改变一个变量,以最小实验判断;失败就回到证据,不叠加未证实的修复。
- 为根因保留失败测试或最小复现,再实施单一修复,复测原现象和相关回归。连续多次修复失败时重新讨论架构与假设,不能继续赌下一次补丁。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
使用 systematic-debugging 排查“编辑任务后,列表仍显示旧标题”的问题。先复现并记录保存请求、服务端写入和列表读取三个边界的数据,找出哪一步首次出现旧值。一次验证一个假设;查明根因后才改代码,保留能重现此Bug的检查并复测。不要先加随机延时。预期定位旧值出现的具体边界,并用修复前后结果验证判断;如果无法复现,报告尝试条件与缺失证据。本站未执行本例。
使用条件与边界
- 来源把三次修复仍无效作为重新讨论架构的停点,不是统计意义上证明架构必然错误。
- 环境、外部服务或时序问题也需要证据;调查后仍无法确定时应说明已排除和未确认部分。
常见问题
为什么不能把几个可能的修复一起试?
同时改变多个变量会让成功与失败都难以归因。来源要求单一假设和最小实验,确认后再修根因。
日志显示最后一步错误,就在那里修吗?
未必。错误值可能从上游传入;来源要求沿调用和数据路径回溯到首次产生错误的位置,而不是只包住最后报错点。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-17T19:31:50.806Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
skills/systematic-debugging/SKILL.md · 抓取时间 2026-11-17T19:31:50.806Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
查看源文件章节 / Source sections
- 原文:Systematic Debugging
- 原文:Overview
- 原文:The Iron Law
- 原文:When to Use
- 原文:The Four Phases
- 原文:Phase 1: Root Cause Investigation
- 原文:Phase 2: Pattern Analysis
- 原文:Phase 3: Hypothesis and Testing
- 原文:Phase 4: Implementation
- 原文:Red Flags - STOP and Follow Process
- 原文:your human partner's Signals You're Doing It Wrong
- 原文:Common Rationalizations
- 原文:Quick Reference
- 原文:When Process Reveals "No Root Cause"
- 原文:Supporting Techniques
原文:Overview
**Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure. **Violating the letter of this process is violating the spirit of debugging.**
原文:The Iron Law
``` NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST ``` If you haven't completed Phase 1, you cannot propose fixes.
原文:When to Use
Use for ANY technical issue: - Test failures - Bugs in production - Unexpected behavior - Performance problems - Build failures - Integration issues **Use this ESPECIALLY when:** - Under time pressure (emergencies make guessing tempting) - "Just one quick fix" seems obvious - You've already tried multiple fixes - Previous fix didn't work - You don't fully understand the issue **Don't skip when:** - Issue seems simple (simple bugs have root causes too) - You're in a hurry (rushing guarantees rework) - Manager wants it fixed NOW (systematic is faster than thrashing)
原文:The Four Phases
You MUST complete each phase before proceeding to the next.
原文:Phase 1: Root Cause Investigation
**BEFORE attempting ANY fix:** 1. **Read Error Messages Carefully** - Don't skip past errors or warnings - They often contain the exact solution - Read stack traces completely - Note line numbers, file paths, error codes 2. **Reproduce Consistently** - Can you trigger it reliably? - What are the exact steps? - Does it happen every time? - If not reproducible → gather more data, don't guess 3. **Check Recent Changes** - What changed that could cause this? - Git diff, recent commits - New dependencies, config changes - Environmental differences 4. **Gather Evidence in Multi-Component Systems** **WHEN system has multiple components (CI → build → signing, API → service → database):** **BEFORE proposing fixes, add diagnostic instrumentation:** ``` For EACH component boundary: - Log what data enters component - Log what data exits component - Verify environment/config propagation - Check state at each layer Run once to gather evidence showing WHERE it breaks THEN analyze evidence to identify failing component THEN investigate that specific component ``` **Example (multi-layer system):** ```bash # Layer 1: Workflow echo "=== Secrets available in workflow: ===" echo "IDENTITY: $([ -n "${IDENTITY:-}" ] && echo SET || echo UNSET)" # Layer 2: Build script echo "=== Env vars in build script: ===" printenv IDENTITY >/dev/null 2>&1 && echo "IDENTITY in environment" || echo "IDENTITY not in environment" # Layer 3: Signing script echo "=== Keychain state: ===" security list-keychains security find-identity -v # Layer 4: Actual signing codesign --sign "$IDENTITY" --verbose=4 "$APP" ``` **This reveals:** Which layer fails (secrets → workflow ✓, workflow → build ✗) 5. **Trace Data Flow** **WHEN error is deep in call stack:** See `root-cause-tracing.md` in this directory for the complete backward tracing technique. **Quick version:** - Where does bad value originate? - What called this with bad value? - Keep tracing up until you find the source - Fix at source, not at symptom
原文:Phase 2: Pattern Analysis
**Find the pattern before fixing:** 1. **Find Working Examples** - Locate similar working code in same codebase - What works that's similar to what's broken? 2. **Compare Against References** - If implementing pattern, read reference implementation COMPLETELY - Don't skim - read every line - Understand the pattern fully before applying 3. **Identify Differences** - What's different between working and broken? - List every difference, however small - Don't assume "that can't matter" 4. **Understand Dependencies** - What other components does this need? - What settings, config, environment? - What assumptions does it make?
文件 SHA256:51c6435d98c83c42c96ba7c35725a0b2c376cd487fb1a4e6bd0ddbe7e33ef202
仓库许可证记录:MIT;repository-license-recorded-scope-unverified,查看来源。
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
历史收录数据
| Skill标识 | systematic-debugging |
|---|---|
| 来源仓库 | obra/superpowers |
| 榜单快照 | 2026-07-28 |
| 榜单口径 | Skills.sh累计安装量 |
| 快照名次 | 116 |
| 快照累计安装量 | 203659 |
历史资料说明
- 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。
此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。
