Community编程与开发github.com

prepare-core-kit-release

准备 bottlerocket-core-kit 发布,自动更新版本号和变更日志。

prepare-core-kit-release 是什么?

此技能用于自动化 bottlerocket-core-kit 的发布准备工作。它通过更新 Twoliter.toml 文件中的版本号,并从 Git 历史记录中生成结构化的 CHANGELOG.md 条目,来确保发布流程的一致性和正确性。该技能强调在生成变更日志前,必须使用 `git show` 命令验证每个 Pull Request 的实际文件修改内容,以区分第一方变更和第三方包更新,并遵循严格的分类和格式规范。它支持在本地开发环境中使用,需要用户具有目标版本号的知识,并强制要求创建两个按序提交的 Git commit:首先是版本号更新,然后是变更日志更新。此技能尤其适用于 Alex 团队进行 bottlerocket-core-kit 的正式版本发布。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/prepare-core-kit-release

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

准备 Core Kit 发布

通过更新 Twoliter.toml 中的版本号和 CHANGELOG.md,为 bottlerocket-core-kit 仓库准备新的发布。

目的

自动化 bottlerocket-core-kit 的发布准备工作流程:

  • 更新 Twoliter.toml 中的发布版本号
  • 从 Git 历史记录生成变更日志条目
  • 创建格式正确的发布提交

何时使用

  • 准备 bottlerocket-core-kit 的新版本发布
  • 需要使用最近更改更新变更日志
  • 创建具有正确格式的发布提交

前提条件

  • 在已签出 bottlerocket-core-kit 的 grove 中工作
  • Git 历史记录中可用的合并提交和 PR 引用
  • 了解目标发布版本号

操作步骤

发布工作流

重要:发布过程需要严格按照顺序创建两个提交:

提交 1:版本号更新(必须放在首位)

更新 Twoliter.toml 以设置新的发布版本:

# 在 Twoliter.toml 中,更新:
release-version = "X.Y.Z"

提交命令:

git add Twoliter.toml && git commit -s -S -m "twoliter: bump kit version to vX.Y.Z"

提交 2:变更日志更新(必须放在第二位)

使用新版本的更改更新 CHANGELOG.md。

提交命令:

git add CHANGELOG.md && git commit -s -S -m "changelog: update for vX.Y.Z"

1. 识别新提交

  • 查找自上次变更日志条目以来的提交:git log --oneline <last_version_tag>..HEAD
  • 如果没有标签,使用:git log --oneline --since="<last_release_date>"

2. 查找 PR 引用

  • 分析合并提交以查找 PR 编号:git log --merges --oneline <last_version_tag>..HEAD
  • 在提交信息中查找类似 "Merge pull request #XXX" 的模式
  • 使用 PR 合并提交交叉引用提交哈希

3. 关键:验证 PR 内容

始终通过检查实际修改的文件来验证每个 PR 中包含的包/更改:

git show <merge_commit_hash> --stat

不要依赖:

  • 仅提交信息的摘要
  • PR 分支名称
  • 对 PR 内容的假设

注意混合 PR: 单个 PR 可能同时包含第一方更改和第三方包更新。您必须为同一个 PR 中的每种更改类型创建单独的变更日志条目。

混合 PR 示例(PR #760):

git show 70609d6a --stat
# 显示更改:
#   sources/host-ctr/...          <- 第一方更改 (host-ctr 解析器)
#   packages/amazon-vpc-cni-plugins/...  <- 第三方更新
#   packages/ecs-agent/...        <- 第三方更新

此 PR 需要两个变更日志条目:

  1. OS 更改:"Replace amazon-ecr-containerd-resolver with Docker resolver in host-ctr ([#760])"
  2. 第三方包更新:"Update amazon-vpc-cni-plugins, ecs-agent ([#760])"

正确验证示例:

# 对于合并提交 9656d841 (PR #795):
git show 9656d841 --stat
# 显示:libcap, liburcu, libxcrypt, readline 更改
# 不是分支名称或摘要可能暗示的内容

4. 变更日志风格指南

版本标题格式

# v<VERSION> (<YYYY-MM-DD>)

章节层级

  1. OS 更改 - 核心系统和第一方包更新
    • 第一方包更新(使用详细子列表)
    • 第三方包更新 子章节用于外部包
  2. 构建更改 - 构建系统、工具和基础设施更改
  3. 编排器更改 - 容器编排特定的更改
    • Kubernetes 子章节(如适用)

条目格式

  • 使用带 PR 引用的列表项:- Description ([#XXX])
  • 对于第一方包,适当时包含详细子列表项
  • 对于第三方包更新:不要包含版本号
    • 正确:- Update \docker-cli-29`, `docker-engine-29` ([#785])`
    • 错误:- Update \docker-cli-29` to v29.0.4, `docker-engine-29` to v29.0.4 ([#785])`
  • 对于补丁/修复,使用 "Patch" 而不是 "Update":
    • 正确:- Patch \containerd-2.1` to update GRPC ([#801])`

分类规则

  • 第一方包:Bottlerocket 特有的代码和内部依赖
  • 第三方包:外部库和工具(glibc, docker-engine, 等)
  • 构建更改:任何影响构建系统、CI/CD 或开发工具的内容
  • 编排器更改:Kubernetes、ECS 或其他容器编排功能

5. 质量检查

  • 确保所有条目都包含 ([#XXX]) 格式的 PR 引用
  • 验证格式和缩进的一致性
  • 对相关更改进行分组以避免重复条目
  • 保持章节内的时间顺序
  • 检查子章节标题是否与现有模式匹配
  • 在写入条目之前验证每个 PR 的实际内容

验证

验证命令

  • 验证 git 日志范围:git log --oneline <range>
  • 检查合并提交:git log --merges --grep="pull request" <range>
  • 检查 PR 内容:git show <merge_hash> --stat
  • 验证 PR 编号在仓库中存在

成功的发布准备包括:

  • 两个按正确顺序的提交(版本更新优先,变更日志其次)
  • Twoliter.toml 已更新 release-version
  • CHANGELOG.md 包含带有正确日期的新版本章节
  • 所有条目都使用 ([#XXX]) 格式的 PR 引用
  • 第三方包更新不包含版本号
  • 提交已签名(-s -S 标志)

常见问题

缺少 PR 引用

如果合并提交没有显示 PR 编号,请检查:

git log --merges --oneline | head -20

查找 "Merge pull request #XXX" 模式。

错误的包分类

在归类为第一方或第三方之前,始终使用 git show <hash> --stat 验证实际更改的文件。

第三方更新中的版本号

记住:第三方包更新条目不应包含版本号,只包含包名。

示例输出结构

# v12.3.0 (2026-01-20)

## OS 更改
- Replace `amazon-ecr-containerd-resolver` with Docker resolver in `host-ctr` ([#760])
- Add MPS control daemon support to `nvidia-k8s-device-plugin` ([#789])

### 第三方包更新
- Update `docker-cli-29`, `docker-engine-29` ([#785])
- Patch `containerd-2.1` to update GRPC ([#801])
- Update `libnvme`, `xfsprogs`, `nvme-cli`, `makedumpfile`, `keyutils`, `e2fsprogs` ([#794])
- Update `readline`, `libxcrypt`, `liburcu`, `libcap` ([#795])

[#760]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/760
[#785]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/785
[#789]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/789
[#794]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/794
[#795]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/795
[#801]: https://github.com/bottlerocket-os/bottlerocket-core-kit/pull/801

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相关技能