skills/versioning/SKILL.md
# Versioning Skill Semantic versioning automation based on conventional commits. Automatically manages version bumps, changelogs, and git tags using `standard-version`. ## When to Use - Before releasing a new version - When preparing a deployment - To generate/update CHANGELOG.md - When the user asks about version management - Setting up versioning for a new project ## Prerequisites - Conventional commits enforced (recommended: lefthook) - Node.js project with package.json ## Setup (One-Ti
npx skillsauth add aussiegingersnap/cursor-skills skills/versioningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Semantic versioning automation based on conventional commits. Automatically manages version bumps, changelogs, and git tags using standard-version.
npm install --save-dev standard-version
{
"scripts": {
"release": "standard-version",
"release:minor": "standard-version --release-as minor",
"release:major": "standard-version --release-as major",
"release:patch": "standard-version --release-as patch",
"release:first": "standard-version --first-release"
}
}
{
"types": [
{"type": "feat", "section": "✨ Features"},
{"type": "fix", "section": "🐛 Bug Fixes"},
{"type": "perf", "section": "⚡ Performance"},
{"type": "refactor", "section": "♻️ Refactoring"},
{"type": "docs", "section": "📚 Documentation", "hidden": true},
{"type": "style", "section": "💄 Styling", "hidden": true},
{"type": "chore", "hidden": true},
{"type": "test", "hidden": true},
{"type": "ci", "hidden": true},
{"type": "build", "hidden": true}
],
"commitUrlFormat": "https://github.com/{{owner}}/{{repository}}/commit/{{hash}}",
"compareUrlFormat": "https://github.com/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
"tagPrefix": "v"
}
Based on conventional commits since last tag:
| Commit Type | Version Bump | Example |
|-------------|--------------|---------|
| feat: | MINOR (0.x.0) | feat: add user auth → 0.1.0 → 0.2.0 |
| fix: | PATCH (0.0.x) | fix: null check → 0.1.0 → 0.1.1 |
| feat!: or BREAKING CHANGE: | MAJOR (x.0.0) | feat!: new API → 0.1.0 → 1.0.0 |
| docs:, style:, chore: | No bump | Hidden from changelog |
npm run release
This will:
chore(release): 0.2.0v0.2.0git push --follow-tags origin main
npm run release:first
Creates initial tag without bumping version.
npm run release:patch # 0.1.0 → 0.1.1
npm run release:minor # 0.1.0 → 0.2.0
npm run release:major # 0.1.0 → 1.0.0
npx standard-version --prerelease alpha # 0.1.0 → 0.2.0-alpha.0
npx standard-version --prerelease beta # 0.2.0-alpha.0 → 0.2.0-beta.0
npx standard-version --prerelease rc # 0.2.0-beta.0 → 0.2.0-rc.0
npx standard-version # 0.2.0-rc.0 → 0.2.0 (stable)
npx standard-version --dry-run
Add to lefthook.yml:
commit-msg:
commands:
conventional-commit:
run: |
msg=$(cat "{1}")
if ! echo "$msg" | grep -qE "^(feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert)(\(.+\))?: .+"; then
echo ""
echo "❌ Invalid commit message format"
echo ""
echo "Expected: <type>(<scope>): <subject>"
echo "Example: feat(api): add user endpoint"
echo ""
echo "Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert"
echo ""
exit 1
fi
pre-push:
commands:
version-tag-check:
run: |
# Check if HEAD has a version tag (release commit)
if git describe --exact-match HEAD 2>/dev/null | grep -qE "^v[0-9]"; then
if ! echo "$*" | grep -q "follow-tags"; then
echo ""
echo "⚠️ Release detected but --follow-tags not used"
echo " Run: git push --follow-tags origin main"
echo ""
fi
fi
import packageJson from '../package.json'
export function VersionDisplay() {
return <span>v{packageJson.version}</span>
}
Create /api/version/route.ts:
import { NextResponse } from 'next/server'
const BUILD_VERSION = process.env.RAILWAY_DEPLOYMENT_ID
|| process.env.VERCEL_GIT_COMMIT_SHA
|| process.env.BUILD_VERSION
|| Date.now().toString()
export async function GET() {
return NextResponse.json(
{ version: BUILD_VERSION },
{ headers: { 'Cache-Control': 'no-store' } }
)
}
Then fetch in component:
const [version, setVersion] = useState<string>()
useEffect(() => {
fetch('/api/version')
.then(r => r.json())
.then(d => setVersion(d.version?.slice(0, 8)))
}, [])
For monorepos with multiple packages:
# Release from specific directory
cd packages/web && npm run release
# Or use workspaces
npx standard-version --path packages/web
v prefix (v1.0.0) for consistencyYour commits may not follow conventional format. Check with:
git log $(git describe --tags --abbrev=0)..HEAD --oneline
Check commit types. docs: and chore: don't trigger bumps by default.
Always use git push --follow-tags origin main
Add [skip ci] or use chore: type for housekeeping commits.
tools
Theme generation with tweakcn for shadcn/ui and Magic UI animations. Use when setting up project themes, customizing color schemes, adding dark mode, or integrating animated components.
tools
shadcn/studio component library with MCP integration, theme generation, and block patterns. This skill should be used when building UI with shadcn components, selecting dashboard layouts, or generating landing pages. Canonical source for all shadcn-based work.
development
Enforce a precise, minimal design system inspired by Linear, Notion, and Stripe. Use this skill when building dashboards, admin interfaces, or any UI that needs Jony Ive-level precision - clean, modern, minimalist with taste. Every pixel matters.
development
Complete design system with principles + living style guide. Enforces precise, crafted UI inspired by Linear, Notion, and Stripe. Includes boilerplate style-guide page template for Next.js/React projects. Use when building any UI that needs Jony Ive-level precision.