# Translate Docs

Translate and sync bilingual user documentation between docs/zh/ and docs/en/ following...

- Repository: https://github.com/MoonshotAI/kimi-code (8095 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MoonshotAI/kimi-code --skill translate-docs -g -a claude-code -y`
Codex: `npx skills add MoonshotAI/kimi-code --skill translate-docs -g -a codex -y`
Cursor: `npx skills add MoonshotAI/kimi-code --skill translate-docs -g -a cursor -y`
Gemini CLI: `npx skills add MoonshotAI/kimi-code --skill translate-docs -g -a gemini-cli -y`

## Description

Translate and sync bilingual user documentation between docs/zh/ and docs/en/ following the source-of-truth rules in docs/AGENTS.md.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Translate Docs

## Overview

This repository keeps bilingual user documentation under `docs/zh/` and `docs/en/`. This skill synchronizes the two locales, page by page, after either side has been updated.

This skill is invoked by both `gen-docs` (incremental updates) and `audit-docs` (full pre-release audit) to keep locale mirrors in sync.

## Prerequisites

If any of the following are missing, stop and report to the user before continuing:

- `docs/zh/` and `docs/en/` mirrored directory structure.
- `docs/AGENTS.md`, terminology table, typography rules, and source-of-truth rules.

## Locale sync rules

- **Changelog** (`release-notes/changelog.md`): English is the source. Translate to Chinese.
- **Breaking changes** (`release-notes/breaking-changes.md`): English is the source. Translate to Chinese.
- **All other pages**: `docs/en/` and `docs/zh/` are mirrored pairs. After either side changes, update the other locale in the same change.

When non-changelog pages change in either locale, sync the mirror before release. When the English changelog changes, sync the Chinese changelog.

## Workflow

1. **Detect what needs syncing**

   - `git diff main..HEAD --stat docs/`, see which files changed
   - For each changed file under `docs/en/` or `docs/zh/`, locate its mirror in the other locale (same relative path).

2. **Translate page by page, section by section**

   - Keep heading hierarchy, list structure, code blocks, callout blocks, and link targets identical between the two versions.
   - When in doubt about a technical term, **read the actual code** to confirm behavior rather than guessing.

3. **Apply terminology and typography rules from `docs/AGENTS.md`**

The rest: https://github.com/MoonshotAI/kimi-code/blob/HEAD/.agents/skills/translate-docs/SKILL.md
