# Pre Changelog

Use before merging a kimi-code release PR to preview the user-facing CLI changelog in...

- Repository: https://github.com/MoonshotAI/kimi-code (8095 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MoonshotAI/kimi-code --skill pre-changelog -g -a claude-code -y`
Codex: `npx skills add MoonshotAI/kimi-code --skill pre-changelog -g -a codex -y`
Cursor: `npx skills add MoonshotAI/kimi-code --skill pre-changelog -g -a cursor -y`
Gemini CLI: `npx skills add MoonshotAI/kimi-code --skill pre-changelog -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Pre-Changelog

Preview the user-facing **Chinese** changelog of an open `kimi-code` release PR **before** it is merged. Read-only: this skill writes no files and commits nothing.

This skill reuses `sync-changelog`'s strip / classify / translate rules. Read `sync-changelog` first; only the data source (release PR diff instead of a published `CHANGELOG.md`) and the output (preview instead of docs files) differ.

## Workflow

### 1. Locate the release PR

Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview.

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

Pick the one with `headRefName: changeset-release/main`; record `number`, `url` as `<RELEASE>`. If none is open, nothing to preview, stop.

### 2. Read the pre-generated CLI changelog block

changesets already pre-generates `apps/kimi-code/CHANGELOG.md` inside the release PR. Extract the new version block from the diff:

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

Take the added lines (`+`) from the top `## <version>` down to (but not including) the next `## `. That is the version block to preview.

If the CLI changelog is not in the diff (for example an SDK-only release), stop and tell the user, there is no user-facing CLI changelog to preview.

### 3. Render the Chinese preview (reuse `sync-changelog`)

Process the version block exactly as `sync-changelog` does for the docs site, but only in memory:

The rest: https://github.com/MoonshotAI/kimi-code/blob/HEAD/.agents/skills/pre-changelog/SKILL.md
