From release-automation
Calculate semantic version bumps for any project type using version file adapters
npx claudepluginhub jayteealao/agent-skills --plugin release-automationThis skill uses the workspace's default tool permissions.
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.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
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: