agentleFS
lightpointventureslightpointventures/claude-code-starter/skills/debug/SKILL.md

debug

Skill36 starsChanged 8 months agoMITView on GitHub

当用户遇到复杂 bug、问题反复出现、找不到原因时使用 — 用科学方法逐步排查,禁止猜测性修复

144 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-ollama-tool, add-slack 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.
  • MicrosoftSkill

    add-ollama-tool

    Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

    Also in 6 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 6 projects that use this

  • sskarzSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 5 projects that use this

  • +9 more from microsoft

The file

Files
SKILL.md

系统化调试

用科学方法排查问题,不要猜、不要碰运气。每一步都要有证据支撑。

核心原则

  • 禁止「改一下试试看」— 每次修改必须基于明确的假设
  • 禁止跳步 — 必须按顺序执行每个步骤
  • 记录每一步的发现 — 避免兜圈子

步骤

1. 理解问题

询问用户:

遇到了什么问题?可以描述现象、贴报错信息、或者告诉我哪个功能不正常。

收集信息:

  • 错误信息(完整的报错日志或截图)
  • 什么时候开始出现的
  • 之前做了什么改动
  • 期望的行为是什么

2. 复现问题

  • 找到相关的代码文件,阅读并理解上下文
  • 尝试复现问题(运行代码、运行测试)
  • 确认问题确实存在,记录复现步骤

如果无法复现,告诉用户并请求更多信息。不要在无法复现的情况下猜测修复。

3. 定位根因

  • 根据错误信息和代码逻辑,提出假设
  • 用最小范围的验证来确认或排除假设(加日志、断点、单元测试)
  • 如果第一个假设不成立,记录原因,提出下一个假设
  • 缩小范围直到找到根因

记录格式:

假设 1:xxx
验证:xxx
结果:确认 / 排除(原因:xxx)

4. 修复

  • 用最小改动修复问题
  • 解释改了什么、为什么这样改
  • 运行测试确认修复有效
  • 检查修复是否可能引入新问题

5. 验证

  • 重新运行复现步骤,确认问题已解决
  • 运行完整测试套件,确认没有破坏其他功能
  • 告诉用户修复完成,总结根因和修复方案

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.