25 hyhmrright

bump-version Skill

一次性把 Logic-Lens 版本号更新到全部六处元数据位置(package.json、四个插件清单和 README 徽章),然后进行校验。适用于发版时,或 `npm run validate` 报告版本不一致时使用。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

bump-version

Logic-Lens keeps the version in six places (see CLAUDE.md → Version Sync). Hand-editing them drifts; validate-repo.sh only detects drift. This skill rewrites all six atomically via scripts/bump-version.py.

Steps

  1. Pick the target version. If the user passed one in $ARGUMENTS, use it. Otherwise read package.json's current version and ask whether to bump patch / minor / major.
  2. Run the bump from the repo root:
   npm run bump-version -- <new-version>     # e.g. npm run bump-version -- 0.7.0

It rewrites the version field in package.json, .claude-plugin/plugin.json, .claude-plugin/marketplace.json, .codex-plugin/plugin.json, gemini-extension.json, and the README.md badge — preserving formatting — then runs validate-repo.sh.

  1. Confirm the run ends with "All checks passed." If any file is reported as a mismatch, stop and report which one — do not hand-edit around the script.
  2. CHANGELOG.md is not touched. For a real release, add a CHANGELOG.md entry for the new version yourself.