بنقرة واحدة
translate
Use when translating one file, one section, or all docs with glossary and style constraints.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when translating one file, one section, or all docs with glossary and style constraints.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when translating game content that requires cost-optimized model routing, linear workflow efficiency, and immediate formatting to avoid multi-loop review cycles
Use when high-quality translation is needed with multi-agent review and quality gates before overwriting source files.
Use when a markdown draft or docs page must be checked for structural validity and documentation style compliance before writeback or publishing.
Use when high-quality translation is needed with multi-agent review and quality gates before overwriting source files.
Use when extracted rulebook markdown needs to be split into semantic documentation files and navigation. Trigger this skill from `init-doc`, future append/add-document flows, or whenever regenerated `_pages.md` source invalidates the existing chapter map. Do not use this skill for temporary translation chunking; that belongs to a separate draft-only translation workflow.
Use when performing final quality checks before publishing the documentation site. Use when all translation is complete and you need to verify titles/descriptions are translated, check for misplaced or erroneous content, and run page-reference link checks.
| name | translate |
| description | Use when translating one file, one section, or all docs with glossary and style constraints. |
| user-invocable | true |
| disable-model-invocation | true |
Single-pass translation of markdown content to Traditional Chinese with glossary compliance, draft isolation, progress tracking, and one Git checkpoint commit per completed batch.
Core principle: Draft first, verify before writeback, never overwrite source with unverified output.
Before ANY action, create tasks using TaskCreate:
Verify required files exist:
glossary.jsonstyle-decisions.jsondata/translation-progress.json
If any are missing, stop and ask user to run /init-doc first.Resolve target files:
$ARGUMENTS specifies concrete file paths or a scoped pattern → use those directly as the current batch.all, or next) → auto-select from translation-progress.json:
in_progress (highest priority).not_started, in chapter order.翻譯進度:已完成 X / Y 個章節
本批次已從進度表自動選取以下檔案:
- [in_progress 繼續] <file>
- [not_started 新增] <file>
…
是否繼續?或請指定其他範圍。
Verification: Target file list confirmed; all required files exist.
uv run python scripts/validate_glossary.py
uv run python scripts/term_read.py --fail-on-missing --fail-on-forbidden
If preflight fails, stop and fix terminology first.
Verification: Both commands exit 0.
Read style-decisions.json.translation_mode.mode.
If missing, ask user in Traditional Chinese:
Persist mode before translating.
Verification: translation_mode.mode persisted in style-decisions.json.
For each target file, obtain its draft path (this also creates the directory):
uv run python scripts/draft.py --skill translate path <TARGET_FILE>
Use the printed path as <DRAFT_FILE> for that file.
Verification: Draft path returned; directory exists.
For each target file:
in_progresstranslation-progress.json status to in_progressglossary.json, and style-decisions.json(特別包含 translation_notes)DRAFT_FILE=$(uv run python scripts/draft.py --skill translate path <TARGET_FILE>)
Translate to $DRAFT_FILE:
.claude/skills/translate/.state/draft-manifest.json; do not add translation metadata to frontmatterstyle-decisions.json.translation_notesfrontmatter.title as the page title; do not restate it anywhere in the body as a heading of any level (#, ##, etc.)# or ## 概覽 heading$DRAFT_FILEstyle-decisions.json.translation_notes?frontmatter.title?概覽/overview heading that does not exist in the source?1d6, +2)? Covers body text, headings, table cells, and game labels (status conditions, item tags, rule keywords/phrases). Terminology must match glossary.json; proper nouns follow style-decisions.json policy.uv run python scripts/draft.py --skill translate writeback <TARGET_FILE>
translation-progress.json:
completed_meta.completed (count of completed entries)_meta.updated to current timestamp
Do NOT defer this update; write it before moving to the next file.Unknown term handling:
uv run python scripts/term_edit.py --term "<TERM>" --set-zh "<ZH>" --status approved --mark-term
uv run python scripts/term_read.py --fail-on-forbidden
Then continue translating with the updated glossary.
Verification: Self-review checklist passes; writeback exits 0; progress JSON updated.
After all files in the current batch are processed:
git status --short and verify batch scope before staging.data/translation-progress.jsonglossary.json if changed in this batchstyle-decisions.json if changed in this batchgit commit -m "progress: X/Y"
translation-progress.jsoncompleted in this batch, skip the commit.Verification: git log -1 shows progress commit.
uv run python scripts/validate_glossary.py
uv run python scripts/term_read.py --fail-on-missing --fail-on-forbidden
Mark final verification task item completed.
Verification: Both validation commands exit 0; all tasks completed.
digraph translate {
rankdir=TB;
scope [label="Resolve scope\n& preconditions", shape=box];
preflight [label="Terminology\npreflight", shape=box];
mode [label="Resolve\ntranslation mode", shape=box];
translate [label="Translate file\n(self-review loop)", shape=box];
writeback [label="Writeback +\nupdate progress", shape=box];
checkpoint [label="Batch checkpoint\n& commit", shape=box];
more [label="More files?", shape=diamond];
verify [label="Final\nverification", shape=box];
scope -> preflight -> mode -> translate;
translate -> writeback;
writeback -> checkpoint;
checkpoint -> more;
more -> translate [label="yes"];
more -> verify [label="no"];
}
translation-progress.json at file start and file close.| Thought | Reality |
|---|---|
| "Just overwrite source, I'll review later" | Draft isolation exists for a reason. NEVER overwrite without self-review. |
| "Skip task updates until the end" | Sync contract is per-file, not per-run. |
| "I'll invent a translation for this unknown term" | Run term_edit.py --set-zh workflow. No exceptions. |
| "Skip terminology preflight, it was fine last time" | Glossary changes between runs. Always preflight. |
| "One file left, no need for checkpoint commit" | Every completed batch gets a commit. No exceptions. |
| "I can batch-replace with regex for speed" | Manual translation only. Script-generated prose is forbidden. |
| "I'll add a heading to restate the title" | Never restate frontmatter.title as a body heading. |
| "I'll add an overview heading for clarity" | Never invent a heading that does not exist in the source. |
Stop when:
Return to Step 1 or 3 when:
After translation, run /check-consistency and /check-completeness as needed.
/translate
/translate docs/src/content/docs/rules/basic.md
/translate rules
/translate all