Community寫作與編輯github.com

MoonshotAI/pre-changelog

在合併 kimi-code 發佈 PR 之前,預覽面向使用者的中文 CLI 更新日誌。讀取變更集在發佈 PR 中預先產生的更新日誌,再利用 sync-changelog 的清理、分類和翻譯邏輯生成中文預覽,不會寫入任何檔案。

pre-changelog 是什麼?

這項技能是為 MoonshotAI/kimi-code 專案設計的工具,用於在正式合併發佈 PR 之前,搶先查看面向使用者的 CLI 更新日誌(CLI changelog)的中文預覽。它的運作基礎是讀取 changesets 已預先生成在發佈 PR 中的 `apps/kimi-code/CHANGELOG.md` 變更,並重複利用 `sync-changelog` 腳本的清理、合併去重、分類和翻譯規則,將原始英文條目即時轉換為結構清晰的中文版本。整個過程是唯讀的,不會修改任何檔案或提交變更。此技能尤其適用於 kimi-code 的發佈流程,幫助開發者在合併 PR 前快速確認更新日誌的品質與分類是否正確。最終輸出會以「〈版本號〉(預覽)」為標題,並按「新功能 / 修復 / 優化 / 重構 / 其他」分節呈現。

相容平台~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 中提問

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

說明文件

預覽更新日誌(Pre-Changelog)

在合併開放的 kimi-code 發佈 PR 之前,預覽面向使用者的中文更新日誌。唯讀操作:此技能不會寫入任何檔案,也不會提交任何內容。

此技能重複利用 sync-changelog 的清理、分類與翻譯規則。請先閱讀 sync-changelog;唯一的差異在於資料來源(發佈 PR 的差異內容,而非已發佈的 CHANGELOG.md)以及輸出形式(預覽而非正式文件)。

工作流程

1. 定位發佈 PR

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

選出 headRefName: changeset-release/main 的那個;記錄 number、url 為 <RELEASE>。如果沒有開放的發佈 PR,則無需預覽——直接停止。

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):將對同一功能的多個微調合併為一個更高層級的條目;當三個或以上的修復針對同一 UI 區域或同一類問題時,合併為一個更高層級的修復條目(不要合併範圍廣泛或本質不同的修復);刪除那些僅支援已列出的 Web 功能的伺服器/API 條目。
  • 分類(sync-changelog 步驟 4):歸入 新功能 / 修復 / 優化 / 重構 / 其他 類別;每個類別內按讀者價值排序(在「優化」中,使用者可見的改進優先於協定/內部調整)。
  • 翻譯(sync-changelog 步驟 6):將條目正文翻譯為中文;每個條目保持一句話,同一類別內保持並列節奏;類別標題變為 新功能 / 修復 / 優化 / 重構 / 其他。

如果上遊條目不是英文,則標記並停止(變更集條目必須是英文)。

4. 輸出

直接列印預覽內容。使用 <版本>(預覽) 作為標題,因為該版本尚未發佈。空類別寫上 無。不寫入任何檔案。

發版 PR: <url>

## <版本>(預覽)

### 新功能
- ...

### 修復
- ...

規則

  • 唯讀。絕不寫入 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).

相關技能