Skip to content
apply-semantic-versioning logo

Apply Semantic Versioning

apply-semantic-versioning

Apply semantic versioning (SemVer 2.0.0) to determine the correct version bump based on change analysis. Covers major/minor/patch classification, pre-release identifiers, build metadata, and breaking change detection. Use when preparing a new release to determine the correct version number, after...

pjt222/agent-almanac0installs36stars

SKILL.md

Full skill instructions

Apply Semantic Versioning

Determine and apply the correct semantic version bump by analyzing changes since the last release. This skill reads version files, classifies changes as breaking (major), feature (minor), or fix (patch), computes the new version number, and updates the appropriate files. Follows SemVer 2.0.0 specification.

When to Use

  • Preparing a new release and need to determine the correct version number
  • After merging a set of changes and before tagging a release
  • Evaluating whether a change constitutes a breaking change
  • Adding pre-release identifiers (alpha, beta, rc) to a version
  • Resolving disagreement about what version bump is appropriate

Inputs

  • Required: Project root directory containing a version file (DESCRIPTION, package.json, Cargo.toml, pyproject.toml, or VERSION)
  • Required: Git history since the last release (tag or commit)
  • Optional: Commit convention in use (Conventional Commits, free-form)
  • Optional: Pre-release label to apply (alpha, beta, rc)
  • Optional: Previous version if not readable from files

Procedure

Step 1: Read Current Version

Locate and read the version file in the project root.

# R packages
grep "^Version:" DESCRIPTION

# Node.js
grep '"version"' package.json

# Rust
grep '^version' Cargo.toml

# Python
grep 'version' pyproject.toml

# Plain file
cat VERSION

Parse the current version into major.minor.patch components. If the version contains a pre-release suffix (e.g., 1.2.0-beta.1), note it separately.

Expected: Current version identified as MAJOR.MINOR.PATCH[-PRERELEASE].

On failure: If no version file is found, check for a VERSION file or git tags (git describe --tags --abbrev=0). If no version exists at all, start at 0.1.0 for initial development or 1.0.0 if the project has a stable public API.

Step 2: Analyze Changes Since Last Release

Retrieve the list of changes since the last tagged release.

# Find the last version tag
git describe --tags --abbrev=0

# List commits since that tag
git log --oneline v1.2.3..HEAD

# If using Conventional Commits, filter by type
git log --oneline v1.2.3..HEAD | grep -E "^[a-f0-9]+ (feat|fix|BREAKING)"

If no tags exist, compare against the initial commit or a known baseline.

Expected: A list of commits with messages that can be classified by change type.

On failure: If git history is unavailable or tags are missing, ask the developer to describe the changes manually. Classify based on their description.

Step 3: Classify Changes

Apply the SemVer classification rules:

Change TypeVersion BumpExamples
Breaking (incompatible API change)MAJORRenamed/​removed public function, changed return type, removed parameter, changed default behavior
Feature (new backwards-compatible functionality)MINORNew exported function, new parameter with default, new file format support
Fix (backwards-compatible bug fix)PATCHBug fix, documentation correction, performance improvement with same API

Classification rules:

  1. If ANY change is breaking, the bump is MAJOR (resets minor and patch to 0)
  2. If no breaking changes but ANY new features, the bump is MINOR (resets patch to 0)
  3. If only fixes, the bump is PATCH

Special cases:

  • Pre-1.0.0: During initial development (0.x.y), minor bumps may contain breaking changes. Document clearly.
  • Deprecation: Deprecating a function is a MINOR change (it still works). Removing it is MAJOR.
  • Internal changes: Refactoring that does not change the public API is PATCH.

Expected: Each change classified as breaking/​feature/​fix, and the overall bump level determined.

On failure: If changes are ambiguous, err on the side of a higher bump. A conservative major bump is better than a minor bump that breaks downstream code.

Step 4: Compute New Version

Apply the bump to the current version:

CurrentBumpNew Version
1.2.3MAJOR2.0.0
1.2.3MINOR1.3.0
1.2.3PATCH1.2.4
0.9.5MINOR0.10.0
2.0.0-rc.1(release)2.0.0

If a pre-release label is requested:

  • 1.3.0-alpha.1 for first alpha of upcoming 1.3.0
  • 1.3.0-beta.1 for first beta
  • 1.3.0-rc.1 for first release candidate

Pre-release precedence: alpha < beta < rc < (release).

Expected: New version number computed following SemVer rules.

On failure: If the current version is malformed or non-SemVer, normalize it first. For example, 1.2 becomes 1.2.0.

Step 5: Update Version Files

Write the new version to the appropriate file(s).

# R: Update DESCRIPTION
# Change "Version: 1.2.3" to "Version: 1.3.0"
// Node.js: Update package.json
// Change "version": "1.2.3" to "version": "1.3.0"
// Also update package-lock.json if present
# Rust: Update Cargo.toml
# Change version = "1.2.3" to version = "1.3.0"

If the project has multiple files that reference the version (e.g., _pkgdown.yml, CITATION, codemeta.json), update all of them.

Expected: All version files updated consistently to the new version number.

On failure: If a file update fails, revert all changes to maintain consistency. Never leave version files in a partially updated state.

Step 6: Create Version Tag

After committing the version bump, create a git tag.

# Annotated tag (preferred)
git tag -a v1.3.0 -m "Release v1.3.0"

# Lightweight tag (acceptable)
git tag v1.3.0

Use the project's established tag format:

Expected: Git tag created matching the new version.

On failure: If the tag already exists, the version was not properly bumped. Check for duplicate tags with git tag -l "v1.3*" and resolve before proceeding.

Validation

  • Current version was read from the correct version file
  • All commits since the last release were analyzed
  • Each change is classified as breaking, feature, or fix
  • The bump level matches the highest-severity change (breaking > feature > fix)
  • New version follows SemVer 2.0.0 format: MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]
  • All version files in the project are updated consistently
  • No version was skipped (e.g., 1.2.3 to 1.4.0 without 1.3.0 being released)
  • Git tag matches the new version and project's tag format convention
  • Pre-release suffix, if used, follows correct precedence (alpha < beta < rc)

Common Pitfalls

  • Skipping minor versions: Going from 1.2.3 directly to 1.4.0 because "we added two features." Each release gets one bump; the number of features does not determine the version.
  • Treating deprecation as breaking: Deprecating a function (adding a warning) is a minor change. Only removing it is a breaking change.
  • Forgetting pre-1.0.0 rules: Before 1.0.0, the API is considered unstable. Some projects bump minor for breaking changes during this phase, but it should be documented.
  • Inconsistent version files: Updating package.json but not package-lock.json, or updating DESCRIPTION but not CITATION. All version references must stay in sync.
  • Build metadata confusion: Build metadata (+build.123) does not affect version precedence. 1.0.0+build.1 and 1.0.0+build.2 have the same precedence.
  • Not tagging releases: Without git tags, future version bumps cannot determine the baseline for change analysis.

Related Skills

  • manage-changelog -- Maintain changelog entries that pair with version bumps
  • plan-release-cycle -- Plan release milestones that determine when version bumps occur
  • release-package-version -- R-specific release workflow that includes version bumping
  • commit-changes -- Commit the version bump with a proper message
  • create-github-release -- Create a GitHub release from the version tag

More skills from pjt222

evolve-agent logo
pjt222/agent-almanac

evolve-agent

Evolve an existing agent definition by refining its persona in-place or creating an advanced variant. Covers assessing the current agent against best practices, gathering evolution requirements, choosing scope (refinement vs. variant), applying changes to skills, tools, capabilities, and limitati...

36 0
View
version-ml-data logo
pjt222/agent-almanac

version-ml-data

Version machine learning datasets using DVC (Data Version Control) with remote storage backends, build reproducible data pipelines with dependency tracking, integrate with Git workflows, and ensure data lineage for model reproducibility. Use when versioning large datasets that do not fit in Git, ...

36 0
View
create-2d-composition logo
pjt222/agent-almanac

create-2d-composition

Compose 2D graphics programmatically using SVG generation, diagram layout algorithms, image compositing, and batch processing workflows. Use when generating diagrams, flowcharts, or infographics programmatically, creating reproducible scientific figures, automating production of badges or visual ...

36 0
View
manage-kubernetes-secrets logo
pjt222/agent-almanac

manage-kubernetes-secrets

Implement secure secrets management in Kubernetes using SealedSecrets for GitOps, External Secrets Operator for cloud secret managers, and rotation strategies. Handle TLS certificates, API keys, and credentials with encryption at rest and RBAC controls. Use when storing sensitive configuration fo...

36 0
View
appraise-gemstone logo
pjt222/agent-almanac

appraise-gemstone

Appraise gemstone value using the four Cs (color, clarity, cut, carat), origin assessment, treatment detection, and market factor analysis. Advisory educational guidance only — not a certified appraisal. Use when understanding factors that determine a gemstone's value, pre-screening stones before...

36 0
View
center logo
pjt222/agent-almanac

center

AI dynamic reasoning balance — maintaining grounded reasoning under cognitive pressure, smooth chain-of-thought coordination, and weight-shifting cognitive load across subsystems. Use at the beginning of a complex task requiring multiple coordinated reasoning threads, after a sudden context shift...

36 0
View
build-tcg-deck logo
pjt222/agent-almanac

build-tcg-deck

Build a competitive or casual trading card game deck. Covers archetype selection, mana/energy curve analysis, win condition identification, meta-game positioning, and sideboard construction for Pokemon TCG, Magic: The Gathering, Flesh and Blood, and other TCGs. Use when building a new deck for a ...

36 0
View
setup-prometheus-monitoring logo
pjt222/agent-almanac

setup-prometheus-monitoring

Configure Prometheus for time-series metrics collection, including scrape configurations, service discovery, recording rules, and federation patterns for multi-cluster deployments. Use when setting up centralized metrics collection for microservices, implementing time-series monitoring for applic...

36 0
View
assess-holistic-health logo
pjt222/agent-almanac

assess-holistic-health

Conduct temperament-based health assessment from Hildegard von Bingen's Causae et Curae. Evaluates the four temperaments (sanguine, choleric, melancholic, phlegmatic), elemental correspondences (air, fire, earth, water), and provides dietary and lifestyle recommendations for rebalancing. Use when...

36 0
View
implement-gitops-workflow logo
pjt222/agent-almanac

implement-gitops-workflow

Implement GitOps continuous delivery using Argo CD or Flux with app-of-apps pattern, automated sync policies, drift detection, and multi-environment promotion. Manage Kubernetes deployments declaratively from Git with automated reconciliation. Use when implementing declarative infrastructure mana...

36 0
View
assess-ip-landscape logo
pjt222/agent-almanac

assess-ip-landscape

Map the intellectual property landscape for a technology domain or product area. Covers patent cluster analysis, white space identification, competitor IP portfolio assessment, freedom-to-operate preliminary screening, and strategic IP positioning recommendations. Use before starting R&D in a new...

36 0
View
configure-log-aggregation logo
pjt222/agent-almanac

configure-log-aggregation

Set up centralized log aggregation with Loki and Promtail (or ELK stack), including log parsing, label extraction, retention policies, and integration with metrics for correlation. Use when consolidating logs from multiple services into a searchable system, replacing local log files with centrali...

36 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View