debugging-wizard
它能做什么
它指导 AI 智能体用结构化的方法查找并修复缺陷。适用于遇到崩溃、错误或意外行为的人。
适用场景
- ✓当你的程序显示了你无法解释的错误信息或堆栈跟踪时。
- ✓当行为出乎意料,你需要找出根本原因时。
- ✓当程序崩溃,需要阅读日志寻找线索时。
技能链接
https://github.com/Jeffallan/claude-skills/blob/main/skills/debugging-wizard/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的应用出现了这个堆栈跟踪后崩溃。请帮我找出原因并修复。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会复现问题,把范围缩小到最小的失败案例,并每次只验证一个假设。然后它修复缺陷,并添加回归测试。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Debugging Wizard
Expert debugger applying systematic methodology to isolate and resolve issues in any codebase.
Core Workflow
- Reproduce - Establish consistent reproduction steps
- Isolate - Narrow down to smallest failing case
- Hypothesize and test - Form testable theories, verify/disprove each one
- Fix - Implement and verify solution
- Prevent - Add tests/safeguards against regression
Reference Guide
Load detailed guidance based on context:
<!-- Systematic Debugging row adapted from obra/superpowers by Jesse Vincent (@obra), MIT License -->| Topic | Reference | Load When |
|---|---|---|
| Debugging Tools | references/debugging-tools.md |
Setting up debuggers by language |
| Common Patterns | references/common-patterns.md |
Recognizing bug patterns |
| Strategies | references/strategies.md |
Binary search, git bisect, time travel |
| Quick Fixes | references/quick-fixes.md |
Common error solutions |
| Systematic Debugging | references/systematic-debugging.md |
Complex bugs, multiple failed fixes, root cause analysis |
Constraints
MUST DO
- Reproduce the issue first
- Gather complete error messages and stack traces
- Test one hypothesis at a time
- Document findings for future reference
- Add regression tests after fixing
- Remove all debug code before committing
MUST NOT DO
- Guess without testing
- Make multiple changes at once
- Skip reproduction steps
- Assume you know the cause
- Debug in production without safeguards
- Leave console.log/debugger statements in code
Common Debugging Commands
Python (pdb)
python -m pdb script.py # launch debugger
# inside pdb:
# b 42 — set breakpoint at line 42
# n — step over
# s — step into
# p some_var — print variable
# bt — print full traceback
JavaScript (Node.js)
node --inspect-brk script.js # pause at first line, attach Chrome DevTools
# In Chrome: open chrome://inspect → click "inspect"
# Sources panel: add breakpoints, watch expressions, step through
Git bisect (regression hunting)
git bisect start
git bisect bad # current commit is broken
git bisect good v1.2.0 # last known good tag/commit
# Git checks out midpoint — test, then:
git bisect good # or: git bisect bad
# Repeat until git identifies the first bad commit
git bisect reset
Go (delve)
dlv debug ./cmd/server # build & attach
# (dlv) break main.go:55
# (dlv) continue
# (dlv) print myVar
Output Templates
When debugging, provide:
- Root Cause: What specifically caused the issue
- Evidence: Stack trace, logs, or test that proves it
- Fix: Code change that resolves it
- Prevention: Test or safeguard to prevent recurrence
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions
常见问题
它会凭猜测修复吗?
不会。该技能说明不要猜测,每次只验证一个假设。
它会清理调试代码吗?
会。它要求在提交之前删除调试代码。
它会记录发现的问题吗?
会。它会记录发现的问题,供以后参考。
详情
作者的原始描述
Parses error messages, traces execution flow through stack traces, correlates log entries to identify failure points, and applies systematic hypothesis-driven methodology to isolate and resolve bugs. Use when investigating errors, analyzing stack traces, finding root causes of unexpected behavior, troubleshooting crashes, or performing log analysis, error investigation, or root cause analysis.
repo: Jeffallan/claude-skills
热度
- GitHub 星标
- 12k
- 排名
- #11416
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
angular-architect
12k帮你的智能体构建 Angular 17 及更新版本的应用,包括独立组件、懒加载路由、NgRx 状态管理、RxJS 模式和性能优化。
api-designer
12k帮你的智能体设计 REST 或 GraphQL API,并编写 OpenAPI 3.1 规范,包括资源、分页、错误格式和版本控制规则。
architecture-designer
12k帮你的智能体设计系统架构、比较模式和技术,并编写架构决策记录,解释每个选择的理由。
atlassian-mcp
12k帮你的智能体通过 MCP 搜索和更新 Jira 问题及 Confluence 页面,包括 JQL 和 CQL 查询、冲刺和文档同步。