360 Secure SkillHub
360 安全技能中心

version-updates

用于发布或版本提升场景:先确认目标版本并确认已收集仓库状态,递归查找 pyproject.toml、Cargo.toml、package.json 等版本文件,可用自带脚本自动更新或手工修改,再更新 CHANGELOG、README 与文档中的版本引用,最后以构建/测试和 git status、git diff 验证变更并给出后续步骤。

athola
athola
热度 62.75
最近更新 2026-08-26 21:22:52
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add nm-sanctum-version-updates
Metadata
name
version-updates
description
Bumps versions, updates changelogs, and coordinates version changes across files for releases
version
1.9.8
triggers
["version","release","changelog","semver","bump","preparing a release or bumping the project version"]
metadata
{"openclaw":{"homepage":"https://github.com/athola/claude-night-market/tree/master/plugins/sanctum","emoji":"🦞","requires":{"config":["night-market.sanctum:shared","night-market.sanctum:git-workspace-review"]}}}
source
claude-night-market
source_plugin
sanctum

Night Market Skill — ported from claude-night-market/sanctum. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Version Update Workflow

When To Use

Use this skill when preparing a release or bumping the project version. Run Skill(sanctum:git-workspace-review) first to capture current changes.

When NOT To Use

  • Just documentation updates - use doc-updates
  • Full PR preparation - use pr-prep

Required TodoWrite Items

  1. version-update:context-collected
  2. version-update:target-files
  3. version-update:version-set
  4. version-update:docs-updated
  5. version-update:verification

Step 1: Collect Context (context-collected)

  • Confirm which version to apply (default: bump patch).
  • If the prompt provides an explicit version, note it.
  • validate Skill(sanctum:git-workspace-review) has already captured the repository status.

Step 2: Identify Targets (target-files)

  • Find ALL configuration files that store versions using recursive search:
    • Root level: Cargo.toml, package.json, pyproject.toml
    • Nested directories: Use glob to find */pyproject.toml, */Cargo.toml, */package.json
    • Example: plugins/memory-palace/hooks/pyproject.toml must be included
    • Exclude virtual environments (.venv, node_modules, target/) using grep -v
  • Include changelog and README references that mention the version.
  • Use: find plugins -name "pyproject.toml" -o -name "Cargo.toml" | grep -v ".venv"

Step 3: Update Versions (version-set)

  • Automated approach: Use plugins/sanctum/scripts/update_versions.py <version> to update all version files
    • Supports pyproject.toml, Cargo.toml, package.json
    • Automatically excludes virtual environments
    • Finds nested version files (e.g., plugins/memory-palace/hooks/pyproject.toml)
    • Use --dry-run flag first to preview changes
  • Manual approach: Update each target file with the new version
    • For semantic versions, follow MAJOR.MINOR.PATCH or the specified format
    • If the project supports multiple packages, document each update

Step 4: Update Documentation (docs-updated)

  • Add or update changelog entries with today's date.
  • Refresh README and docs references to mention the new version and any release notes.

Critical Documentation Files with Version References

These files contain version numbers and MUST be checked during version bumps:

File Content
docs/api-overview.md Plugin inventory table with all plugin versions
CHANGELOG.md Version history and release notes
book/src/reference/capabilities-reference.md May reference version-specific features
Plugin READMEs May mention plugin versions

Scan for Additional Version References

# Find all docs mentioning the OLD version
grep -r "1\.2\.6" docs/ book/ --include="*.md" | grep -v node_modules

# Common patterns to search:
# - "v1.2.6", "1.2.6", "(v1.2.6)"
# - Version tables in markdown
# - "Added in X.Y.Z" annotations

Update Sequence

  1. Update config files (pyproject.toml, plugin.json, etc.) - automated
  2. Update CHANGELOG.md - add new version section
  3. Update docs/api-overview.md - update version table and plugin details
  4. Scan for other version references and update as needed

Step 5: Verification (verification)

  • Run relevant builds or tests if version bumps require them (e.g., cargo test, npm test).
  • Show git status -sb and git diff excerpts to confirm the version bumps.

Output Instructions

  • Summarize the files changed and the new version number.
  • Mention follow-up steps, such as publishing or tagging, if applicable.