Tooluck logoTooluck
SKILL.md

translate-explanation

Agent skill fromLeanmcp/gateway-skills

Translate existing code-explanation docs into another language, Chinese by default. Translates a whole `CODE_EXPLANATION/` folder into a parallel `CODE_EXPLANATION_<LANG>` copy (e.g. `CODE_EXPLANATION_ZH`), or a single file — either bilingually in place (English + translation interleaved) for small files or as a `<name>_<lang>.<ext>` sidecar copy for larger ones. Keeps filenames, code, identifiers, file paths, and technical terms in English — only the explanatory prose is translated. Use this skill whenever the user wants to translate, localize, or produce a non-English version of code-explanation / codebase documentation: phrases like "translate-explanation", "translate the code explanation", "translate the CODE_EXPLANATION folder", "localize these docs to Chinese", "make a Chinese version of the explanation", or naming any target language for the explanation files. Default to Chinese (ZH) when no language is specified.

How to install translate-explanation

install translate-explanation
# install the gateway-skills pack with the skills CLI
npx skills add Leanmcp/gateway-skills

# or add only this skill to Claude Code: copy the folder

skills/translate-explanation/

# into

~/.claude/skills/translate-explanation/ (all projects)

.claude/skills/translate-explanation/ (one project)

skills/translate-explanation/SKILL.md

MITFull file
1# Translate Explanation
2
3Translate generated code-explanation docs (the kind produced by the
4`code-explanation` skill) into another language. The prose is translated but
5everything technical stays in English so the docs remain accurate and usable by
6engineers.
7
8**Default language is Chinese (`ZH`).** If the user names another language, use
9its code instead (see the table below).
10
11## Translation modes
12
13First decide what's being translated — a whole folder or a single file — because
14the output shape differs.
15
16**Folder mode (default).** The target is a `CODE_EXPLANATION/` folder (or any
17folder of docs). Produce a parallel folder named `<FOLDER>_<LANG>` (e.g.
18`CODE_EXPLANATION_ZH`) with the same files. See *Folder mode* below.
19
20**Single-file mode.** The target is one file. Choose between two output styles
21based on the file's length, because what's pleasant to read differs by size:
22
23- **Bilingual / interleaved (small files, < 50 lines).** Update the file
24 in place so each prose line is immediately followed by its translation —
25 English line, then Chinese line. For short files this keeps original and
26 translation together and is easy to scan. See *Single-file mode → Bilingual*.
27- **Sidecar file (larger files, ≥ 50 lines).** Don't clutter a long file with
28 interleaving. Instead create a fully-translated copy named
29 `<name>_<lang>.<ext>` (e.g. `notes_zh.md`) in the **same folder**, leaving the
30 original untouched. See *Single-file mode → Sidecar*.
31…

Excerpt shown under the repository's MIT license.

More skills in gateway-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates