Community写作与编辑github.com

MoonshotAI/pre-changelog

在合并 kimi-code 发布 PR 之前,预览面向用户的 CLI 更新日志中文版。读取 changesets 在发布 PR 中预生成的更新日志,复用 sync-changelog 的提取/分类/翻译逻辑,生成中文预览。不写入任何文件。

pre-changelog 是什么?

这是一个用于 kimi-code 发布流程的 AI 技能,旨在帮助开发者在合并发布 PR 之前,预览面向用户的 CLI 更新日志(中文版)。它通过读取 changesets 在 PR 中预生成的 CHANGELOG.md 的 diff 内容,提取当前版本块,然后复用 sync-changelog 的规则:剔除 H1 标题、子标题、PR 链接和提交哈希,合并和去重条目,按功能/修复/优化/重构/其他进行分类,并翻译为中文。该技能不会写入任何文件或提交任何更改,仅作为只读预览输出。主要支持平台是 GitHub CLI(gh)和 API,通过与 MoonshotAI/kimi-code 仓库的发布流程集成,确保在合并前检查更新日志的准确性和可读性。

兼容平台~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 的 diff,而非已发布的 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。从 diff 中提取新版本块:

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

从顶部 ## <version> 开始,取新增行(+),直到遇到下一个 ##(不包含)。这就是要预览的版本块。

如果 CLI 更新日志不在 diff 中(例如仅 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):将条目正文翻译为中文;每个部分内保持每个条目一句、节奏一致;各标题成为:新功能 / 修复 / 优化 / 重构 / 其他。

如果上游条目不是英文,标记并停止(changeset 条目必须为英文)。

4. 输出

直接打印预览。使用 <version>(预览) 作为标题,因为版本尚未发布。空节写 无。不写入任何文件。

发版 PR: <url>

## <version>(预览)

### 新功能
- ...

### 修复
- ...

规则

  • 只读。绝不写入 CHANGELOG.md、文档文件或提交任何内容。
  • 分类、排序和翻译严格遵循 sync-changelog——不要超出其规范进行改写或重新分类。
  • 如果发布 PR 没有 CLI 更新日志 diff,则报告并停止。

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

相关技能