error-diagnostics-smart-debug
使用 AI 驱动的诊断功能调试错误
此技能帮助开发者通过分析错误消息、堆栈跟踪和性能数据来快速诊断软件错误,识别根本原因并提出修复建议。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“error-diagnostics-smart-debug”。 Analyze this error: 'Connection timeout after 30000ms' occurring in 5% of checkout requests in production
预期结果:
- 问题摘要:结账服务中间歇性连接超时
- 根本原因分析:可能原因 - (1) 外部支付 API 延迟 60%,(2) 数据库连接池耗尽 25%,(3) 网络基础设施问题 15%
- 推荐策略:查询 DataDog 中支付服务的追踪耗时,检查错误窗口期间的连接池指标
- 修复方案:实施带有 10 秒超时的熔断器模式,添加指数退避重试机制
- 验证:部署到金丝雀流量,监控错误率降低情况
正在使用“error-diagnostics-smart-debug”。 Parse this stack trace: TypeError: Cannot read property 'id' of undefined at UserService.getProfile (/src/user/service.js:42:15)
预期结果:
- 根本原因:用户对象空引用 - 可能是竞态条件或缺少空值检查
- 假设 1(75%):数据库中缺少用户记录 - 检查认证流程
- 假设 2(20%):异步时序问题 - 在用户数据加载完成前调用了 getProfile
- 假设 3(5%):模式不匹配 - 用户对象结构已更改
- 推荐修复:添加空值守卫:const userId = user?.id ?? throw new Error('User not found')
安全审计
安全All static findings are false positives. The skill is a legitimate debugging assistant that provides guidance on error diagnostics. No external commands, cryptographic algorithms, or network reconnaissance are present. The reported patterns were markdown formatting (backticks for code) and benign workflow descriptions.
中风险问题 (1)
低风险问题 (2)
质量评分
你能构建什么
生产事件响应
通过分析错误模式并为值班工程师推荐调试策略,快速诊断生产环境错误。
开发调试
获取关于本地调试技术、断点放置和单步调试策略的 AI 辅助指导。
性能问题分析
分析性能追踪和 APM 数据以识别瓶颈、N+1 查询和资源耗尽问题。
试试这些提示
Analyze this error: $ERROR_MESSAGE. What could be the root cause?
Parse this stack trace and identify the likely source of the issue: $STACK_TRACE. Provide 3 hypotheses ranked by probability.
Help debug this production issue: $ISSUE_DESCRIPTION. The error frequency is $FREQUENCY in $ENVIRONMENT environment. Recommend a debugging strategy.
Review this proposed fix for the error: $ERROR and $PROPOSED_FIX. Assess the risk level and suggest validation steps.
最佳实践
- 提供完整的错误上下文,包括堆栈跟踪、复现步骤和环境详情
- 在实施修复前使用可观测性数据验证假设
- 应用增量调试:从最简单的解释开始,再到复杂的解释
- 在全面推广前始终通过测试和金丝雀部署验证修复
避免
- 在不理解根本原因的情况下盲目应用修复
- 在优先处理调试工作时忽略错误频率和影响
- 跳过可观测性数据收集而仅依赖代码检查
- 在没有验证或回滚策略的情况下部署修复
常见问题
我应该提供什么信息才能获得最佳调试结果?
这个技能可以自动修复错误吗?
这个技能适用于所有编程语言吗?
我可以将此用于安全漏洞吗?
此技能如何选择调试策略?
此技能与哪些可观测性工具集成?
开发者详情
作者
sickn33许可证
MIT
仓库
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/error-diagnostics-smart-debug引用
main
文件结构
📄 SKILL.md