
Semantic Versioning
- 484 installs
- 305 repo stars
- Updated March 4, 2026
- aj-geddes/useful-ai-prompts
semantic-versioning is a release automation skill that manages SemVer bumps, changelogs, and publishes using conventional commits for developers who need automated package and API releases.
About
semantic-versioning is a Release Management skill from aj-geddes/useful-ai-prompts that implements semantic versioning with automated release management through conventional commits, semantic-release, and version bumping strategies. The overview ties version numbers to release significance and automated release notes generation, and the when-to-use list covers package and library releases, API versioning, and version bump automation. A developer reaches for semantic-versioning when configuring commit message conventions, CI release pipelines, changelog generation, and npm or library publish flows. The skill provides quick start, reference guides, and best practices for maintaining consistent SemVer across teams.
- Implements full Semantic Versioning (SemVer) rules for major, minor, and patch releases
- Automates version bumping with conventional commits
- Generates release notes and changelogs automatically
- Integrates with GitHub, npm, and other publishing platforms
- Tracks breaking changes and dependency updates
Semantic Versioning by the numbers
- 484 all-time installs (skills.sh)
- Ranked #47 of 248 Release Management skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill semantic-versioningAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 484 |
|---|---|
| repo stars | ★ 305 |
| Last updated | March 4, 2026 |
| Repository | aj-geddes/useful-ai-prompts ↗ |
How do you automate SemVer releases with conventional commits?
Automatically manage version numbers, generate changelogs, and publish releases using conventional commits and semantic-release.
Who is it for?
Maintainers of npm packages, libraries, or versioned APIs who want automated bump, changelog, and publish flows from conventional commits.
Skip if: Repositories without conventional commit discipline or teams that only need manual one-off tags should skip semantic-versioning automation.
When should I use this skill?
A user asks to set up semantic-release, conventional commits, automated changelog generation, or SemVer bump strategies for a library or API.
What you get
SemVer version tags, generated CHANGELOG, semantic-release CI config, and published package or API release artifacts.
- CHANGELOG
- version tags
- release CI configuration
Files
Semantic Versioning
Table of Contents
Overview
Establish semantic versioning practices to maintain consistent version numbering aligned with release significance, enabling automated version management and release notes generation.
When to Use
- Package and library releases
- API versioning
- Version bumping automation
- Release note generation
- Breaking change tracking
- Dependency management
- Changelog management
Quick Start
Minimal working example:
# package.json
{
"name": "my-awesome-package",
"version": "1.2.3",
"description": "An awesome package",
"main": "dist/index.js",
"repository": { "type": "git", "url": "https://github.com/org/repo.git" },
"scripts": { "release": "semantic-release" },
"devDependencies":
{
"semantic-release": "^21.0.0",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/git": "^10.0.0",
"@semantic-release/github": "^9.0.0",
"conventional-changelog-cli": "^3.0.0",
},
}Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Semantic Versioning Configuration | Semantic Versioning Configuration |
| Conventional Commits Format | Conventional Commits Format |
| Semantic Release Configuration | Semantic Release Configuration |
| Version Bumping Script | Version Bumping Script |
| Changelog Generation | Changelog Generation |
Best Practices
✅ DO
- Follow strict MAJOR.MINOR.PATCH format
- Use conventional commits
- Automate version bumping
- Generate changelogs automatically
- Tag releases in git
- Document breaking changes
- Use prerelease versions for testing
❌ DON'T
- Manually bump versions inconsistently
- Skip breaking change documentation
- Use arbitrary version numbering
- Mix features in patch releases
Changelog Generation
Changelog Generation
#!/bin/bash
# generate-changelog.sh
# Using conventional-changelog CLI
conventional-changelog -p angular -i CHANGELOG.md -s
# Or manually format changelog
CHANGELOG="# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Conventional Commits Format
Conventional Commits Format
# Feature commit (MINOR bump)
git commit -m "feat: add new search feature"
git commit -m "feat(api): add pagination support"
# Bug fix commit (PATCH bump)
git commit -m "fix: resolve null pointer exception"
git commit -m "fix(auth): fix login timeout issue"
# Breaking change (MAJOR bump)
git commit -m "feat!: redesign API endpoints"
git commit -m "feat(api)!: remove deprecated methods"
# Documentation
git commit -m "docs: update README"
# Performance improvement
git commit -m "perf: optimize database queries"
# Refactoring
git commit -m "refactor: simplify authentication logic"
# Tests
git commit -m "test: add integration tests"
# Chore
git commit -m "chore: update dependencies"
# Complete example with body and footer
git commit -m "feat(payment): add Stripe integration
Add support for processing credit card payments via Stripe.
Includes webhook handling for payment confirmations.
BREAKING CHANGE: Payment API endpoint changed from /pay to /api/v2/payments
Closes #123"Semantic Release Configuration
Semantic Release Configuration
// release.config.js
module.exports = {
branches: ["main", { name: "develop", prerelease: "beta" }],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/git",
"@semantic-release/github",
"@semantic-release/npm",
],
};Semantic Versioning Configuration
Semantic Versioning Configuration
# package.json
{
"name": "my-awesome-package",
"version": "1.2.3",
"description": "An awesome package",
"main": "dist/index.js",
"repository": { "type": "git", "url": "https://github.com/org/repo.git" },
"scripts": { "release": "semantic-release" },
"devDependencies":
{
"semantic-release": "^21.0.0",
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/git": "^10.0.0",
"@semantic-release/github": "^9.0.0",
"conventional-changelog-cli": "^3.0.0",
},
}Version Bumping Script
Version Bumping Script
#!/bin/bash
# bump-version.sh
CURRENT_VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\([^"]*\)".*/\1/')
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
case "${1:-patch}" in
major)
NEW_VERSION="$((MAJOR + 1)).0.0"
;;
minor)
NEW_VERSION="$MAJOR.$((MINOR + 1)).0"
;;
patch)
NEW_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
;;
*)
echo "Usage: $0 {major|minor|patch}"
exit 1
;;
esac
echo "Bumping version from $CURRENT_VERSION to $NEW_VERSION"
# Update package.json
npm version $NEW_VERSION --no-git-tag-v
# Update CHANGELOG
CHANGELOG_HEADER="## [$NEW_VERSION] - $(date +%Y-%m-%d)"
sed -i "1i\\$CHANGELOG_HEADER" CHANGELOG.md
# Commit and tag
git add package.json CHANGELOG.md package-lock.json
git commit -m "chore(release): version $NEW_VERSION"
git tag -a "v$NEW_VERSION" -m "Release $NEW_VERSION"
echo "✅ Version bumped to $NEW_VERSION"#!/bin/bash
# validate-api.sh - Validate API specification
# Usage: ./validate-api.sh <openapi_spec>
set -euo pipefail
SPEC_FILE="${{1:?Usage: $0 <openapi_spec>}}"
echo "Validating API spec: $SPEC_FILE"
# TODO: Add API validation
# - Validate OpenAPI/Swagger syntax
# - Check endpoint naming conventions
# - Verify response schemas
# - Check for required headers
# - Validate authentication definitions
echo "API validation complete."
# API Endpoint Scaffold
# TODO: Customize for your API framework
openapi: "3.0.3"
info:
title: "API Service"
version: "1.0.0"
paths:
/api/v1/resource:
get:
summary: "List resources"
# TODO: Define parameters and responses
responses:
"200":
description: "Success"
post:
summary: "Create resource"
# TODO: Define request body and responses
responses:
"201":
description: "Created"
Related skills
FAQ
What tools does semantic-versioning emphasize?
semantic-versioning centers on conventional commits, semantic-release, and version bumping strategies to align version numbers with release significance and automate notes.
When should semantic-versioning be used?
semantic-versioning fits package and library releases, API versioning, and automated version bump workflows when teams adopt conventional commit messages.
What artifacts does semantic versioning automation produce?
semantic-versioning guides generation of consistent version tags, changelogs, and release notes aligned to SemVer rules through automated release management pipelines.