systematic-debugging
Skill1 starsChanged 3 months agoMITView on GitHub
遇到任何 bug、测试失败、意外行为时,先找根因再动手改,不要猜
191 other projects use a version of this.
Adopted by
Most recently taken up by
- NousResearch/hermes-agenttheir own version, first seen Nov 13, 2026
- andreymudri/fleetmatestheir own version, first seen Oct 5, 2026
- fmind/dottheir own version, first seen Oct 5, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- asta-nguyen/kamehadbtheir own version, first seen Oct 4, 2026
- LayneChai/superpowers-dshtheir own version, first seen Oct 3, 2026
Used with
Projects with it also use diagnosing-superpowers, building-chatgpt-apps and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
obraSkilldiagnosing-superpowers
Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.
Also in 6 projects that use this
mjunaidcaSkillbuilding-chatgpt-apps
Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).
Also in 4 projects that use this
mjunaidcaSkillbuilding-chat-interfaces
Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.
Also in 4 projects that use this
MorningStar0709Skillchinese-git-workflow
Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".
Also in 4 projects that use this
- +8 more from mjunaidca
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- obra/superpowers★ 314ksame name
- NousResearch/hermes-agent★ 267ksame name
- open-metadata/OpenMetadata★ 15ksame name
- jnMetaCode/superpowers-zh★ 8.3ksame name
- openai/plugins★ 7.3ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- microsoft/FluidFramework★ 4.9ksame name
- compozy/compozy★ 2.8ksame name
- GanyuanRan/Aegis★ 1.3ksame name
- SethGammon/Citadel★ 922same name
181 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- brainstormingSkill
- code-reviewSkill
- debug-productionSkill
- frontend-tasteSkill
- handoffSkill
- plain-writingSkill
- pre-commit-checkSkill
- test-driven-developmentSkill
- writing-plansSkill
The file
Files
系统化调试
触发条件
遇到 bug、测试失败、报错、行为和预期不一致时,先加载本 skill 再动手改。 用户说"这明显是 X,直接改"也算。
铁律
没找到根因之前,不许提修复方案。症状级修复 = 失败。急的时候、觉得"明显是 X"的时候、已经试了好几次的时候——最要用这个流程。
四阶段(必须按顺序走完)
Phase 1:根因调查
动任何修复之前:
- 仔细读错误信息。不要跳过 error/warning,完整读 stack trace,记下文件、行号、错误码。
- 稳定复现。每次都能触发吗?步骤是什么?复现不了就继续收集数据,不要猜。
- 看最近改了什么。
git diff、最近 commit、新加的依赖、改的配置、环境差异。 - 多组件系统要插桩。如果错误跨多个组件(CI → build → 签名;API → service → DB),在每个组件边界加日志:进什么、出什么、环境传对没。跑一次看到底在哪一层断,再去查那一层。
- 追数据流。错误在调用栈深处?从坏值往回追:这个坏值哪来的?谁把它传进来的?一直追到源头,在源头修,不在症状修。
Phase 2:模式分析
- 找能跑的类似代码——同 repo 里做类似事情但没坏的那段。
- 读参考实现时完整读完,不要 skim。
- 列出来:能跑的和坏的差在哪?再小的差异也列。
- 搞清楚依赖:还需要什么组件、配置、环境假设。
Phase 3:假设与验证
科学方法:
- 只写一个假设:"我认为根因是 X,因为 Y"。写下来。
- 最小改动验证。一次只改一个变量。不要同时试好几种修复。
- 好了?进 Phase 4。没好?换一个新假设,不要在老假设上叠加修复。
- 真不懂就说"我不懂 X",不要装懂。
Phase 4:实现
- 先写复现测试(见
test-driven-development)。最简单的复现,能自动化就自动化。 - 一次只改一个东西。不要"顺手改"。
- 验证:复现测试过了?其他测试没挂?问题真的解决了?
- 改了没好:
- 已经试了几次?
- < 3 次:回 Phase 1,带新信息重新分析。
- ≥ 3 次:停下来,质疑架构。 见下面。
改了 3 次还没好 = 架构有问题
信号:
- 每次修复都暴露另一个地方的共享状态/耦合问题
- 修复需要"大重构"才能做
- 修一处坏另一处
停下来:
- 这个模式本身是不是有问题?
- 是不是纯粹靠惯性硬撑?
- 应该重构成什么样子?和用户讨论,不要直接上第 4 次修复。
这不是"假设错了",这是"架构错了"。
红旗:你正在违反流程
心里出现这些声音,立刻停下回到 Phase 1:
- "先快速修一下,回头再查"
- "改改 X 看看能不能行"
- "加一堆改动一起跑测试"
- "跳过测试,我手动验证"
- "大概是 X,直接修吧"
- "我不完全懂,但这个可能行"
- 已经失败 2 次了还想"再试一次"
- 每次修复都在新地方引出新问题
常见合理化借口
| 借口 | 真相 |
| "问题很简单,不用走流程" | 简单 bug 也有根因,流程对简单问题更快。 |
| "紧急没时间" | 系统化调试比瞎猜快。 |
| "先试试这个,再查" | 第一次修复就定调,一开始就做对。 |
| "确认好修后再补测试" | 没看过测试红,不知道它测的是什么。 |
| "一次改多个省时间" | 没法定位是哪个改好了,还引入新 bug。 |
| "参考太长我按自己理解改" | 没读完参考实现 = 必出 bug。 |
| "我看到问题了,直接修" | 看到症状 ≠ 理解根因。 |
什么时候算"真没有根因"
如果调查后发现确实是环境/时序/外部问题:
- 你走完了流程
- 记录你查过什么
- 加合适的处理(重试、超时、友好错误)
- 加日志/监控,方便下次查
但 95% 的"没有根因"是调查不完整。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

