Communityライティング&編集github.com

MoonshotAI/gen-docs

意味のあるコード変更が製品の動作やユーザー体験に影響を与えた後、Kimi Code CLI のユーザードキュメントを更新します。

gen-docs とは?

このスキルは、コードベースにユーザー向けの変更が加えられた際に、Kimi Code CLI のバイリンガルユーザードキュメント (`docs/en/` および `docs/zh/`) を更新するためのワークフローを提供します。変更ログは英語をソースとし、中国語に翻訳されますが、その他のページは英語と中国語でミラーリングされます。このスキルは VitePress サイト構造、`docs/AGENTS.md` スタイルガイド、`translate-docs` スキルに依存しています。ワークフローでは、実際の実装を確認してユーザーへの影響を評価し、変更ログを同期し、スタイルガイドの用語表に従って影響を受けるドキュメントページを編集し、最後に `translate-docs` スキルを呼び出してバイリンガルコンテンツを同期します。内部リファクタリングやツールの変更など、ユーザーに影響を与えない変更はスキップします。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/MoonshotAI/kimi-code/tree/main/.agents/skills/gen-docs

Installed? Explore more ライティング&編集 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Gen Docs

概要

このリポジトリは docs/ 以下でバイリンガルのユーザードキュメントを管理しています。docs/en/ と docs/zh/ はほとんどのページでミラーペアになっており、変更時は両方を更新する必要があります。変更ログは例外で、英語がソースであり、中国語は英語から翻訳されます。

コードベースに製品の動作やユーザー体験に影響を与える変更がある場合は、このスキルを使用して対応するドキュメントを更新してください。

全ページのプレリリース完全監査(ハルシネーションやカバレッジのギャップを検出)には、代わりに audit-docs スキルを使用してください。

前提条件

このスキルは以下が整っていることに依存します。いずれかが欠けている場合は、処理を停止してユーザーに報告してください。

  • docs/ ディレクトリに docs/zh/、docs/en/、および docs/.vitepress/config.ts が設定されていること(VitePress サイト)。
  • docs/AGENTS.md スタイルガイド — 真実のソースルール、用語表、タイポグラフィ、および文章スタイルを定義します。
  • docs/scripts/sync-changelog.mjs — ルートの CHANGELOG.md を docs/en/release-notes/changelog.md に自動同期します。
  • translate-docs スキルが .agents/skills/ にあること — バイリンガル同期を処理します。

ワークフロー

  1. 変更を確認

    • git log main..HEAD --oneline — 現在のブランチのコミット
    • git diff main..HEAD --stat — ファイルレベルのスコープ
    • ls .changeset/*.md (README.md を除く) — 保留中のチェンジセットエントリ
    • CHANGELOG.md およびサブパッケージ packages/*/CHANGELOG.md を読み、既に記録されたエントリを確認します。
  2. ユーザーへの影響を把握 各変更について、必要に応じて実際の実装を読んでください。コミットメッセージやPRタイトルだけで動作を推測しないでください。以下はスキップします:

    • 外部から見える動作変更のない内部リファクタリング
    • テスト、CI、型のみの変更
    • ユーザーがCLIを呼び出す方法を変更しないツール/ビルドシステムの変更

    スキャン後にユーザーへの影響がないと結論付けた場合は、その旨を伝えて停止してください。

  3. 英語の変更ログを同期 以下を実行します:

    node docs/scripts/sync-changelog.mjs
    

    これにより、ルートの CHANGELOG.md から docs/en/release-notes/changelog.md が更新されます。ドキュメントの変更ログは手動で編集しないでください。

  4. ユーザードキュメントを更新 docs/AGENTS.md のルールに従い、作業中のロケールで影響を受けるページを編集し、その後ミラーを同期します。用語は docs/AGENTS.md の用語表と周辺ページの既存の表現に一致させてください。

    関連するすべてのセクションをカバーします:

    • ガイド(はじめに、ユースケース、インタラクション、セッション、IDE統合)
    • カスタマイズ(スキル、エージェント、MCP、フック、プラグインなど)
    • 設定(設定ファイル、環境変数、プロバイダー、データの場所)
    • リファレンス(CLIサブコマンド、スラッシュコマンド、キーボードショートカット)
    • リリースノート(破壊的変更が含まれる場合は docs/zh/release-notes/breaking-changes.md)
  5. バイリンガルコンテンツを同期 translate-docs スキルを呼び出します。これにより以下が行われます:

    • 更新された変更ログ以外のページを docs/en/ と docs/zh/ 間で同期
    • 英語の変更ログを中国語に翻訳し docs/zh/release-notes/changelog.md に配置

ルールと規約

  • ロケール同期: 変更ログ以外のページは docs/en/ と docs/zh/ 間でミラーリングされたままにします。変更ログは英語 → 中国語の流れです。
  • 用語: docs/AGENTS.md の用語表を正確に使用してください。新しい翻訳を発明したり、同義語を使用したりしないでください。
  • スコープの規律: 最近の変更の影響を受けるセクションのみを更新してください。無関係なドキュメントを日和見的に書き換えないでください。
  • 公開例: 実際の内部エンドポイント、キー名、アカウント名、またはサービス名をドキュメントに記述しないでください。https://api.example.com/v1、https://registry.example.com/v1/models/api.json、example.test、YOUR_API_KEY などの中立的なプレースホルダーを使用してください。
  • 破壊的変更: いずれかの変更が破壊的である場合、docs/en/release-notes/breaking-changes.md(## Unreleased の下)も更新し、**影響** + **移行手順** のサブセクションを追加し、docs/zh/release-notes/breaking-changes.md にミラーリングしてください。
  • 自動同期されたファイルを編集しない: docs/en/release-notes/changelog.md は同期スクリプトによって再生成されます。手動で編集すると上書きされます。

よくある間違い

  • ユーザーができるようになったこと(またはできなくなったこと)ではなく、コードがどのように変更されたかを説明してしまう。
  • 変更を既存の文章に織り込む代わりに、機能ごとに新しいセクション見出しを追加してしまう。
  • 一方のロケールのみを更新し、そのミラーを古いままにしてしまう。
  • 最初に変更したロケールで修正すべき表現を、ミラーの編集だけで対応してしまう。
  • docs/AGENTS.md の用語表から逸脱した新しい用語を作り出してしまう。
  • 実際の内部値を例に使用せず、中立的な 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/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/translate-docs

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

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).

関連スキル