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

MoonshotAI/pre-changelog

kimi-codeのリリースPRをマージする前に、ユーザー向けCLIの変更履歴(中国語)をプレビューします。changesetsが事前生成したCHANGELOGを読み取り、sync-changelogの整形・分類・翻訳ロジックを再利用して中国語プレビューを表示します。ファイルは書き込みません。

pre-changelog とは?

このスキルは、kimi-codeのオープンなリリースPRをマージする前に、ユーザー向けの中国語CLIチェンジログをプレビューするための読み取り専用ツールです。changesetsによってPR内で事前生成されたCHANGELOG.mdを解析し、sync-changelogで定義されたstrip(不要部分の除去)、classify(分類)、translate(翻訳)ルールを再利用して、マージ前の状態で中国語のプレビューを生成します。このスキルはファイルを書き込んだりコミットしたりせず、プレビュー結果を標準出力に表示するだけです。利用者はgh CLIとGitHub APIを使用してリリースPRを特定し、差分からCLIチェンジログブロックを抽出します。その後、sync-changelogの手順に従って、エントリのボディテキストを残し、見出しやPRリンク、ハッシュリンク、クレジット行などを削除し、同じ表面に向けた小さな修正をマージ・重複排除し、機能/バグ修正/最適化/リファクタリング/その他に分類した上で中国語に翻訳します。出力は「<version>(预览)」の見出しで、セクションが空の場合は「无」と表示します。上流のエントリが英語でない場合は処理を中断して報告します。このスキルは主にMoonshotAIのkimi-codeプロジェクトで使用され、LLMエージェントによるリリース前レビューの自動化を支援します。

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

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

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

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

ドキュメント

Pre-Changelog(プレチェンジログ)

オープン中の kimi-code リリースPRがマージされる前に、ユーザー向けの中国語チェンジログをプレビューします。読み取り専用:このスキルはファイルを書き込まず、何もコミットしません。

このスキルは sync-changelog の strip(除去)/ classify(分類)/ translate(翻訳)ルールを再利用します。最初に sync-changelog をお読みください。異なるのはデータソース(公開済みの CHANGELOG.md ではなくリリースPRの差分)と出力先(ドキュメントファイルではなくプレビュー)のみです。

ワークフロー

1. リリースPRを見つける

git checkout main && git pull
gh pr list --state open --search "ci: release packages in:title" \
  --json number,title,url,headRefName,baseRefName

headRefName: changeset-release/main のものを選び、number url を <RELEASE> として記録します。オープン中のものがない場合はプレビューするものはありません — 終了します。

2. 事前生成されたCLIチェンジログブロックを読み取る

changesets はリリースPR内で apps/kimi-code/CHANGELOG.md をすでに事前生成しています。差分から新しいバージョンブロックを抽出します:

gh api repos/MoonshotAI/kimi-code/pulls/<RELEASE>/files \
  --jq '.[] | select(.filename=="apps/kimi-code/CHANGELOG.md") | .patch'

先頭の ## <version> から次の ## の手前までにある追加行(+)を取得します。これがプレビューするバージョンブロックです。

CLIチェンジログが差分に含まれていない場合(SDKのみのリリースなど)、ユーザーにその旨を伝えて終了します — ユーザー向けCLIチェンジログはありません。

3. 中国語プレビューをレンダリングする(sync-changelog を再利用)

バージョンブロックを sync-changelog がドキュメントサイトで行うのとまったく同じ方法で処理しますが、メモリ上のみで行います:

  • 除去(sync-changelog ステップ3):H1、### Patch Changes / ### Minor Changes / ### Major Changes の小見出し、PRリンク、コミットハッシュリンクを削除し、各エントリの本文テキストのみを残します。Thanks [@user](...)! のクレジット(複数著者形式を含む)は毎回削除する必要があります。各エントリ内では、SDKのみおよびプロバイダ内部の文(SDK機能マッピング/API公開、プロバイダワイヤー形式の内部構造、内部XMLマーカー)を削除し、ユーザー向けの効果と必要な制約のみを残します。
  • マージと重複排除(sync-changelog ステップ4):同じ表面に対する小さな調整を1つの高レベルエントリにマージします。3つ以上の修正が同じUI領域または同じ問題クラスを対象とする場合は、1つの高レベル修正エントリにマージします(広範または真に異なる修正はマージしません)。また、すでにリストアップされているWeb機能のみをバックアップするサーバー/APIエントリは削除します。
  • 分類(sync-changelog ステップ4):Features / Bug Fixes / Polish / Refactors / Other に振り分けます。各セクション内では読者にとっての価値で順序付けます(Polishでは、ユーザーに見える改善をプロトコル/内部調整の前に置きます)。
  • 翻訳(sync-changelog ステップ6):エントリ本文を中国語に翻訳します。エントリごとに1文とし、セクション内で平行したリズムを保ちます。セクション見出しは 新功能 / 修复 / 优化 / 重构 / 其他 になります。

上流のエントリが英語でない場合は、フラグを立てて停止します(changesetエントリは英語である必要があります)。

4. 出力

プレビューを直接表示します。バージョンはまだリリースされていないため、見出しには <version>(预览) を使用します。空のセクションには 无 と書きます。ファイルは書き込みません。

发版 PR: <url>

## <version>(预览)

### 新功能
- ...

### 修复
- ...

ルール

  • 読み取り専用。CHANGELOG.md、ドキュメントファイルへの書き込みやコミットは決して行いません。
  • 分類、順序付け、翻訳は sync-changelog に正確に従います — 指定範囲を超えて言い換えたり再分類したりしないでください。
  • リリースPRにCLIチェンジログの差分がない場合は、その旨を報告して停止します。

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

関連スキル