Agent skill

Error Translator

by laolaoshiren in laolaoshiren/claude-code-skills-zh

“编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案”

— description from SKILL.md by laolaoshiren
MITAuto-check passedWriting & Content

Install Error Translator

skills CLI
$ npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install laolaoshiren/claude-code-skills-zh error-translator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/laolaoshiren/claude-code-skills-zh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/error-translator .claude/skills/error-translator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
error-translator
GitHub stars
879
Token cost
~609 tokens
SKILL.md length
177 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

  • Works in 4 steps: 识别错误类型 → 翻译错误消息 → 分析错误原因 → …
  • SKILL.md covers 触发条件, 工作流程, 输出格式 and 支持的常见错误类型, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Error Translator is a skill in laolaoshiren/claude-code-skills-zh (879 stars). Its SKILL.md is about 609 tokens. Licence: MIT.

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 识别错误类型
  2. 翻译错误消息
  3. 分析错误原因
  4. 提供修复方案

What it can do on your machine

Read from SKILL.md and the folder at commit 633f21c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Error Translator loads about 609 tokens when it runs. Until then it costs about 14 tokens; SKILL.md has 177 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~14
When it runs · the whole SKILL.md, loaded when a task matches
~609

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from laolaoshiren/claude-code-skills-zh at commit 633f21c, republished under its MIT licence (© laolaoshiren). 177 words, ~609 tokens.

Download SKILL.mdSave it as .claude/skills/error-translator/SKILL.md (or your agent's skills folder).
name
error-translator
description
编程错误消息翻译专家 — 将英文错误消息翻译成中文,解释原因并提供修复方案

错误消息翻译专家

触发条件

当用户粘贴或遇到编程错误消息(英文),需要翻译和解释时激活此技能。

工作流程

  1. 识别错误类型

    • 确定编程语言和运行环境(Python/Java/JavaScript/Go/Rust/C/C++ 等)
    • 判断错误类型:语法错误、运行时错误、编译错误、框架错误、系统错误
  2. 翻译错误消息

    • 将英文错误消息准确翻译为中文
    • 保留关键的技术术语(类名、函数名、文件路径)
    • 翻译格式:原文 → 中文翻译
  3. 分析错误原因

    • 用简洁的中文解释错误发生的原因
    • 说明常见的触发场景
    • 列出可能导致此错误的代码模式
  4. 提供修复方案

    • 给出 2-3 个具体的修复建议
    • 包含修改前后的代码对比示例
    • 如果有最佳实践,一并说明

输出格式

markdown
## 🌐 错误翻译

**原始消息:** `English error message here`
**中文翻译:** 中文翻译内容

## 🔍 错误分析

**错误类型:** [语法错误|运行时错误|编译错误|框架错误]
**发生原因:** 简洁说明为什么会发生这个错误

## 🔧 修复方案

### 方案一(推荐)
修改前:
\`\`\`language
// 有问题的代码
\`\`\`

修改后:
\`\`\`language
// 修复后的代码
\`\`\`

### 方案二
其他可能的解决方案...

## 💡 预防建议
- 避免此类错误的最佳实践

支持的常见错误类型

Python
  • TypeError, ValueError, KeyError, IndexError
  • ImportError, ModuleNotFoundError
  • AttributeError, FileNotFoundError
  • SyntaxError, IndentationError
  • Django/Flask/FastAPI 框架错误
  • asyncio 异步错误
  • pandas/numpy 数据处理错误
JavaScript/TypeScript
  • TypeError, ReferenceError, SyntaxError
  • Cannot read property of undefined
  • Promise rejection 错误
  • React/Vue/Angular 框架错误
  • Node.js 模块和依赖错误
  • TypeScript 类型错误
  • ESLint/Prettier 配置错误
Java
  • NullPointerException, ClassNotFoundException
  • RuntimeException, 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
  • 优先提供安全的修复方案,避免引入新问题
  • 建议用户添加错误监控和日志记录,预防类似错误

© laolaoshiren, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/error-translator of laolaoshiren/claude-code-skills-zh.

Open the folder on GitHubat commit 633f21c

Compare with similar skills

Error Translator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Error Translator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Translator this skilllaolaoshiren/claude-code-skills-zh879—~609Automated safety check: PassMIT
Module Level Code TranslatorArabelaTso/Skills-4-SE253—~1.9kAutomated safety check: PassApache-2.0
Code TranslationArabelaTso/Skills-4-SE253—~3.1kAutomated safety check: PassApache-2.0
Frappe Core TranslationImpertio-Studio/Frappe_Claude_Skill_Package188—~1.9kAutomated safety check: PassMIT
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
CodeQL Security Scantrailofbits/skills7.4k—~4.6kAutomated safety check: NotesCC-BY-SA-4.0

Similar skills

  • Module Level Code Translator

    ArabelaTso/Skills-4-SE

    Translate source code between programming languages at function, class, and module levels while preserving behavior and generating verification tests.

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Code Translation

    ArabelaTso/Skills-4-SE

    Convert code between programming languages while preserving functionality and semantics.

    253 GitHub stars~3.1k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Frappe Core Translation

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when implementing translations/i18n in Frappe v14-v16 apps.

    188 GitHub stars~1.9k tokensUpdated 22 days ago
    Writing & ContentAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated 2 days ago
    SecurityAuto-check: notes
  • Translate

    tagspaces/tagspaces

    Translate new or untranslated i18n strings from the English locale files (core.json + peri.json) into all other locales, maintaining consistency with each language's existing translations.

    5.3k GitHub stars~2.2k tokensUpdated 3 days ago
    Writing & ContentAuto-check passed

More from laolaoshiren/claude-code-skills-zh

All 19 skills in this repo
  • API Tester

    laolaoshiren/claude-code-skills-zh

    依据真实 OpenAPI、路由实现和现有测试生成并验证 API 测试。用于用户要求测试接口、补集成测试、验证 API 契约、生成回归用例或排查接口兼容性时;区分“生成测试”和“执行请求”的授权,不猜测状态码、响应结构或 SLA,不在未确认环境中发送写请求。

    879 GitHub stars~614 tokensUpdated 4 days ago
    Auto-check passed
  • Dep Auditor

    laolaoshiren/claude-code-skills-zh

    审计 Node.js、Python、Go、Rust、JVM、Ruby 项目的依赖漏洞、版本健康度与许可证事实;当用户要求检查 package.json、lockfile、requirements、go.mod、Cargo.toml、pom.xml、Gemfile.lock,或生成不改依赖的中文审计报告时使用

    879 GitHub stars~895 tokensUpdated 4 days ago
    Auto-check passed
  • Eslint Fix

    laolaoshiren/claude-code-skills-zh

    安全诊断并修复 ESLint error、warning 和配置兼容问题。用于用户要求运行 lint、解释 ESLint 报错、限定范围自动修复或迁移 ESLint 配置时;优先使用项目锁定的包管理器与版本,先预检再修改,不自动下载最新版或批量改写无关源码。

    879 GitHub stars~436 tokensUpdated 4 days ago
    Auto-check passed
  • Git Workflow

    laolaoshiren/claude-code-skills-zh

    安全处理 Git 状态检查、提交信息、commit、分支、push、PR 和 rebase。用于用户要求检查改动、生成或创建提交、管理分支、推送、发起 PR 或整理历史时;严格区分每个动作的授权,并保护工作树中已有和无关的修改。

    879 GitHub stars~513 tokensUpdated 4 days ago
    Auto-check passed
  • GitHub Actions Gen

    laolaoshiren/claude-code-skills-zh

    分析真实项目并生成或修订安全、可验证的 GitHub Actions workflow;当用户要求创建 CI、测试矩阵、构建、Release、部署、缓存、Secrets、OIDC、PR 自动化或排查 workflow 配置时使用

    879 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check: notes
  • Skill Curator

    laolaoshiren/claude-code-skills-zh

    中文 Skill 收录评估器。用于核验 GitHub 上的 Claude Code、Codex、Agent Skills、Plugin、MCP、CLI 或 Agent 工作流是否值得加入精选列表;检查真实资产、安装方式、活跃度、重复项和安全边界,并生成分类、中文描述与可追溯证据。

    879 GitHub stars~756 tokensUpdated 4 days ago
    Auto-check passed

Questions about Error Translator

How do I install Error Translator in Claude Code?

Run `npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a claude-code`. Or copy the skill folder (skills/error-translator in laolaoshiren/claude-code-skills-zh) into .claude/skills/error-translator in your project. Claude Code loads it when a task matches its description.

How do I install Error Translator in Codex?

Run `npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a codex`. Or copy the skill folder (skills/error-translator in laolaoshiren/claude-code-skills-zh) into .agents/skills/error-translator in your project. Codex loads it when a task matches its description.

Can I use Error Translator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add laolaoshiren/claude-code-skills-zh --skill error-translator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-translator, .gemini/skills/error-translator, .github/skills/error-translator and .opencode/skills/error-translator in your project.

What does Error Translator need to run?

SKILL.md names no scripts, command-line tools or credentials: Error Translator is instructions for the agent only.

Does Error Translator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Error Translator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Error Translator use?

Error Translator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Translator use?

About 609 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Error Translator?

Skills that share tags, products or a category with Error Translator: Module Level Code Translator (ArabelaTso/Skills-4-SE, 253 stars), Code Translation (ArabelaTso/Skills-4-SE, 253 stars), Frappe Core Translation (Impertio-Studio/Frappe_Claude_Skill_Package, 188 stars) and Fory Release (apache/fory, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Translator?

laolaoshiren (a GitHub user) maintains it in laolaoshiren/claude-code-skills-zh, which has 879 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.

Source: laolaoshiren/claude-code-skills-zh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.