Accurately and fluently translates source text into another language, supporting any language pair. Default target language is Chinese. Use this skill when the user requests translation of Markdown files, batch document translation, or text content translation. Trigger phrases: translate, 翻译,translate markdown, translate document, Chinese translation, batch translate.
This skill provides guidelines for accurate, fluent translation, with agent-based parallel processing for large files and multi-file batches.
Translation is writing across languages — rendering content expressed in one language into another, minimizing the gap between them.
Good translation goes beyond conveying information accurately. It re-expresses that information in language that is beautiful and natural, capturing the spirit of the original author. When readers encounter the translation, they should feel the piece was written in their language from the start — not carried over from a foreign one. Through parallel processing, this standard is maintained even for long texts and multi-file batches.
Core anchor: Translation is writing — not conversion, but re-expression.
Imagination brings something into presence; translation gives what has come into presence a voice in another language.
Translation is not word-for-word conversion. It is a three-step process:
Step 1: Reconstruct — Build the Imaginative Space
After reading the source text, construct a complete "imaginative space" in your mind. Different types of text generate fundamentally different spaces:
This is not simply "understanding the text" — it is immersion. It means letting the intentional content of the source text manifest in consciousness (Husserl's eidetic intuition), letting absent scenes become present in the mind (Sartre's theory of imagination), and entering the text to grasp its flowing totality (Bergson's intuition). The quality of this imaginative space sets the ceiling for the translation.
The output of reconstruction does not stay at the level of "feeling" — it must be crystallized into the "translation tone" field of the translation brief: surface features such as person and register, and deeper features such as emotional register, narrative rhythm, lexical preferences, signature expressions, the movement of thought, and a sketch of the original "voice." These fields serve as the style baseline for all subsequent translation and sub-agent alignment.
Step 2: Negotiate — Enter into Dialogue with the Source
Once inside the imaginative space, you are not a passive observer but an interlocutor who can "question the author":
This step is the "negotiation" phase of translation — where the translator exercises judgment and brings their own interpretive subjectivity to bear on the source. The glossary fixes unified renderings for key terms; the translation brief captures critical decisions. The more thorough the negotiation, the more fluent the writing that follows.
Step 3: Write — Compose in the Target Language (executed by sub-agents)
Writing is the ceiling of translation — when comprehension is sound and negotiation is thorough, all remaining quality differences come down to craft. The primary agent does not execute writing directly in this step; its role is to ensure the translation brief provides sub-agents with a sufficient style baseline. The five dimensions of writing (precision, rhythm, register, naturalness, locale) and their specific requirements are detailed in the "Five Elements of Writing" section of references/subagent-prompt.md.
Hard-coded rules cannot cover every scenario. The same "rule" may be exactly inverted across different text types:
Accordingly, writing craft (precision, rhythm, register, naturalness), translation techniques (domestication/foreignization, cognitive load management, long-sentence restructuring), and locale positioning (the target region's lexical system and expressive conventions) are not treated as fixed rules. They are strategic dimensions that are adaptively determined in Phase 1 based on the characteristics of the source text and the target audience. Phase 1 produces two temporary files: a glossary (_glossary.md) to standardize renderings of core terms, and a translation brief (_translation_brief.md) to capture text type, translation tone, target locale, key challenges, and targeted strategies.
SKILL_DIR= the directory containing this skill (the path following "Base directory for this skill:" in the system prompt).
| Type | Location | Notes |
|---|---|---|
| Skill resources (read-only) | {SKILL_DIR}/references/ | User-persisted files that accumulate over time |
| Temporary files | Same directory as source file | _glossary.md, _translation_brief.md, _tone_sample.md |
| Split segments | _parts/ subdirectory of source file directory | Segments and manifest for large-file splits |
| Output file | Same directory as source file | {filename}_zh.md (suffix matches target language) |
This skill handles Markdown and plain text. Other formats (web pages, PDFs, Word documents, images, etc.) must be converted to Markdown before invoking this skill.
Language detection: Source language is detected automatically. The default target language is Chinese (zh-CN); the user may specify a different target language or locale.
Scale assessment and strategy:
| Scenario | Strategy |
|---|---|
| Single file ≤ 1000 lines | Primary agent translates directly |
| Single file > 1000 lines | Split → tone anchoring → parallel → merge |
| Multiple files | Shared glossary and translation brief → tone anchoring → parallel processing |
Decision logic:
This is the foundation of translation quality. The full text must be understood before any translation begins.
SKILL_DIR; must be loaded using the Read tool):
{SKILL_DIR}/references/user-glossary.md — the user's accumulated domain glossary{SKILL_DIR}/references/user-samples.md — the user's preferred translation style samples_glossary.md):
user-glossary.md as a supplementary reference.user-glossary.md, import only entries relevant to the current document's domain; ignore unrelated domain terminology.{SKILL_DIR}/references/translation-brief-template.md; write to temporary _translation_brief.md):
references/locale-styles.md.⚠️ Steps 2–4 must be executed regardless of file size. For small files, the output can be brief — but it cannot be skipped. The purpose of the temporary files is to make translation decisions auditable and to give sub-agents an inheritable style baseline.
_glossary.mdand_translation_brief.mdare created in the source file's directory.
python {SKILL_DIR}/scripts/split_md.py {source_file} --max-lines 600 --output-dir {source_dir}/_parts/
The script automatically generates: _part_NN.md (segments), _part_NN_context.json (bridging context containing the last 5 lines of the preceding segment as preceding_lines and the first 3 lines of the following segment as following_lines), and _split_manifest.json (the manifest).Execute this phase when translating a single file > 1000 lines or multiple files, to ensure stylistic consistency.
_tone_sample.md._tone_sample.md is passed to all sub-agents alongside user-samples.md as a style reference anchor.Small-scale translations (handled directly by the primary agent) skip this phase.
Translate the full text against the following three materials and output to {filename}_zh.md (or the user-specified target language suffix) in the source file's directory:
_glossary.md (temporary glossary generated in Phase 1)_translation_brief.md (temporary translation brief generated in Phase 1){SKILL_DIR}/references/user-samples.md (user style samples, if present)[TERM: ...] annotations: When a new term is encountered during translation that is not in _glossary.md, annotate it inline in the translation as [TERM: original → suggested rendering]. Do not list them separately; they will be processed in Phase 4.
⚠️ Sub-agents are required: Large-scale translations (> 1000 lines or multiple files) must be processed in parallel through sub-agents. The primary agent must not directly translate segments. The primary agent's responsibilities are preparation, task dispatch, and result verification.
Dispatch a sub-agent for each segment using the template in references/subagent-prompt.md.
Sub-agent configuration:
subagent_type: "general-purpose"model: "sonnet" (quality-first){part}_zh.md file; generating merged files (e.g., _part_47-50_zh.md) is not permitted; translating beyond the assigned source range is not permitted.Multi-file parallel strategy: Use TaskCreate/TaskList to track translation progress for each file/segment, and ensure all tasks are complete before proceeding to the next phase.
Error recovery (with failure criteria):
A sub-agent is considered to have failed if any of the following conditions is met:
Handling procedure:
Inspect all translated segments before merging to confirm they meet standards and reduce post-merge issues.
Checklist:
_part_47-50_zh.md).Handling check failures:
Automatic merge (split translations only):
python {SKILL_DIR}/scripts/merge_md.py --manifest {source_dir}/_parts/_split_manifest.json --output {source_dir}/{filename}_zh.md
The merge script automatically checks: heading hierarchy continuity, code block closure, and link integrity.
Primary agent review:
[TERM: ...] annotations for new terms.Optional: Refinement
The translation philosophy emphasizes rewriting over sentence-by-sentence rendering; high-quality translation execution already internalizes awareness of translationese. Refinement is an optional step, considered in the following scenarios:
Refinement is executed by sub-agents under primary agent oversight. See references/refinement-guide.md for details.
This step requires user input. If the user wishes, sub-agents can perform a quality check.
What is checked:
How to execute:
[TERM: ...] annotations, compile the list of new terms added in this session, present the list to the user, and ask whether to write them to {SKILL_DIR}/references/user-glossary.md. If there are no new terms, explicitly inform the user: "No new terms were identified in this session."{filename}_zh.md; the source file is never overwritten).rm -f _glossary.md _translation_brief.md _tone_sample.md
rm -rf _parts/
references/user-glossary.mdreferences/user-samples.mdreferences/translation-brief-template.mdreferences/locale-styles.md