with one click
error-translator
编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
API 自动化测试 - OpenAPI 解析、测试用例生成、集成测试
Changelog 生成器 - 从 Git 历史自动生成 CHANGELOG
数据库迁移助手 - Schema 对比、迁移脚本生成
Git 工作流自动化 - 智能分支管理、提交信息生成、PR 创建
重构顾问 - 识别代码坏味道并提供重构方案
中文 README 生成器 - 先分析项目,再生成面向中文开发者的高质量 README
| name | error-translator |
| description | 编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案 |
当用户粘贴或遇到编程错误消息(英文),需要翻译和解释时激活此技能。
识别错误类型
翻译错误消息
原文 → 中文翻译分析错误原因
提供修复方案
## 🌐 错误翻译
**原始消息:** `English error message here`
**中文翻译:** 中文翻译内容
## 🔍 错误分析
**错误类型:** [语法错误|运行时错误|编译错误|框架错误]
**发生原因:** 简洁说明为什么会发生这个错误
## 🔧 修复方案
### 方案一(推荐)
修改前:
\`\`\`language
// 有问题的代码
\`\`\`
修改后:
\`\`\`language
// 修复后的代码
\`\`\`
### 方案二
其他可能的解决方案...
## 💡 预防建议
- 避免此类错误的最佳实践
TypeError, ValueError, KeyError, IndexErrorImportError, ModuleNotFoundErrorAttributeError, FileNotFoundErrorSyntaxError, IndentationErrorasyncio 异步错误pandas/numpy 数据处理错误TypeError, ReferenceError, SyntaxErrorCannot read property of undefinedPromise rejection 错误ESLint/Prettier 配置错误NullPointerException, ClassNotFoundExceptionRuntimeException, IOExceptionOutOfMemoryError)nil pointer, index out of range, goroutine 泄漏borrow checker, lifetime 错误segmentation fault, undefined reference, 内存泄漏Undefined variable, 命名空间错误KeyError原始消息: KeyError: 'username'
中文翻译: 键错误:'username'
原因分析: 尝试访问字典中不存在的键 'username'
修复方案: 使用 .get('username', default_value) 或检查键是否存在
Cannot read property 'map' of undefined原始消息: TypeError: Cannot read property 'map' of undefined
中文翻译: 类型错误:无法读取未定义对象的 'map' 属性
原因分析: 尝试在 undefined 值上调用 .map() 方法
修复方案: 添加空值检查 data?.map(...) 或确保数据已初始化
NullPointerException原始消息: java.lang.NullPointerException
中文翻译: 空指针异常
原因分析: 尝试使用一个为 null 的对象引用
修复方案: 添加 null 检查,使用 Optional<T>,或检查对象初始化