Community寫作與編輯github.com

MoonshotAI/translate-docs

翻譯並同步 docs/zh/ 和 docs/en/ 之間的雙語使用者文件,遵循 docs/AGENTS.md 中的真實來源規則。

translate-docs 是什麼?

此技能用於同步儲存庫中雙語使用者文件(docs/zh/ 和 docs/en/)的兩個語言版本。當任一語言版本更新後,此技能會逐頁將變更同步至另一語言版本。它由 gen-docs(增量更新)和 audit-docs(完整發佈前稽核)兩個技能調用,以確保語言鏡像保持一致。 同步規則根據 docs/AGENTS.md 中的真實來源規則進行:更新日誌(release-notes/changelog.md)和重大變更日誌(release-notes/breaking-changes.md)以英文為準,需翻譯為中文;其他頁面則為鏡像對應,任一語言更新後都需同步另一語言。 技能運作流程為:透過 git diff 檢測變更文件,逐頁逐節進行翻譯,保留相同的標題層級、列表結構、程式碼區塊、提示區塊和連結目標;依照 docs/AGENTS.md 中的術語表和排版規則,確保術語一致且格式正確;最後透過 git diff 和文件建置來驗證。 支援平台包括 GitHub 上的專案,適用於維護雙語使用者文件的所有 Claude Code、Cursor 等 AI 代理系統。此技能的核心優勢在於強制執行一致的術語和格式規則,避免常見錯誤,確保兩個語言版本的文件品質一致。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MoonshotAI/kimi-code/tree/main/.agents/skills/translate-docs

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

翻譯文件

概述

此儲存庫在 docs/zh/ 和 docs/en/ 下維護雙語使用者文件。本技能用於在任一語言更新後,逐頁同步兩個語言版本。

此技能由 gen-docs(增量更新)和 audit-docs(完整發佈前稽核)調用,以保持語言鏡像同步。

先決條件

如果缺少下列任何一項,請停止並先向使用者報告:

  • docs/zh/ 和 docs/en/ 的目錄結構互為鏡像。
  • docs/AGENTS.md — 包含術語表、排版規則和真實來源規則。

語言同步規則

  • 更新日誌 (release-notes/changelog.md):英文為真實來源。翻譯成中文。
  • 重大變更 (release-notes/breaking-changes.md):英文為真實來源。翻譯成中文。
  • 其他所有頁面:docs/en/ 和 docs/zh/ 互為鏡像對。任一語言變更後,需在同一變更中更新另一語言。

當非更新日誌的頁面在任一語言變更時,請在發佈前同步其鏡像。當英文更新日誌變更時,同步中文更新日誌。

工作流程

  1. 偵測需要同步的內容

    • git diff main..HEAD --stat docs/ — 查看哪些檔案已變更
    • 對於 docs/en/ 或 docs/zh/ 下每個變更的檔案,找到其在另一語言中的鏡像(相同相對路徑)。
  2. 逐頁、逐節翻譯

    • 保持兩個語言版本之間的標題層級、列表結構、程式碼區塊、提示區塊和連結目標完全相同。
    • 若對某個技術術語有疑問,請閱讀實際程式碼以確認行為,而非猜測。
  3. 套用 docs/AGENTS.md 中的術語和排版規則

    • 嚴格使用術語表。不要自行發明翻譯或使用同義詞。
    • 英文 H2+ 標題使用句子大小寫(依術語表,專有名詞除外)。
    • 中文排版:使用全形標點符號(,。;:?!()),中文與 ASCII(字母、數字、行內程式碼、連結)之間需有空格。
    • 提示區塊標題(::: tip / ::: warning / ::: info / ::: danger)使用 docs/AGENTS.md 中的簡短中文標籤。
  4. 驗證

    • git diff docs/ — 檢查術語漂移或標點符號回歸。
    • 如果可以,執行文件建置指令(pnpm --filter docs run build 或類似指令)以發現損壞的連結和 Markdown 錯誤。

規則與慣例

  • 不要單方面修復:如果變更的語言版本中有不清楚或不正確的陳述,請先在那裡修正,不要只修補鏡像。
  • 匹配風格,而不只是文字:中文文件使用敘事語氣(請見 docs/AGENTS.md 中的寫作風格範例);在中文文件中保持該語氣;在英文文件中保持句子大小寫標題和簡潔的英文風格。
  • 程式碼區塊和識別碼保持不變:不要翻譯程式碼、指令名稱、旗標名稱或檔案路徑。
  • 公開範例:不要在翻譯時引入真實的內部端點、金鑰名稱、帳戶名稱或服務名稱。在兩個語言版本中都將其保留或替換為中性佔位符,例如 example.com、example.test 和 YOUR_API_KEY。

常見錯誤

  • 僅因為目標語言中的某個短語感覺不順就重寫鏡像——應先修正變更的語言版本,然後再同步。
  • 讓英文標題變成標題大小寫(H2+ 只允許句子大小寫)。
  • 忘記在中文與行內程式碼或英文單詞之間添加空格。
  • 翻譯術語表中列出的專有名詞(Wire、MCP、ACP、JSON、OAuth、macOS、uv 等)。
  • 僅更新一個方向而讓另一語言版本過時——務必完成 diff 中標記的所有頁面。
  • 將真實的內部值複製到鏡像中,而非使用中性的 example 佔位符。

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

MoonshotAI/agent-core-dev

Use when developing in packages/agent-core-v2 (the DI × Scope agent engine) — adding or modifying a domain Service, choosing a LifecycleScope, wiring DI dependencies, splitting a domain across scopes, owning or migrating a config section, gating behavior behind an experimental flag, raising coded errors, working on the permission system, writing DI/Scope tests, porting business logic from agent-core (v1) to v2, triaging a main-branch commit against v2, or exposing a v2 domain over server-v2 while keeping the /api/v1 wire contract compatible with released clients. Self-contained guide organized by development stage (orient → design → implement → test → verify) plus align workflows for v1→v2 migration, main-branch commit triage, and server-v2 wire exposure; each file carries the rules, examples, and red lines for its step.

MoonshotAI/agent-core-review

Use ONLY for code review and test write/review guidance in `packages/agent-core-v2` (the DI × Scope agent engine). Does NOT apply to the legacy `packages/agent-core` or to any other package — for those, do not load this skill. Groups the review and testing lenses used for agent-core-v2 — `slop` (single-level-of-abstraction / layered error-handling review, invoked only on explicit request) and `test` (contract-driven per-test rules for both authoring and reviewing tests). Apply the sub-skill that matches the task; do not apply `slop` unprompted.

MoonshotAI/consolidate

Apply an approved sub-skill grouping by moving user-specified skills into a parent bundle, with timestamped backups of every modified directory.

MoonshotAI/gen-changesets

Use when generating changesets in the kimi-code repository, including package bump selection, internal package and CLI bundle handling, bump levels, major confirmation, and English changelog wording.

MoonshotAI/gen-docs

Update Kimi Code CLI user documentation after meaningful code changes that affect product behavior or user experience.

MoonshotAI/kimi-datasource

Universal data-source assistant. Use this skill when the user wants external structured data such as stocks, financial reports, technical indicators, A-share/HK/US markets, global macroeconomics, Chinese enterprise registry information, arXiv papers, Google Scholar results, or Chinese laws/regulations and judicial cases. This plugin exposes tools via MCP server `plugin-kimi-datasource_data`; call them in the flow `mcp__plugin-kimi-datasource_data__get_data_source_desc` → `mcp__plugin-kimi-datasource_data__call_data_source_tool`.

MoonshotAI/pre-changelog

Use before merging a kimi-code release PR to preview the user-facing CLI changelog in Chinese. Reads the changelog that changesets pre-generated in the release PR, then reuses sync-changelog's strip / classify / translate logic to render a Chinese preview. Writes no files.

MoonshotAI/review

Analyze the available skill set and recommend candidate groups that could be consolidated into sub-skill bundles. Read-only — proposes a plan, does not move files.

MoonshotAI/slop

Invoke only when the user explicitly asks to review code through the "single level of abstraction / layered error handling" lens — a function does only its own layer's business logic while errors are handled above or below. The agent reports detections, raw-count measurements, and move directions. Apply only when the user explicitly requests this lens.

MoonshotAI/sub-skill

Discover and reorganize the skill inventory into hierarchical sub-skill bundles. Use when the user asks to review, group, or consolidate skills into a parent bundle.

MoonshotAI/sync-changelog

Use after a release succeeds, when maintainers need to sync apps/kimi-code/CHANGELOG.md into docs/en/release-notes/changelog.md and docs/zh/release-notes/changelog.md, then open a PR on a dedicated branch.

MoonshotAI/test

Use when writing or reviewing tests, or when asked how to write a good single test. Encodes the per-test rules behind the "test the contract / responsibility, not the implementation" principle — name and structure one behavior per `it`, drive through the public surface, stub only true external boundaries, control time and config via documented knobs, and keep tests clear, isolated, and refactor-resilient. The same rules drive both authoring (write mode) and auditing existing tests (review mode).

MoonshotAI/write-tui

Use when writing or modifying the kimi-code terminal UI in apps/kimi-code/src/tui — components, dialogs/selectors, slash commands, themes, streaming render, or the KimiTUI controllers. Covers the architecture, where new features go, test placement, the theme system mechanics, and the dialog interaction/visual spec (DESIGN.md).

相關技能