首页/ AI 技能 / @skilllib/skill-2117939930272411102
Skill站外收录 @skilllib/skill-2117939930272411102

changeset-validation

通过分析 Git 差异(含未提交的本地修改),判断变更集是否准确反映包改动并符合版本升级规则,自动识别需采用 patch、minor、major 或 none 的升级级别,确保 PR 合规性与发布流程一致性。

0.0 (0) 20 次安装 原作者 编程导航
收录于 2026-01-22

Skills.MD

# Changeset Validation ## Overview This skill validates whether changesets correctly reflect package changes and follow the repository rules. It relies on the shared prompt in `references/validation-prompt.md` 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. ## Quick start Local (Codex-driven): 1. Run: ```bash pnpm changeset:validate-prompt ``` 2. Apply the rules from `references/validation-prompt.md` to the generated prompt. 3. Respond with a JSON verdict containing ok/errors/warnings/required_bump (English-only strings). CI (Codex Action): 1. Run: ```bash pnpm changeset:validate-prompt -- --ci --output .github/codex/prompts/changeset-validation.generated.md ``` 2. Use `openai/codex-action` with the generated prompt and JSON schema to get a structured verdict. ## Workflow 1. Generate the prompt context via `pnpm changeset:validate-prompt`. 2. Apply the rules in `references/validation-prompt.md` to judge correctness. 3. Provide a clear verdict and required bump (patch/minor/major/none). 4. If the changeset needs edits, update it and re-run the validation. ## 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`

评论 0

还没有评论,来抢沙发。