mcpbeat Sign in

Doc I18n Agent Skill

Bilingual documentation translation and synchronization for path-based i18n projects. This skill should be used when users need to translate, compare, or synchronize documentation between Chinese and English versions. Triggers include requests to translate docs, sync i18n, compare zh/en docs, translate this page, check translation coverage, or any task involving bilingual Markdown documentation alignment. Supports both zh-to-en and en-to-zh translation directions.

1.4k tokens
context cost
SKILL.md, read when the skill is used
2
files
plus reference files
0
copies elsewhere
how many repositories repackaged it
1 131
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/YunYouJun/valaxy --skill doc-i18n

What comes with it

3 896 bytes besides the instruction
references/conventions.md

The instruction itself

14 sections, as written by the author

doc-i18n: Bilingual Documentation Translation Skill

Purpose

Translate, compare, and synchronize bilingual (Chinese / English) Markdown documentation in path-based i18n projects. Ensure structural alignment, content consistency, and adherence to project-specific conventions.

When to Use

  • Translating a documentation file from one language to another
  • Comparing two language versions for content drift or missing sections
  • Checking translation coverage across the documentation tree
  • Fixing heading IDs, internal links, or container syntax after translation
  • Creating a new translation file from an existing source

Workflow

Phase 1: Analyze

Before making any changes, analyze the task:

  • Identify the source and target files. Determine the translation direction:
  • English to Chinese: docs/pages/{path}.md to docs/pages/zh/{path}.md
  • Chinese to English: docs/pages/zh/{path}.md to docs/pages/{path}.md
  • Read both files (source and target). If the target file does not exist, note that a new file must be created.
  • Generate a diff report listing:
  • Headings present in source but missing/untranslated in target
  • Paragraphs or sections with untranslated content (e.g., Chinese text in the English file)
  • Structural differences (extra/missing sections, reordered content)
  • Code blocks or examples that differ
  • Internal link path issues (see Link Rules below)
  • Heading ID mismatches (see Heading ID Rules below)
  • Present the report to the user before proceeding. If the task is a full translation, proceed directly after the report.

Phase 2: Translate

Apply translations following these rules:

Content Rules
  • Translate prose, keep code. Translate all natural language (paragraphs, tips, blockquotes, list items, headings). Keep code blocks, inline code, file paths, CLI commands, component names, and API identifiers unchanged.
  • Translate code comments. Comments inside code blocks should be translated to match the target language.
  • Preserve Markdown structure exactly. Keep the same heading hierarchy, list nesting, blockquote depth, container syntax, and blank line patterns.
  • Frontmatter. Only translate the title field. Keep all other frontmatter fields (categories, tags, layout, etc.) identical.
  • Tone. For Chinese: use concise technical Chinese (技术文档风格). For English: use clear, direct technical English.
Container Syntax

Use exactly 3 colons for container directives:

::: tip
Content here.
:::

::: warning
Content here.
:::

::: details Title
Content here.
:::

Never use 4 or 5 colons. When the project convention differs, read references/conventions.md for project-specific overrides.

Heading ID Rules

All headings with explicit IDs ({#slug}) must use English slugs in both language versions for cross-language anchor consistency.

For English files: headings auto-generate English slugs, so explicit IDs are optional:

## Getting Started

For Chinese files: headings must include explicit English IDs:

## 起步 {#getting-started}

Slug format: lowercase, hyphens for spaces, strip possessives, e.g.:

  • Get User's Valaxy Config → {#get-users-valaxy-config}
  • Previous/Next Post → {#previous-next-post}
  • Table of Contents → {#table-of-contents}

Internal documentation links must use the correct path prefix:

  • English docs (docs/pages/{path}.md): links without prefix, e.g., /guide/getting-started
  • Chinese docs (docs/pages/zh/{path}.md): links with /zh/ prefix, e.g., /zh/guide/getting-started
  • Anchor links: always use English slugs, e.g., 全局状态管理
  • External links: keep unchanged
Code Block Labels

Preserve file path labels in code blocks:

// code here

Phase 3: Verify

After translation, run verification:

  • Heading count check: both files should have the same number of headings at each level
  • Heading ID alignment: all {#id} slugs in the Chinese file must match the auto-generated slugs in the English file
  • Link check: verify internal links use correct path prefixes
  • Container syntax check: verify all containers use 3 colons
  • No mixed language: verify the target file doesn't contain untranslated source-language text (except in code blocks and proper nouns)
  • Frontmatter check: verify frontmatter structure matches (only title differs)

Report any remaining issues to the user.

Translation Coverage Check

When asked to check translation coverage across the documentation:

  • List all .md files under docs/pages/ (excluding docs/pages/zh/)
  • For each file, check if a corresponding file exists under docs/pages/zh/
  • Report:
  • ✅ Files with both versions
  • ❌ Files missing Chinese translation
  • Files with significant size differences (more than 50% difference suggests incomplete translation)

Reference Files

  • references/conventions.md — Project-specific formatting conventions and overrides. Read this file when working on any project for the first time to understand project-specific rules.

How to use it

Copy the folder

Take yunyoujun/doc-i18n from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.