debugging-protocol by jwilger/agent-skills
npx skills add https://github.com/jwilger/agent-skills --skill debugging-protocol价值: 反馈 —— 系统性的调查产生理解。理解产生正确的修复。正确的修复防止问题复发。跳过调查会产生掩盖错误的症状修复。
教授一个严谨的 4 阶段调试过程,强制在任何修复尝试之前进行根本原因分析。防止最常见的调试失败模式:在不理解问题为何存在的情况下就急于修复。
在完成根本原因调查之前,切勿更改代码来修复错误。当你看到一个错误并立即知道如何修复时,这正是你最可能出错的时候。先调查。
应做:
不应做:
收集事实。先不要解释。
git log --oneline -10 和 git diff输出: 关于正在发生什么、在哪里发生以及从何时开始的清晰陈述。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
将损坏的情况与正常工作的进行比较。差异就是错误所在。
输出: 正常工作情况和故障情况之间的具体差异。
形成一个单一、明确的假设。通过一次更改来测试它。从结果中学习。
不要同时更改多个东西。如果你同时更改导入、类型和逻辑,就无法知道哪个更改起了作用。
输出: 有证据支持的已证实或已反驳的假设。
因为理解了根本原因,所以有信心地进行修复。
输出: 有测试支持的修复,所有测试通过。
如果三次修复尝试都失败了,请停止。问题并非你所想的那样。
在第三次失败后:
三次失败的修复几乎总是预示着设计问题,而不是代码问题。更多的代码修复将无济于事。
示例:
Attempt 1: Add caching (hypothesis: slow queries) -> Still slow
Attempt 2: Add index (hypothesis: missing index) -> Still slow
Attempt 3: Eager loading (hypothesis: N+1) -> Still slow
STOP. Profile the system.
Result: 90% of time in external API call. Not a database problem at all.
硬性约束:
[H][RP]在使用此技能指导调试后,请验证:
如果任何标准未满足,请重新审视相关阶段。
此技能可独立工作,无需任何必需的依赖项。它与以下技能集成:
缺少依赖项?请使用以下命令安装:
npx skills add jwilger/agent-skills --skill tdd
每周安装数
89
仓库
GitHub 星标数
2
首次出现
2026 年 2 月 12 日
安全审计
已安装于
codex76
cursor76
claude-code75
opencode74
github-copilot74
amp74
Value: Feedback -- systematic investigation produces understanding. Understanding produces correct fixes. Correct fixes prevent recurrence. Skipping investigation produces symptom fixes that hide bugs.
Teaches a disciplined 4-phase debugging process that enforces root cause analysis before any fix attempt. Prevents the most common debugging failure mode: jumping to a fix without understanding why the problem exists.
Never change code to fix a bug until you have completed root cause investigation. When you see an error and immediately know the fix, that is exactly when you are most likely to be wrong. Investigate first.
Do:
Do not:
Gather facts. Do not interpret yet.
git log --oneline -10 and git diffOutput: A clear statement of what is happening, where, and since when.
Compare broken against working. The difference is the bug.
Output: A specific difference between working and failing cases.
Form a single, explicit hypothesis. Test it with one change. Learn from the result.
Do not change multiple things at once. If you change the import, the type, and the logic simultaneously, you cannot know which change mattered.
Output: Confirmed or refuted hypothesis with evidence.
Fix with confidence because you understand the root cause.
Output: A fix backed by a test, with all tests green.
If three fix attempts fail, stop. The problem is not what you think it is.
After the third failure:
Three failed fixes almost always signal a design problem, not a code problem. More code fixes will not help.
Example:
Attempt 1: Add caching (hypothesis: slow queries) -> Still slow
Attempt 2: Add index (hypothesis: missing index) -> Still slow
Attempt 3: Eager loading (hypothesis: N+1) -> Still slow
STOP. Profile the system.
Result: 90% of time in external API call. Not a database problem at all.
Hard constraints:
[H][RP]After debugging guided by this skill, verify:
If any criterion is not met, revisit the relevant phase.
This skill works standalone with no required dependencies. It integrates with:
Missing a dependency? Install with:
npx skills add jwilger/agent-skills --skill tdd
Weekly Installs
89
Repository
GitHub Stars
2
First Seen
Feb 12, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex76
cursor76
claude-code75
opencode74
github-copilot74
amp74
冲刺回顾模板:敏捷团队回顾会议指南与模板(开始-停止-继续/愤怒-悲伤-高兴/4Ls)
10,400 周安装
App Store Connect 崩溃问题排查与性能诊断工具 - 自动化分析TestFlight报告
326 周安装
Symfony质量检查工具:优化架构、安全执行复杂变更的PHP开发助手
324 周安装
OpenClaw Token 优化器:管理上下文、提升AI助手性能的完整指南
325 周安装
Firebase CLI 命令行工具完整指南:部署、模拟、管理项目与CI/CD自动化
325 周安装
GTM市场进入策略指南:产品发布、新市场、重新定位与功能发布的完整蓝图
338 周安装
Cloudflare D1数据库迁移指南 - Drizzle ORM工作流与问题解决方案
335 周安装