agentleFS
wannanbigpigwannanbigpig/ai-engineering-collaboration/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill2 starsChanged 7 days agoMITView on GitHub

排查根因未明的本地 Bug、测试或构建失败、性能与集成异常。

190 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions 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.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-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 20 projects that use this

  • mjunaidcaSkill

    building-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

  • mjunaidcaSkill

    building-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

  • +2 more from Leodorareluctant259
  • +5 more from mjunaidca

The file

Files
SKILL.md

系统化调试

针对本地 Bug、测试/构建失败、性能异常、集成问题和非预期行为排查根因。以下步骤按证据缺口选择,不是固定流水线;当前证据已确认根因时直接进入最小修复与复验。

项目有 .aitasks/ 时,先从当前可发现的 Skill 中定位可选的 aitasks-maintenance,存在才读取其目录内的 references/query.md,不加载维护流程或假定相邻安装。未安装或不支持只读查询时,用本 Skill 自带的只读查询脚本:python3 -B "<skill-dir>/scripts/query_aitasks.py" --project-root "<project-root>" context --query "模块 符号 错误码",按返回 ID 用 get-record --kind lesson --id …(todo 用 --kind todo)取必要正文,由脚本处理状态与围栏边界。Python 不可用时只取少量标题及所属元数据定位线索,无法核实的正文与适用性标为未验证,依据当前代码取证,不临时编写经验解析器。经验须与当前失败证据核对。

流程

  1. 读取失败证据:先收集相关完整异常链和必要日志上下文、版本、输入与环境;证据不足再扩大范围,不默认读取全部历史日志。
  2. 稳定复现:用现有测试或最小脚本构造可重复场景;不能稳定复现时记录条件、频率和已尝试方式。
  3. 比较差异:检查近期提交、配置、依赖、系统、资源和外部服务,优先核对与问题时间吻合的变化。
  4. 跟踪数据流:从入口沿调用链核对实际实现;已知目标文件和局部关系直接检索、读取,尚不明确的结构或跨模块关系在已接入 CodeGraph 时优先用图谱定位,再核对实际文件。记录关键输入输出,定位第一个偏离预期的环节。
  5. 提出假设:可保留多个有证据支持的候选原因,分别说明预期现象;每次实验只检验一个关键假设,不把尚未排除的候选提前当作唯一根因。
  6. 最小实验:选择能区分候选原因的最小实验,控制关键变量并记录结果及排除理由;没有新证据时不换命令重复同一实验,先指出缺失的输入、观测或访问条件,重估调查方向。缺口无法补齐时说明限制,停止无效循环。
  7. 回归保护:复用已有失败测试,缺少有效保护时再添加修复前失败、修复后通过的测试;无法稳定自动化或回归价值低时记录原因与替代验证。预期失败属于验证证据。
  8. 最小修复与复验:只改根因范围,选择覆盖原问题与受影响风险的验证,保持既有输入输出边界。定向运行与完整发现覆盖相同测试时只执行一种;需要扩大覆盖范围,或支撑结论的代码、输入、依赖、配置、环境变化时再补充验证,不因进入收尾重跑等价检查。

边界

只读诊断不写测试或修改文件,输出根因证据和建议后停止;用户已要求修复时继续授权内的最小修复。复用已完成的复现、风格基线和验证,仅补剩余缺口。未知共享行为或契约影响才需要额外分析;由入口调度时返回缺口,不递归加载专项。独立使用无需加载其他 Skill,无法确认的行为标记未验证。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.