Version Bumper — semantic version from Conventional Commits
Load this skill when you need to compute the next semantic version and a
suggested release tag from the commit history of a git repository that
follows Conventional Commits.
It is the release-pipeline counterpart of commit-message-writer (writes the
commits) and changelog-generator (renders the changelog): this skill decides
what version number the changelog and the release tag should carry.
The tool is read-only and offline: it never creates tags, never writes
files, and makes no network calls. It reads git log subjects, classifies
each commit by type, and prints the current version, the next version and a
suggested tag. For testability the commit list can be fed from the COMMITS
environment variable or a file (--commits FILE, one subject per line) — no
git repository required.
The bumper script
scripts/bumper.py — pure Python 3 stdlib (no dependencies).
| Source of commits |
Command |
| Git repository (default) |
python3 bumper.py --path /path/to/repo |
| Explicit current version |
python3 bumper.py --path . --current 1.2.3 |
| Latest semver tag |
python3 bumper.py --path . --from-tags |
| File (no git needed) |
python3 bumper.py --commits commits.txt --current 1.2.3 |
| Environment (no git needed) |
COMMITS='feat: a\nfix: b' python3 bumper.py --current 1.2.3 |
Bump rules (Conventional Commits v1.0.0)
| Signal |
Bump |
Example |
Breaking (! or BREAKING CHANGE: footer) |
MAJOR |
feat!: drop python 3.7 |
feat |
MINOR |
feat: add widget |
fix, perf, refactor |
PATCH |
fix: repair crash |
docs, style, test, chore, build, ci, revert, unknown |
no bump |
docs: readme |
Type matching is case-insensitive (Feat: counts as feat). Unknown types
are counted as other and never trigger a bump.
Output
latest_tag: v1.0.0
current_version: 1.0.0
next_version: 1.5.0
suggested_tag: v1.5.0
bump: minor
commits_analyzed: 14
counts: feat=1, fix=8, perf=2, refactor=1, docs=1, style=1, test=2, chore=1, build=0, ci=0, revert=0, breaking=1, other=0
Flags
--current X.Y.Z — baseline version; skips tag lookup
--from-tags — take the baseline from the highest semver tag (v1.2.3,
1.2.3); falls back to 0.0.0 with a warning when no tags exist
--commits FILE — read commit subjects from a file (one per line) instead
of git log; useful for tests and for repos without git
--dry-run — accepted for pipeline compatibility; the tool is read-only, so
this is the default behavior
-s / --stable — deterministic output: sorts the analyzed commits and
guarantees the same next_version for the same input
Usage example (typical)
# Before a release: what version should the next tag carry?
python3 skills/version-bumper/scripts/bumper.py --path . --from-tags
# Pin the baseline explicitly (no tag lookup)
python3 skills/version-bumper/scripts/bumper.py --path . --current 1.2.3
# Deterministic output for CI / release pipeline
python3 skills/version-bumper/scripts/bumper.py --path . --from-tags -s
# Test the classifier without a git repo
python3 skills/version-bumper/scripts/bumper.py --commits commits.txt --current 1.2.3
Interpretation guidance
bump: major — at least one breaking commit (! or BREAKING CHANGE:
footer). Review the breaking changes before tagging; MAJOR signals a
compatibility break to consumers.
bump: minor — new features present, no breaking changes.
bump: patch — only fixes/refactors/perf; no features.
bump: none — only docs/chore/style/test/build/ci/revert commits. Do
not create a release tag; the version stays unchanged.
latest_tag: none — no semver tags found; the tool started from
0.0.0. For a first release, decide whether v0.1.0 (first feature) or
v1.0.0 (first stable API) is appropriate.
- The tool only suggests a tag. Creating the tag, updating the changelog
and pushing are separate steps — run
changelog-generator with the
suggested version, then tag manually.
Do NOT use
- Do NOT use when the repository does not follow Conventional Commits — the
classification will be mostly
other and the suggestion meaningless.
- Do NOT use to create tags or modify the repository — the tool is read-only
by design.
- Do NOT use for pre-release/build-metadata schemes (
1.2.3-rc.1,
1.2.3+build.5) — the parser accepts only plain X.Y.Z / vX.Y.Z.
- Do NOT use to rewrite history or reorder commits — the tool only reads.
Canonical analogues
Full source depth — in references/canonical-patterns.md. Backbone:
Installation
# For opencode
cp -r skills/version-bumper ~/.config/opencode/skills/
# For other agents
# Copy the skill folder to your skills directory; requires Python 3.
# git is optional — --commits FILE mode works without it.
Note: the tool suggests a version; it never tags, never commits and
never pushes. Wire it into the release pipeline as the version source for
changelog-generator, then create the tag yourself.
1---2name: version-bumper3description: Suggest the next semantic version and release tag from Conventional Commits in git history. Script bumper.py reads git log subjects (fallback: COMMITS env or --commits FILE for testability), classifies commit types (feat->MINOR, fix/perf/refactor->PATCH, `!` or BREAKING CHANGE->MAJOR) and prints latest_tag, next_version, suggested_tag (e.g. v1.5.0) and counts by type. Pure Python 3 stdlib, offline, deterministic output (-s), read-only (never creates tags). Closes the loop for commit-message-writer and changelog-generator.4license: MIT5---67# Version Bumper — semantic version from Conventional Commits89Load this skill when you need to **compute the next semantic version and a10suggested release tag from the commit history** of a git repository that11follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).12It is the release-pipeline counterpart of `commit-message-writer` (writes the13commits) and `changelog-generator` (renders the changelog): this skill decides14what version number the changelog and the release tag should carry.1516The tool is **read-only and offline**: it never creates tags, never writes17files, and makes no network calls. It reads `git log` subjects, classifies18each commit by type, and prints the current version, the next version and a19suggested tag. For testability the commit list can be fed from the `COMMITS`20environment variable or a file (`--commits FILE`, one subject per line) — no21git repository required.2223---2425## The bumper script2627`scripts/bumper.py` — pure Python 3 stdlib (no dependencies).2829| Source of commits | Command |30|---|---|31| Git repository (default) | `python3 bumper.py --path /path/to/repo` |32| Explicit current version | `python3 bumper.py --path . --current 1.2.3` |33| Latest semver tag | `python3 bumper.py --path . --from-tags` |34| File (no git needed) | `python3 bumper.py --commits commits.txt --current 1.2.3` |35| Environment (no git needed) | `COMMITS='feat: a\nfix: b' python3 bumper.py --current 1.2.3` |3637### Bump rules (Conventional Commits v1.0.0)3839| Signal | Bump | Example |40|---|---|---|41| Breaking (`!` or `BREAKING CHANGE:` footer) | MAJOR | `feat!: drop python 3.7` |42| `feat` | MINOR | `feat: add widget` |43| `fix`, `perf`, `refactor` | PATCH | `fix: repair crash` |44| `docs`, `style`, `test`, `chore`, `build`, `ci`, `revert`, unknown | no bump | `docs: readme` |4546Type matching is case-insensitive (`Feat:` counts as `feat`). Unknown types47are counted as `other` and never trigger a bump.4849### Output5051```52latest_tag: v1.0.053current_version: 1.0.054next_version: 1.5.055suggested_tag: v1.5.056bump: minor57commits_analyzed: 1458counts: feat=1, fix=8, perf=2, refactor=1, docs=1, style=1, test=2, chore=1, build=0, ci=0, revert=0, breaking=1, other=059```6061### Flags6263- `--current X.Y.Z` — baseline version; skips tag lookup64- `--from-tags` — take the baseline from the highest semver tag (`v1.2.3`,65 `1.2.3`); falls back to `0.0.0` with a warning when no tags exist66- `--commits FILE` — read commit subjects from a file (one per line) instead67 of `git log`; useful for tests and for repos without git68- `--dry-run` — accepted for pipeline compatibility; the tool is read-only, so69 this is the default behavior70- `-s` / `--stable` — deterministic output: sorts the analyzed commits and71 guarantees the same `next_version` for the same input7273## Usage example (typical)7475```bash76# Before a release: what version should the next tag carry?77python3 skills/version-bumper/scripts/bumper.py --path . --from-tags7879# Pin the baseline explicitly (no tag lookup)80python3 skills/version-bumper/scripts/bumper.py --path . --current 1.2.38182# Deterministic output for CI / release pipeline83python3 skills/version-bumper/scripts/bumper.py --path . --from-tags -s8485# Test the classifier without a git repo86python3 skills/version-bumper/scripts/bumper.py --commits commits.txt --current 1.2.387```8889## Interpretation guidance9091- **`bump: major`** — at least one breaking commit (`!` or `BREAKING CHANGE:`92 footer). Review the breaking changes before tagging; MAJOR signals a93 compatibility break to consumers.94- **`bump: minor`** — new features present, no breaking changes.95- **`bump: patch`** — only fixes/refactors/perf; no features.96- **`bump: none`** — only docs/chore/style/test/build/ci/revert commits. Do97 not create a release tag; the version stays unchanged.98- **`latest_tag: none`** — no semver tags found; the tool started from99 `0.0.0`. For a first release, decide whether `v0.1.0` (first feature) or100 `v1.0.0` (first stable API) is appropriate.101- The tool only **suggests** a tag. Creating the tag, updating the changelog102 and pushing are separate steps — run `changelog-generator` with the103 suggested version, then tag manually.104105## Do NOT use106107- Do NOT use when the repository does not follow Conventional Commits — the108 classification will be mostly `other` and the suggestion meaningless.109- Do NOT use to *create* tags or modify the repository — the tool is read-only110 by design.111- Do NOT use for pre-release/build-metadata schemes (`1.2.3-rc.1`,112 `1.2.3+build.5`) — the parser accepts only plain `X.Y.Z` / `vX.Y.Z`.113- Do NOT use to rewrite history or reorder commits — the tool only reads.114115## Canonical analogues116117Full source depth — in `references/canonical-patterns.md`. Backbone:118119<table>120<tr><th>Analog</th><th>What we borrow</th></tr>121<tr><td>Conventional Commits spec</td><td>Type taxonomy, `!` marker, `BREAKING CHANGE:` footer, bump semantics</td></tr>122<tr><td>python-semantic-release</td><td>Version-from-tags, bump-level resolution, deterministic output</td></tr>123<tr><td>semantic-release</td><td>Commit-driven release decision, no-release-when-no-release-commits</td></tr>124<tr><td>bump-my-version</td><td>Strict semver parsing, tag prefix handling</td></tr>125<tr><td>commitizen</td><td>Commit classification, changelog+version coupling</td></tr>126<tr><td>git-cliff</td><td>Conventional-Commits parsing, tag-range analysis</td></tr>127</table>128129## Installation130131```bash132# For opencode133cp -r skills/version-bumper ~/.config/opencode/skills/134135# For other agents136# Copy the skill folder to your skills directory; requires Python 3.137# git is optional — --commits FILE mode works without it.138```139140---141142> **Note**: the tool suggests a version; it never tags, never commits and143> never pushes. Wire it into the release pipeline as the version source for144> `changelog-generator`, then create the tag yourself.