bump-skill-version

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

bump-skill-version

升级Skill版本

Updates the
version:
field in
skills/<name>/SKILL.md
per the rules in CLAUDE.md → Versioning:
  • 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.md
中的
version:
字段:
  • 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
--force
to override.
bash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/bump-skill-version/scripts/bump.sh" <skill-name> <patch|minor|major>
该脚本会输出旧版本号和新版本号。如果目标SKILL.md存在未提交的变更,脚本将拒绝运行(确保版本升级是独立的原子性编辑)——可传入
--force
参数强制运行。

When to use

使用场景

  • After editing any file inside
    skills/<skill-name>/
    other than trivial whitespace.
  • 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
    package-skill.sh
    PostToolUse hook will rebuild
    dist/<skill-name>.skill
    automatically once the SKILL.md is edited.
  • 原地读取并重写YAML前置元数据;保留所有其他字段不变。
  • 一旦SKILL.md被编辑,
    package-skill.sh
    后置工具钩子会自动重新构建
    dist/<skill-name>.skill
    文件。