Agent-skills bump-release
This skill should be used when the user asks to "bump release", "cut a release", "tag a release", "bump version", "create a new release", or mentions release versioning, changelog updates, or version tagging workflows.
git clone https://github.com/PaulRBerg/agent-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/PaulRBerg/agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/bump-release" ~/.claude/skills/paulrberg-agent-skills-bump-release && rm -rf "$T"
skills/bump-release/SKILL.mdBump Release
Support for both regular and beta releases.
Parameters
: Optional explicit version to use (e.g.,version
). When provided, skips automatic version inference2.0.0
: Create a beta release with--beta
suffix-beta.X
: Preview the release without making any changes (no file modifications, commits, or tags)--dry-run
Steps
- Locate the package - The user may be in a monorepo where the package to release lives in a subdirectory. Look for
in the current working directory first; if not found, ask which package to release. All file paths (package.json
,CHANGELOG.md
,package.json
) are relative to the package directory.justfile - Update the
file with all changes since the last version release (skip this step for beta releases).CHANGELOG.md - Bump the version in
:package.json- Regular release: Follow semantic versioning (e.g., 1.2.3)
- Beta release: Add
suffix (e.g., 1.2.3-beta.1)-beta.X
- Format files - If a
exists in the repository, runjustfile
to ensurejust full-write
andCHANGELOG.md
are properly formattedpackage.json - Commit the changes with a message like "docs: release <version>"
- Create a new git tag by running
git tag -a v<version> -m "<version>"
Note: When
--dry-run flag is provided, display what would be done without making any actual changes to files, creating commits, or tags.
Tasks
Process
-
Check for arguments - Determine if
was provided, if this is a beta release (version
), and/or dry-run (--beta
)--dry-run -
Check for clean working tree - Run
to verify there are no uncommitted changes unrelated to this release. If there are, run thegit status --porcelain
skill to commit them before proceedingcommit -
Write Changelog - Examine diffs between the current branch and the previous tag to write Changelog. Then find relevant PRs by looking at the commit history and add them to each changelog (when available). If
contains apackage.json
field, only include changes within those specified files/directories. If nofiles
field exists, include all changes except test changes, CI/CD workflows, and development toolingfiles -
Follow format - Consult
for the Common Changelog specificationreferences/common-changelog.md -
Check version - Get current version from
package.json -
Bump version - If
argument provided, use it directly. Otherwise, if unchanged since last release, increment per Semantic Versioning rules:version-
For regular releases:
- PATCH (x.x.X) - Bug fixes, documentation updates
- MINOR (x.X.x) - New features, backward-compatible changes
- MAJOR (X.x.x) - Breaking changes
-
For beta releases (
flag):--beta- If current version has no beta suffix: Add
to the version-beta.1 - If current version already has beta suffix: Increment beta number (e.g.,
→-beta.1
)-beta.2 - If moving from beta to release: Remove beta suffix and use the base version
- If current version has no beta suffix: Add
-
When unsure — If the changes are ambiguous (e.g., a new feature that may also break consumers, or a mix of fixes and features), use
to let the user decide the semver level:AskUserQuestion- header: "Version"
- question: "Changes include both
. Which release level?"<summary> - options: list the plausible semver levels with their resulting version (e.g., "1.3.0 (minor)", "2.0.0 (major)")
- multiSelect: false
Use the user's choice and skip step 7
-
-
Confirm version - When the version was confidently inferred (no explicit
argument), useversion
to confirm before proceeding:AskUserQuestion- header: "Version"
- question: "Release
→<current>
?"<inferred> - options:
- The inferred version label (e.g., "1.3.0 (minor)") — mark as "(Recommended)"
- One alternative that is one semver level higher (e.g., "2.0.0 (major)")
- One alternative that is one semver level lower when possible (e.g., "1.2.4 (patch)")
- multiSelect: false
If the user picks an alternative, use that version for the remaining steps. Skip this step when
is active (show the inferred version in the preview instead)--dry-run
Beta Release Logic
When
--beta flag is provided in the $ARGUMENTS
- Check for explicit version - If
provided:version- If version already has beta suffix → use as-is
- If version has no beta suffix → append
-beta.1
- Otherwise, parse current version from
and determine beta version:package.json- If current version is
: Create1.2.3
(increment patch + beta.1)1.2.4-beta.1 - If current version is
: Create1.2.3-beta.1
(increment beta number)1.2.3-beta.2 - If current version is
: Create1.2.3-beta.5
(increment beta number)1.2.3-beta.6
- If current version is
- Skip CHANGELOG.md update - Beta releases don't update the changelog
- Commit and tag with beta version (e.g.,
)v1.2.4-beta.1
Output
For regular releases only, generate changelog entries in
CHANGELOG.md following the format and writing guidelines in references/common-changelog.md. Use the Changed, Added, Removed, Fixed categories (in that order). Every entry must begin with a present-tense verb in imperative mood.
Inclusion Criteria
For regular releases only (changelog generation is skipped for beta releases):
- Files field constraint - If
contains apackage.json
field, only include changes to files/directories specified in that array. All other codebase changes should be excluded from the CHANGELOGfiles - Production changes only - When no
field exists, exclude test changes, CI/CD workflows, and development toolingfiles - Reference pull requests - Link to PRs when available for context
- Net changes only - Examine diffs between the current branch and the previous tag to identify changes
- Only dependencies and peerDependencies changes - Exclude changes to devDependencies
Examples
Regular Release
# Create a regular patch/minor/major release /bump-release # Preview what a regular release would do /bump-release --dry-run
Beta Release
# Create a beta release with -beta.X suffix /bump-release --beta # Preview what a beta release would do /bump-release --beta --dry-run
Explicit Version
# Specify exact version /bump-release 2.0.0 # Specify exact beta version /bump-release 2.0.0-beta.1 # Combine with flags /bump-release 2.0.0 --dry-run
Version Examples
| Current Version | Release Type | New Version |
|---|---|---|
| Regular | (patch) |
| Beta | |
| Beta | |
| Regular | |
| | |
| + Beta | |
Resources
— Common Changelog format and writing guidelinesreferences/common-changelog.md