debug-helper
FeaturedHelp debug code by analyzing error messages, identifying root causes, and providing fix suggestions.
Code & Development 670 stars
170 forks Updated 6 days ago CC0-1.0
Install
Quality Score: 92/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Debug Helper
> 帮助调试代码,分析错误信息,定位问题根源,提供修复建议。
>
> Help debug code by analyzing error messages, identifying root causes, and providing fix suggestions.
## When to Use
当用户请求以下操作时使用此 skill:
- 调试代码 / Debug code
- 分析错误信息 / Analyze error messages
- 修复 bug / Fix bugs
- 理解异常原因 / Understand exception causes
- 排查问题 / Troubleshoot issues
## Instructions
### 调试步骤 / Debugging Steps
1. **收集信息** - 获取错误信息、堆栈跟踪、相关代码
2. **分析错误** - 理解错误类型和消息含义
3. **定位根源** - 找到导致问题的代码位置
4. **提供解决方案** - 给出具体的修复建议
5. **预防建议** - 提供避免类似问题的建议
### 常见错误类型 / Common Error Types
| 错误类型 | 可能原因 |
|----------|----------|
| TypeError | 类型不匹配、空值操作 |
| ReferenceError | 未定义变量、作用域问题 |
| SyntaxError | 语法错误、缺少括号/引号 |
| RuntimeError | 运行时逻辑错误 |
| NetworkError | 网络请求失败、超时 |
### 分析框架 / Analysis Framework
对于每个错误,需要分析:
- **What**: 发生了什么错误
- **Where**: 错误发生在哪里
- **Why**: 为什么会发生
- **How**: 如何修复
### 输出格式 / Output Format
使用 `templates/debug-report.md` 模板格式化输出。
Use the `templates/debug-report.md` template to format output.
```markdown
## 调试分析报告 / Debug Analysis Report
### 错误概述 / Error Summary
[错误类型和简要描述]
### 根本原因 / Root Cause
[详细分析]
### 修复方案 / Fix
[具体代码修改]
### 预防建议 / Prevention
[如何避免类似问题]
```
## Examples
### 输入 / Input
错误信息:
```
TypeError: Cannot read properties of undefined (reading 'map')
at UserList (UserList.jsx:15:23)
at renderWithHooks (react-dom.development.js:14985:18)
```
相关代码:
```jsx
function UserList({ users }) {
return (
<ul>
{users.map(user => (
<li key={user.id}>{user.name}</li>...
Details
- Author
- JackyST0
- Repository
- JackyST0/awesome-agent-skills
- Created
- 9 months ago
- Last Updated
- 6 days ago
- Language
- JavaScript
- License
- CC0-1.0
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
debug
Systematic debugging methods, log analysis, and performance diagnostics. Use when debugging issues, analyzing errors, or troubleshooting incidents.
50 Updated 5 months ago
xiaobei930 AI & Automation Listed
bug-diagnose-and-root-cause-and-fix
【Bug 诊断专用】当遇到程序错误、异常行为、性能问题、功能故障时必须使用本技能。触发关键词:报错、Bug、问题、异常、故障、不工作、诊断、排查、修复。本技能提供系统性根因分析,输出详细诊断报告和可执行修复方案,包含代码位置引用、步骤指导、注意事项。仅提供分析和方案,不直接修改代码。
493 Updated today
aiskillstore Code & Development Listed
debugging
Reading errors, troubleshooting, and fixing bugs. Activated when Claude encounters errors or when the user is debugging. Teaches the most valuable skill: understanding what went wrong.
3 Updated 1 months ago
wewpellex21