Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/jnmetacode/superpowers-zh/systematic-debuggingnpx skills add jnMetaCode/superpowers-zh --skill systematic-debugginggit clone --depth 1 https://github.com/jnMetaCode/superpowers-zhWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jnmetacode/superpowers-zh/systematic-debugging)<a href="https://agentmods.dev/skills/jnmetacode/superpowers-zh/systematic-debugging"><img src="https://agentmods.dev/badge/skills/jnmetacode/superpowers-zh/systematic-debugging.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.02753 |
| Opus 5 | $0.00012 | $0.01376 |
| Sonnet 5 | $0.00005 | $0.00551 |
| Haiku 4.5 | $0.00002 | $0.00275 |
Grade A, and why
systematic-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.
系统化调试
概述
核心原则: 在尝试修复之前,务必先找到根本原因。只修症状就是失败。
敷衍走流程等于违背调试的精神。
铁律
不做根因调查,不许提修复方案
如果你还没完成第一阶段,就不能提出修复方案。
何时使用
用于任何技术问题:
- 测试失败
- 生产环境 bug
- 异常行为
- 性能问题
- 构建失败
- 集成问题
尤其在以下情况必须使用:
- 时间紧迫(紧急情况最容易让人猜测式修复)
- 觉得"一个小修改"就能搞定
- 已经尝试了多种修复
- 上一次修复没有生效
- 你没有完全理解问题
以下情况也不要跳过:
- 问题看起来很简单(简单的 bug 也有根本原因)
- 你很赶时间(越急越容易返工)
- 领导要求立刻修好(系统化调试比反复尝试更快)
四个阶段
你必须完成每个阶段后才能进入下一个。
第一阶段:根因调查
在尝试任何修复之前:
-
仔细阅读错误信息
- 不要跳过错误或警告
- 它们往往直接包含解决方案
- 完整阅读堆栈跟踪
- 记下行号、文件路径、错误码
-
稳定复现
- 你能可靠地触发它吗?
- 具体的复现步骤是什么?
- 每次都能复现吗?
- 如果无法复现 → 收集更多数据,不要猜测
-
检查近期变更
- 什么变更可能导致了这个问题?
- git diff、最近的提交
- 新依赖、配置变更
- 环境差异
-
在多组件系统中收集证据
当系统有多个组件时(CI → 构建 → 签名,API → 服务 → 数据库):
在提出修复方案之前,先添加诊断埋点:
对每个组件边界: - 记录进入组件的数据 - 记录离开组件的数据 - 验证环境/配置的传递 - 检查每一层的状态 执行一次以收集证据,确定断裂点在哪里 然后分析证据,定位故障组件 然后针对该组件深入调查示例(多层系统):
# 第 1 层:工作流 echo "=== Secrets available in workflow: ===" echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}" # 第 2 层:构建脚本 echo "=== Env vars in build script: ===" env | grep IDENTITY || echo "IDENTITY not in environment" # 第 3 层:签名脚本 echo "=== Keychain state: ===" security list-keychains security find-identity -v # 第 4 层:实际签名 codesign --sign "$IDENTITY" --verbose=4 "$APP"由此可以看出: 哪一层出了问题(secrets → workflow ✓, workflow → build ✗)
-
跟踪数据流
当错误发生在调用栈深处时:
参见本目录下的
root-cause-tracing.md,了解完整的反向追踪技术。简要版本:
- 错误值从哪里产生的?
- 谁用错误值调用了这里?
- 持续向上追踪直到找到源头
- 在源头修复,而不是在症状处修复
第二阶段:模式分析
先找到模式,再修复:
-
找到可正常工作的示例
- 在同一代码库中找到类似的正常代码
- 有什么正常的代码与出问题的代码相似?
-
与参考实现对比
- 如果是实现某个模式,完整阅读参考实现
- 不要略读——逐行阅读
- 在应用之前彻底理解该模式
-
识别差异
- 正常代码和出问题的代码之间有什么不同?
- 列出每一个差异,无论多小
- 不要假设"那不可能有影响"
-
理解依赖关系
- 这个功能需要哪些其他组件?
- 需要哪些设置、配置、环境?
- 它有哪些隐含假设?
第三阶段:假设与验证
科学方法:
- 提出单一假设
- 清晰地陈述:"我认为 X 是根本原因,因为 Y"
- 写下来
- 要具体,不要含糊
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 290 lines · 24 tokens per session scan A f0e3e21f0d81
systematic-debugging is a skill published in the GitHub repository jnMetaCode/superpowers-zh (7,965 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 2,753 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
cocos-creator-drawcall
优化 Cocos Creator 渲染性能时使用。合批、图集、动静分离、Label。.
cocos-creator-hotupdate
给 Cocos Creator 原生包做热更新时使用。version manifest、增量、校验、回滚。.
cocos-creator-tween-anim
写 Cocos Creator 动效/动画时使用。tween、Animation、Spine、性能与清理。.
cocos-creator-ui-list
做 Cocos Creator 大量条目列表时使用。虚拟列表、节点复用。.
cocos-creator-adaptation
做 Cocos Creator 多机型/多分辨率适配时使用。Canvas、Widget、安全区。.
cocos-creator-bundle
Cocos Creator 用 AssetBundle 做分包/远程资源时使用。加载、释放、依赖、缓存。.