changeset-validation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChangeset Validation
Changeset验证
Overview
概述
This skill validates whether changesets correctly reflect package changes and follow the repository rules. It relies on the shared prompt in so local Codex reviews and GitHub Actions share the same logic.
Experimental or preview-only feature additions that are explicitly labeled as such in the diff may remain a patch bump when they do not change existing behavior.
Major bumps are only allowed after the first major release; before that, do not use major bumps for feature-level changes.
references/validation-prompt.md本Skill用于验证changeset是否准确反映了包的变更情况,且符合仓库规则。它依赖于中的共享提示词,因此本地Codex评审和GitHub Actions会使用相同的逻辑。
如果diff中明确标记为实验性或仅预览功能的新增内容未改变现有行为,那么版本升级级别可保持为patch(补丁级)。
首次正式大版本发布前,不允许使用major(主版本)升级;在此之前,功能级变更不应使用主版本升级。
references/validation-prompt.mdQuick start
快速开始
Local (Codex-driven):
- Run:
bash
pnpm changeset:validate-prompt - Apply the rules from to the generated prompt.
references/validation-prompt.md - Respond with a JSON verdict containing ok/errors/warnings/required_bump (English-only strings).
CI (Codex Action):
- Run:
bash
pnpm changeset:validate-prompt -- --ci --output .github/codex/prompts/changeset-validation.generated.md - Use with the generated prompt and JSON schema to get a structured verdict.
openai/codex-action
本地(由Codex驱动):
- 运行:
bash
pnpm changeset:validate-prompt - 将中的规则应用到生成的提示词中。
references/validation-prompt.md - 返回包含ok/errors/warnings/required_bump的JSON判定结果(仅使用英文)。
CI(Codex Action):
- 运行:
bash
pnpm changeset:validate-prompt -- --ci --output .github/codex/prompts/changeset-validation.generated.md - 使用,结合生成的提示词和JSON schema,获取结构化的判定结果。
openai/codex-action
Workflow
工作流程
- Generate the prompt context via .
pnpm changeset:validate-prompt - Apply the rules in to judge correctness.
references/validation-prompt.md - Provide a clear verdict and required bump (patch/minor/major/none).
- If the changeset needs edits, update it and re-run the validation.
- 通过生成提示词上下文。
pnpm changeset:validate-prompt - 应用中的规则来判断正确性。
references/validation-prompt.md - 提供清晰的判定结果和所需的版本升级级别(patch/minor/major/none)。
- 如果changeset需要修改,更新后重新运行验证。
Branch-level changeset rule (do not skip)
分支级changeset规则(请勿跳过)
- If any file is already present in the current branch diff, treat it as the active changeset. Do not add a new changeset file.
.changeset/*.md - Instead, update the existing changeset file by rewriting its summary to reflect the primary change relative to . Do not try to capture every incremental update.
main - Keep the summary at one line; replace the line as needed rather than appending. If you must include multiple points, compress them into a single line.
- 如果当前分支的diff中已存在任何文件,则将其视为当前有效的changeset。请勿添加新的changeset文件。
.changeset/*.md - 相反,更新现有的changeset文件:重写其摘要,以反映相对于分支的主要变更。无需记录每一次增量更新。
main - 摘要需保持为单行;必要时直接替换该行,而非追加内容。如果必须包含多个要点,请压缩为单行。
Shared source of truth
共享事实源
- Keep the prompt file as the single source of validation rules.
- Keep the script lightweight: it should only gather context and emit the prompt.
- 将提示词文件作为验证规则的唯一事实源。
- 保持脚本轻量化:仅需收集上下文并生成提示词即可。
Resources
资源
references/validation-prompt.md
references/validation-prompt.md