- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/laolaoshiren/claude-code-skills-zh/tree/HEAD/skills/error-translator來自發布者
当用户粘贴或遇到编程错误消息(英文),需要翻译和解释时激活此技能。
识别错误类型
翻译错误消息
原文 → 中文翻译分析错误原因
提供修复方案
## 🌐 错误翻译
**原始消息:** `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>,或检查对象初始化
编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案
---name: error-translatordescription: 编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案---# skills/error-translator/SKILL.md常見問題
從發布者下載 skills/error-translator/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/laolaoshiren/claude-code-skills-zh。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。