error-translator
Skill907 starsChanged 4 months agoMITView on GitHub
编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案
1 other project uses a version of this.
Adopted by
Most recently taken up by
- diflowrin/plain-modetheir own version, first seen Sep 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- diflowrin/plain-mode★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- docs/llms.txtllms.txt
- api-testerSkill
- changelog-genSkill
- db-migratorSkill
- dep-auditorSkill
- ds-mapperSkill
- env-managerSkill
- eslint-fixSkill
- github-actions-genSkill
- git-workflowSkill
- i18n-helperSkill
- log-analyzerSkill
- perf-profilerSkill
- refactor-advisorSkill
- security-auditSkill
- skill-curatorSkill
- test-generatorSkill
- zh-code-reviewerSkill
- zh-docgenSkill
- zh-readmeSkill
The file
Files
错误消息翻译专家
触发条件
当用户粘贴或遇到编程错误消息(英文),需要翻译和解释时激活此技能。
工作流程
- 识别错误类型
- 确定编程语言和运行环境(Python/Java/JavaScript/Go/Rust/C/C++ 等)
- 判断错误类型:语法错误、运行时错误、编译错误、框架错误、系统错误
- 翻译错误消息
- 将英文错误消息准确翻译为中文
- 保留关键的技术术语(类名、函数名、文件路径)
- 翻译格式:
原文 → 中文翻译
- 分析错误原因
- 用简洁的中文解释错误发生的原因
- 说明常见的触发场景
- 列出可能导致此错误的代码模式
- 提供修复方案
- 给出 2-3 个具体的修复建议
- 包含修改前后的代码对比示例
- 如果有最佳实践,一并说明
输出格式
## 🌐 错误翻译
**原始消息:** `English error message here`
**中文翻译:** 中文翻译内容
## 🔍 错误分析
**错误类型:** [语法错误|运行时错误|编译错误|框架错误]
**发生原因:** 简洁说明为什么会发生这个错误
## 🔧 修复方案
### 方案一(推荐)
修改前:
\`\`\`language
// 有问题的代码
\`\`\`
修改后:
\`\`\`language
// 修复后的代码
\`\`\`
### 方案二
其他可能的解决方案...
## 💡 预防建议
- 避免此类错误的最佳实践支持的常见错误类型
Python
TypeError,ValueError,KeyError,IndexErrorImportError,ModuleNotFoundErrorAttributeError,FileNotFoundErrorSyntaxError,IndentationError- Django/Flask/FastAPI 框架错误
asyncio异步错误pandas/numpy数据处理错误
JavaScript/TypeScript
TypeError,ReferenceError,SyntaxErrorCannot read property of undefinedPromise rejection错误- React/Vue/Angular 框架错误
- Node.js 模块和依赖错误
- TypeScript 类型错误
ESLint/Prettier配置错误
Java
NullPointerException,ClassNotFoundExceptionRuntimeException,IOException- Spring/Hibernate 框架错误
- Maven/Gradle 构建错误
- JVM 内存错误(
OutOfMemoryError)
其他语言
- Go:
nil pointer,index out of range,goroutine泄漏 - Rust:
borrow checker,lifetime错误 - C/C++:
segmentation fault,undefined reference, 内存泄漏 - SQL: 语法错误、约束冲突、连接池错误
- PHP:
Undefined variable, 命名空间错误
常见错误模式示例
示例 1: Python KeyError
原始消息: KeyError: 'username'
中文翻译: 键错误:'username'
原因分析: 尝试访问字典中不存在的键 'username'
修复方案: 使用 .get('username', default_value) 或检查键是否存在
示例 2: JavaScript Cannot read property 'map' of undefined
原始消息: TypeError: Cannot read property 'map' of undefined
中文翻译: 类型错误:无法读取未定义对象的 'map' 属性
原因分析: 尝试在 undefined 值上调用 .map() 方法
修复方案: 添加空值检查 data?.map(...) 或确保数据已初始化
示例 3: Java NullPointerException
原始消息: java.lang.NullPointerException
中文翻译: 空指针异常
原因分析: 尝试使用一个为 null 的对象引用
修复方案: 添加 null 检查,使用 Optional<T>,或检查对象初始化
注意事项
- 保持技术术语的准确性,不要过度翻译
- 对于框架特定的错误,要说明是哪个框架
- 如果错误信息不完整,询问用户提供完整的 traceback
- 优先提供安全的修复方案,避免引入新问题
- 建议用户添加错误监控和日志记录,预防类似错误
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

