← 返回 Skills 市场
148
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install skylv-error-debugger
功能描述
错误调试助手。分析错误信息、定位问题原因、提供解决方案。使用场景:(1) 分析报错信息,(2) 定位代码问题,(3) 提供修复方案,(4) 预防类似错误。
使用说明 (SKILL.md)
Error Debugger — 错误调试助手
功能说明
分析各类错误,帮助快速定位和解决问题。
使用方法
1. 错误分析
用户: 帮我分析这个错误:
TypeError: Cannot read property 'name' of undefined
at UserComponent.render (App.js:25)
分析:
- 错误类型:TypeError
- 错误原因:访问undefined的属性
- 问题位置:App.js 第25行
- 可能原因:数据未加载、异步问题、空值未处理
2. 代码问题定位
用户: 这段代码为什么报错?
[粘贴代码和错误信息]
定位:
- 分析代码逻辑
- 检查变量状态
- 识别问题代码
- 解释错误原因
3. 解决方案
用户: 如何修复这个SQL错误?
ERROR: column "user_id" does not exist
解决方案:
- 检查表结构
- 确认列名拼写
- 检查是否需要别名
- 提供修复SQL
4. 预防建议
用户: 如何避免这类错误再次发生?
建议:
- 添加类型检查
- 使用防御性编程
- 添加单元测试
- 代码审查要点
示例输出
错误分析报告
【错误信息】
TypeError: Cannot read property 'name' of undefined
【问题定位】
文件: App.js
行号: 25
代码: const userName = user.profile.name
【原因分析】
1. 直接原因:user.profile 为 undefined
2. 根本原因:
- API数据未加载完成就尝试访问
- 缺少空值检查
- 异步渲染时序问题
【解决方案】
方案一:添加空值检查
```javascript
const userName = user?.profile?.name || '未知用户';
方案二:条件渲染
{user?.profile && \x3Cdiv>{user.profile.name}\x3C/div>}
方案三:设置默认值
const user = data || { profile: { name: 'Guest' } };
【预防措施】
- 使用 TypeScript 进行类型检查
- 对 API 返回数据做校验
- 添加加载状态处理
- 编写边界情况测试用例
【相关资源】
- JavaScript 可选链操作符文档
- React 条件渲染最佳实践
## 支持错误类型
- JavaScript/TypeScript 运行时错误
- Python 异常
- SQL 数据库错误
- HTTP 网络错误
- 构建/编译错误
安全使用建议
This skill is instruction-only and appears coherent for interactive debugging. It does not request credentials or install software. Before using it: (1) avoid pasting secrets, API keys, or full logs that contain sensitive data because anything you paste will be processed by the agent; (2) note the source is 'unknown' / no homepage — if provenance matters, prefer skills from known authors or official sources; (3) if you need automated debugging that reads your repository/CI logs, that would require explicit file or credential access and should be provisioned cautiously; and (4) because the agent can invoke skills normally, review agent autonomy settings if you do not want any skill used without your explicit trigger.
功能分析
Type: OpenClaw Skill
Name: skylv-error-debugger
Version: 1.0.1
The skill bundle consists solely of metadata and instructional documentation (SKILL.md) designed to guide an AI agent in performing error debugging tasks. It contains no executable code, no network requests, and no instructions that attempt to exfiltrate data or bypass security controls.
能力评估
Purpose & Capability
Name/description (error debugging) match the SKILL.md content. All examples and supported error types (JS/TS, Python, SQL, HTTP, build errors) are coherent with an interactive debugging helper.
Instruction Scope
Runtime instructions are limited to analyzing user-provided error messages and code snippets; they do not instruct reading system files, environment variables, or sending data to arbitrary endpoints. The skill expects the user to paste errors/code for analysis.
Install Mechanism
No install spec and no code files — instruction-only. This is the lowest-risk installation model (nothing is written to disk or fetched at install time).
Credentials
No required environment variables, credentials, or config paths are declared — consistent with an assistant that analyzes user-supplied text.
Persistence & Privilege
always:false and no special privileges requested. The skill is user-invocable and can be used by the agent normally; it does not request permanent/system-wide presence or access to other skills' configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install skylv-error-debugger - 安装完成后,直接呼叫该 Skill 的名称或使用
/skylv-error-debugger触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated skill description to English for broader accessibility.
- Added trigger keywords to clarify use cases (error debugging, bug fix, stack trace, exception handling).
- No changes made to main functionality or examples.
v1.0.0
Initial release of the Error Debugger skill:
- 分析常见错误信息,支持多种编程语言和环境(如 JavaScript、Python、SQL 等)。
- 自动定位代码问题、解释错误原因。
- 为用户提供具体的修复方案和建议。
- 提出预防类似错误的最佳实践和防御性措施。
- 包含详细的示例输出,方便用户参考和实际操作。
元数据
常见问题
Skylv Error Debugger 是什么?
错误调试助手。分析错误信息、定位问题原因、提供解决方案。使用场景:(1) 分析报错信息,(2) 定位代码问题,(3) 提供修复方案,(4) 预防类似错误。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 148 次。
如何安装 Skylv Error Debugger?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install skylv-error-debugger」即可一键安装,无需额外配置。
Skylv Error Debugger 是免费的吗?
是的,Skylv Error Debugger 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Skylv Error Debugger 支持哪些平台?
Skylv Error Debugger 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Skylv Error Debugger?
由 SKY-lv(@sky-lv)开发并维护,当前版本 v1.0.1。
推荐 Skills