bump-skill-version
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebump-skill-version
升级Skill版本
Updates the field in per the rules in CLAUDE.md → Versioning:
version:skills/<name>/SKILL.md- patch — bug fixes, typo corrections, doc clarifications
- minor — new features, new commands, new sections
- major — breaking changes to script CLI, manifest format, or skill structure
根据CLAUDE.md → 版本控制中的规则,更新中的字段:
skills/<name>/SKILL.mdversion:- patch(补丁版本) — 修复bug、纠正拼写错误、澄清文档内容
- minor(次要版本) — 添加新功能、新命令、新章节
- major(主版本) — 对脚本CLI、清单格式或Skill结构进行破坏性变更
Usage
使用方法
bash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/bump-skill-version/scripts/bump.sh" <skill-name> <patch|minor|major>Reports the old and new version. Refuses to run if the working tree has uncommitted changes to the target SKILL.md (so the bump becomes its own atomic edit) — pass to override.
--forcebash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/bump-skill-version/scripts/bump.sh" <skill-name> <patch|minor|major>该脚本会输出旧版本号和新版本号。如果目标SKILL.md存在未提交的变更,脚本将拒绝运行(确保版本升级是独立的原子性编辑)——可传入参数强制运行。
--forceWhen to use
使用场景
- After editing any file inside other than trivial whitespace.
skills/<skill-name>/ - Before committing changes that the agent (or a human reviewer) will publish.
- 当修改目录下的任何文件(除了无关紧要的空白字符修改)之后。
skills/<skill-name>/ - 在提交将由Agent(或人工审核者)发布的变更之前。
Notes
注意事项
- Reads and rewrites the YAML frontmatter in place; preserves all other fields.
- The PostToolUse hook will rebuild
package-skill.shautomatically once the SKILL.md is edited.dist/<skill-name>.skill
- 原地读取并重写YAML前置元数据;保留所有其他字段不变。
- 一旦SKILL.md被编辑,后置工具钩子会自动重新构建
package-skill.sh文件。dist/<skill-name>.skill