一键导入
version-bump
Calculate semantic version bumps for any project type using version file adapters
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Calculate semantic version bumps for any project type using version file adapters
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run one canonical SDLC stage (intake → shape → slice → plan → implement → verify → review → handoff → ship → retro), a perf/observability augmentation (instrument, experiment, benchmark, profile), the compressed design workflow (design), runtime-truth verification (probe), read-only review-and-route triage (simplify), or the end-to-end lifecycle driver (auto), and write its artifact to `.ai/workflows/<slug>/`. The intake stage also dispatches compressed entry modes (fix, rca, investigate, discover, hotfix, refactor, update-deps, ideate). For navigating existing workflows, use $wf-meta; for documentation, use $wf-docs. ($wf-quick is retired — use $wf intake <mode>, $wf probe, and $wf simplify.)
Run one canonical SDLC stage (intake → shape → slice → plan → implement → verify → review → handoff → ship → retro), a perf/observability augmentation (instrument, experiment, benchmark, profile), the compressed design workflow (design), runtime-truth verification (probe), read-only review-and-route triage (simplify), the end-to-end lifecycle driver (auto), or the autonomous lifecycle driver (yolo), and write its artifact to `.ai/workflows/<slug>/`. The intake stage also dispatches compressed entry modes (fix, rca, investigate, discover, hotfix, refactor, update-deps, ideate). For navigating existing workflows, use `/wf-meta`; for documentation, use `/wf-docs`.
Documentation router. Orchestrator mode runs the full discover → audit → plan → generate → review pipeline against a project or workflow slug. Primitive mode writes a single Diátaxis document — tutorial, how-to, reference, explanation, or readme — or runs a docs review.
Navigate, inspect, and meta-control existing SDLC workflows — pick what to run next, check status, resume, sync the registry, amend or extend a plan, skip a stage, close a slug, or explain how something works. Does not produce stage artifacts; for those use $wf.
Navigate, inspect, and meta-control existing SDLC workflows — pick what to run next, check status, resume, sync the registry, amend or extend a plan, skip a stage, close a slug, or explain how something works. Does not produce stage artifacts; for those use `/wf`.
Generate an image from a text prompt using the best available method, with automatic fallback (built-in image_gen → gpt-image-2 → nano-banana-pro → text-only scene sentence). Returns the image file path and the method used. Internal to `/wf design`; not user-invocable.
| name | version-bump |
| description | Calculate semantic version bumps for any project type using version file adapters |
| user-invocable | false |
Reads the current version from any project type (Node.js, Python, Rust, Go, Java, generic, Claude Code plugins), analyzes git commits since the last release tag, and calculates the appropriate semantic version bump (major/minor/patch) based on conventional commit patterns. Supports multiple version files kept in sync.
Requires:
detect-project-type skillUse configuration from detect-project-type:
Use the Read tool to read the primary version file and extract the version. See Version Adapters Reference for detailed adapter implementations.
For JSON files (package.json, plugin.json):
For TOML files (Cargo.toml, pyproject.toml):
For Python version.py files:
For text files (VERSION, version.txt):
For Gradle files:
For Maven pom.xml:
For Go projects (git tags only):
git describe --tags --abbrev=0 2>/dev/nullFor multiple version files:
Use the tag pattern from project configuration to find the most recent release tag:
v{version} → search for v*{package}-v{version} → search for {package}-v*git tag -l "v*" --sort=-version:refname (adjust pattern as needed)If no tag exists:
Get the list of commits to analyze for version bump determination:
git log {last_tag}..HEAD --format="%s" --no-merges to get commit messages since the taggit log --format="%s" --no-merges to get all commit messagesIf conventional_commits is enabled in configuration (default: true), analyze each commit message:
Major Bump Indicators (breaking changes):
BREAKING CHANGE: or BREAKING-CHANGE: anywherefeat!:, fix!:, refactor!:, etc.Minor Bump Indicators (new features):
feat: or feat(scope):Patch Bump Indicators (bug fixes and other):
fix: or fix(scope):chore:, docs:, style:, refactor:, test:, perf:Analysis Process:
*!:* (type with exclamation), increment breaking_countIf conventional_commits is disabled:
Apply precedence rules to determine the semantic version bump:
If user provided explicit version type (major/minor/patch via argument):
Else if breaking_count > 0:
Else if feat_count > 0:
Else if fix_count > 0 or any other commits exist:
Else (no commits since last tag):
Special case: Initial release (no last tag):
Parse the current version and calculate the new version based on bump type:
Parse the current version (format: X.Y.Z):
Calculate new version based on bump_type:
If bump_type is "major":
If bump_type is "minor":
If bump_type is "patch":
If bump_type is "none" or "initial":
Store new_version for output
Create a human-readable list explaining the version bump decision:
Return:
{
"current_version": "1.2.3",
"new_version": "1.3.0",
"bump_type": "minor",
"reasoning": [
"2 feature(s) added → minor bump",
"1 fix(es) applied → patch bump",
"Minor bump takes precedence"
],
"last_tag": "v1.2.3",
"commits_analyzed": 5,
"version_files": [
{
"path": "package.json",
"current": "1.2.3",
"new": "1.3.0",
"adapter": "json"
}
],
"commit_examples": [
"feat: add new deployment command",
"fix: correct version detection",
"docs: update README"
]
}
Input:
nodejspackage.json (current: 1.1.0)v1.1.0Commits since v1.1.0:
feat: add new API endpoint
fix: handle edge case in parser
docs: update installation guide
Output:
{
"current_version": "1.1.0",
"new_version": "1.2.0",
"bump_type": "minor",
"reasoning": [
"1 feature(s) added → minor bump",
"1 fix(es) applied → patch bump",
"Minor bump takes precedence"
],
"last_tag": "v1.1.0",
"commits_analyzed": 3,
"version_files": [
{
"path": "package.json",
"current": "1.1.0",
"new": "1.2.0",
"adapter": "json"
}
]
}
Input:
pythonpyproject.toml (current: 2.1.0)src/mypackage/__version__.py (current: 2.1.0)v2.1.0Commits:
feat!: redesign API interface
BREAKING CHANGE: removed legacy methods
Output:
{
"current_version": "2.1.0",
"new_version": "3.0.0",
"bump_type": "major",
"reasoning": [
"1 breaking change(s) detected → major bump"
],
"last_tag": "v2.1.0",
"commits_analyzed": 1,
"version_files": [
{
"path": "pyproject.toml",
"current": "2.1.0",
"new": "3.0.0",
"adapter": "toml"
},
{
"path": "src/mypackage/__version__.py",
"current": "2.1.0",
"new": "3.0.0",
"adapter": "python-file"
}
]
}
Input:
rustCargo.toml (current: 0.3.1)v0.3.1Commits:
fix: correct memory leak in parser
test: add unit tests for edge cases
Output:
{
"current_version": "0.3.1",
"new_version": "0.3.2",
"bump_type": "patch",
"reasoning": [
"1 fix(es) applied → patch bump"
],
"last_tag": "v0.3.1",
"commits_analyzed": 2
}
Input:
goOutput:
{
"current_version": "0.0.0",
"new_version": "1.0.0",
"bump_type": "initial",
"reasoning": [
"No previous tags found → first release",
"Defaulting to v1.0.0"
],
"last_tag": null,
"commits_analyzed": 15
}
Input:
nodejs1.5.0major (explicit)Output:
{
"current_version": "1.5.0",
"new_version": "2.0.0",
"bump_type": "major",
"reasoning": [
"Explicit major bump requested by user"
],
"last_tag": "v1.5.0",
"commits_analyzed": 8
}
Input:
package.json: 1.2.0src/version.ts: 1.1.9Output:
{
"current_version": "1.2.0",
"new_version": "1.3.0",
"bump_type": "minor",
"warnings": [
"Version mismatch detected:",
" package.json: 1.2.0",
" src/version.ts: 1.1.9",
"Using primary version: 1.2.0",
"Both files will be updated to: 1.3.0"
]
}
Invalid version format:
{
"error": "Invalid version format in package.json: 'v1.2.3'",
"suggestion": "Version must be X.Y.Z format (e.g., 1.2.3)"
}
No version file found:
{
"error": "Could not read version from package.json",
"suggestion": "Ensure file exists and contains 'version' field"
}
Git errors:
{
"error": "Git log failed: not a git repository",
"suggestion": "Run 'git init' to initialize repository"
}
This skill is invoked by the /release command in Phase 2. The command will: