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` 中的术语和排版规则,并最终验证翻译结果。支持平台包括任何基于 Git 的项目,但特别适用于需要严格术语控制和双语文档同步的 VuePress 或类似静态站点。该技能强制使用术语表规定的翻译,保持英文标题为句首大写,中文使用全角标点且在中英文之间加空格,并禁止泄露内部端点或真实名称。

兼容平台~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 等)。
  • 只更新一个方向而让另一个语言版本过时— 始终完成差异标记的所有页面。
  • 将真实的内部值复制到镜像中,而不是使用中性的 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).

相关技能