skills-release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkills Release
Skills版本发布
Overview
概述
main/plugin marketplace add zenml-io/kitaru-skillsmaindevelopmaindevelopmaindevelopThe ruleset blocks all pushes and PR merges to
except by repository admins. A release is therefore an admin running this
checklist — never a PR into , never a force push.
main-release-onlymainmainVersions are this repository's own plugin versions. Do not reuse Kitaru
product version numbers; state tested Kitaru compatibility in the release
notes instead.
main/plugin marketplace add zenml-io/kitaru-skillsmaindevelopmaindevelopmaindevelopmain-release-onlymainmain版本号为本仓库自身的插件版本号。请勿复用Kitaru产品的版本号;相反,应在发布说明中注明已测试的Kitaru兼容版本。
Preconditions
前置条件
Stop and resolve before releasing if any of these fail:
- On with a clean working tree.
develop - done; local
git fetch originin sync withdevelop.origin/develop - Fast-forward is possible:
exits 0. A non-zero exit means
git merge-base --is-ancestor origin/main origin/develophas commitsmainlacks — investigate how they got there; never force-push over them.develop
如果以下任意条件不满足,请停止并解决后再执行发布:
- 当前处于分支,且工作树干净。
develop - 已执行;本地
git fetch origin分支与develop保持同步。origin/develop - 可以执行快速前向合并:命令执行后返回值为0。若返回非零值,说明
git merge-base --is-ancestor origin/main origin/develop分支包含main分支没有的提交——请调查这些提交的来源;绝不要强制推送覆盖它们。develop
Steps
步骤
-
Review what ships:. Draft release notes from these commits (what changed, why it matters to installers), plus a "Tested against Kitaru X.Y" line when known.
git log --oneline origin/main..origin/develop -
Agree the next version with the user: minor for new or changed skills, patch for fixes and docs-only changes.
-
Bump all three version fields to the same value:
- →
.claude-plugin/plugin.json.version - →
.claude-plugin/marketplace.json.metadata.version - →
.claude-plugin/marketplace.json.plugins[0].version
-
Validate:and
jq . .claude-plugin/plugin.jsonparse, and all three fields match:jq . .claude-plugin/marketplace.jsonbashjq -r .version .claude-plugin/plugin.json jq -r '.metadata.version, .plugins[0].version' .claude-plugin/marketplace.json -
Commit only the two JSON files onwith subject
develop, then pushRelease vX.Y.Z.develop -
Tag the release commit:.
git tag vX.Y.Z && git push origin vX.Y.Z -
Fast-forward:
main. Nogit push origin develop:mainever — a rejection means the push is not a fast-forward; go back to Preconditions.--force -
Publish the drafted notes via a file, never inline in the command — commit subjects routinely contain backticks, which the shell would execute as command substitution inside aargument. Write the notes to a scratch file with a file-writing tool (or a quoted heredoc,
--notes "..."), then:cat > notes.md <<'EOF'bashgh release create vX.Y.Z --title "vX.Y.Z" --notes-file notes.md -
Verify:shows identical SHAs, and the GitHub Release page exists.
git ls-remote origin refs/heads/main refs/heads/develop
-
查看待发布内容:执行。根据这些提交编写发布说明草稿(包括变更内容、对安装者的重要性),若已知兼容版本,需添加“已针对Kitaru X.Y版本测试”的说明。
git log --oneline origin/main..origin/develop -
与用户商定下一个版本号:新增或修改技能时使用小版本号(minor),仅修复问题或更新文档时使用补丁版本号(patch)。
-
将三处版本字段更新为同一值:
- →
.claude-plugin/plugin.json.version - →
.claude-plugin/marketplace.json.metadata.version - →
.claude-plugin/marketplace.json.plugins[0].version
-
验证配置:执行和
jq . .claude-plugin/plugin.json确保文件可解析,且三处版本字段一致:jq . .claude-plugin/marketplace.jsonbashjq -r .version .claude-plugin/plugin.json jq -r '.metadata.version, .plugins[0].version' .claude-plugin/marketplace.json -
在分支上仅提交这两个JSON文件,提交信息为
develop,然后推送Release vX.Y.Z分支。develop -
为发布提交打标签:执行。
git tag vX.Y.Z && git push origin vX.Y.Z -
快速前向更新分支:执行
main。绝不要使用git push origin develop:main参数——若推送被拒绝,说明无法执行快速前向合并,请回到前置条件步骤排查。--force -
通过文件发布已草拟的说明,绝不要在命令中直接输入——提交信息通常包含反引号,若在参数中使用,Shell会将其作为命令替换执行。使用文件写入工具(或带引号的 heredoc,如
--notes "...")将说明写入临时文件,然后执行:cat > notes.md <<'EOF'bashgh release create vX.Y.Z --title "vX.Y.Z" --notes-file notes.md -
验证:执行查看两个分支的SHA是否一致,同时确认GitHub Release页面已创建。
git ls-remote origin refs/heads/main refs/heads/develop
Recovery
回滚方案
- Push to rejected: confirm admin (bypass) rights and re-run the ancestor check from Preconditions.
main - Wrong version committed but not yet tagged: fix the JSON files and amend the release commit before tagging.
- Tag already pushed with wrong content: if the GitHub Release is not yet published, delete and re-create the tag; otherwise cut a follow-up patch release rather than rewriting history.
- 推送至分支被拒绝:确认是否拥有管理员(绕过规则)权限,并重新执行前置条件中的祖先检查。
main - 已提交错误版本但尚未打标签:修复JSON文件并修改发布提交后再打标签。
- 已推送错误内容的标签:若GitHub Release尚未发布,删除并重新创建标签;否则应发布后续补丁版本,而非重写历史。
Maintenance
维护说明
The canonical copy of this skill is .
is a symlink to it — edit only the canonical
file.
.claude/skills/skills-release/SKILL.md.agents/skills/skills-release本技能的标准副本位于。是指向该文件的符号链接——仅可编辑标准文件。
.claude/skills/skills-release/SKILL.md.agents/skills/skills-release