release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release Workflow

发布工作流

This skill handles the full release cycle for a Claude Code plugin that keeps its version in two files:
  • .claude-plugin/plugin.json
    — the
    "version"
    field
  • .claude-plugin/marketplace.json
    — the
    "metadata"."version"
    field
Both must always be in sync.
此Skill负责Claude Code插件的完整发布周期,该插件的版本信息存储在以下两个文件中:
  • .claude-plugin/plugin.json
    "version"
    字段
  • .claude-plugin/marketplace.json
    "metadata"."version"
    字段
这两个文件中的版本号必须始终保持同步。

Workflow

工作流步骤

1. Determine the bump type

1. 确定版本更新类型

Ask the user which kind of version bump they want — patch, minor, or major — unless they already specified it. Show the current version from
plugin.json
and what the new version would be for each option so the choice is concrete.
询问用户想要的版本更新类型——patch(补丁版)minor(次版本)major(主版本),除非用户已明确指定。展示
plugin.json
中的当前版本,以及各选项对应的新版本,让用户做出明确选择。

2. Run quality checks

2. 运行质量检查

Run
make check
(which verifies shared refs use correct paths and all shared files exist). This is the gate — if it fails, stop and report the errors so they can be fixed before retrying. Do not proceed past this step on failure.
执行
make check
(验证共享引用路径是否正确、所有共享文件是否存在)。这是关键环节——如果检查失败,立即停止并报告错误,以便用户在重试前修复问题。检查失败时不得继续后续步骤。

3. Ensure we're on the right branch

3. 确保处于正确分支

The release branch must be named
release/vX.Y.Z
where X.Y.Z is the new version (after bumping).
  • If already on
    release/vX.Y.Z
    matching the new version, stay on it.
  • If on
    main
    or any other branch, create and switch to
    release/vX.Y.Z
    from the current HEAD.
  • If on a
    release/
    branch for a different version, warn the user and ask how to proceed — they may have started a release they want to abandon.
发布分支必须命名为
release/vX.Y.Z
,其中X.Y.Z为更新后的版本号。
  • 若当前已处于匹配新版本的
    release/vX.Y.Z
    分支,则保持当前分支。
  • 若当前处于
    main
    或其他分支,基于当前HEAD创建并切换至
    release/vX.Y.Z
    分支。
  • 若当前处于对应其他版本
    release/
    分支,向用户发出警告并询问处理方式——用户可能想要放弃已启动的发布流程。

4. Bump the version

4. 更新版本号

Edit both files to the new version string:
  1. .claude-plugin/plugin.json
    — change the
    "version"
    value.
  2. .claude-plugin/marketplace.json
    — change the
    "metadata"."version"
    value.
Only change the version fields — don't touch anything else in either file. Verify both files now contain the same new version.
将两个文件中的版本字符串更新为新版本号:
  1. .claude-plugin/plugin.json
    — 修改
    "version"
    字段的值。
  2. .claude-plugin/marketplace.json
    — 修改
    "metadata"."version"
    字段的值。
仅修改版本字段——不得改动两个文件中的其他任何内容。验证两个文件中的新版本号是否一致。

5. Commit and push

5. 提交与推送

Stage
.claude-plugin/plugin.json
and
.claude-plugin/marketplace.json
, then commit with the message:
Bump version to vX.Y.Z
Push the branch to origin with
-u
to set up tracking.
暂存
.claude-plugin/plugin.json
.claude-plugin/marketplace.json
文件,然后使用以下信息提交:
Bump version to vX.Y.Z
使用
-u
参数将分支推送到origin,设置跟踪关系。

6. Open a PR

6. 创建PR

Create a pull request targeting
main
with:
  • Title:
    Release vX.Y.Z
  • Body: A short summary noting the version bump from old to new. Keep it minimal — this is a version bump PR, not a changelog.
Report the PR URL back to the user.
创建以
main
为目标分支的拉取请求(PR):
  • 标题:
    Release vX.Y.Z
  • 正文: 简要说明版本从旧版本到新版本的变化。内容需简洁——这是版本更新PR,而非变更日志。
将PR的URL反馈给用户。

Important details

重要细节

  • The version follows semver:
    MAJOR.MINOR.PATCH
    .
  • Both
    plugin.json
    and
    marketplace.json
    must always have the same version.
  • Always confirm the bump type with the user before making changes.
  • If
    make check
    fails, the release is blocked — help the user fix the issues rather than skipping the checks.
  • If there are uncommitted changes when starting, warn the user and ask whether to stash them, commit them first, or abort.
  • 版本遵循semver(语义化版本)规范:
    MAJOR.MINOR.PATCH
  • plugin.json
    marketplace.json
    中的版本号必须始终保持一致。
  • 在进行任何修改前,务必确认用户选择的版本更新类型。
  • make check
    失败,发布将被阻断——帮助用户修复问题,而非跳过检查。
  • 若启动流程时存在未提交的更改,向用户发出警告并询问是暂存更改、先提交还是终止操作。