Agent skill
conventional-commits
Format commit messages following project conventions with commitlint validation. Use when committing changes, writing PR descriptions, or preparing releases.
Install this agent skill to your Project
npx add-skill https://github.com/sgcarstrends/sgcarstrends/tree/main/.claude/skills/conventional-commits
SKILL.md
Conventional Commits Skill
This project enforces conventional commits via @commitlint/config-conventional + Husky v9+.
Commit Format
<type>(<scope>): <subject>
[optional body]
[optional footer]
Types
| Type | Semver Bump | Usage |
|---|---|---|
feat |
Minor | New feature |
fix |
Patch | Bug fix |
feat! |
Major | Breaking feature |
fix! |
Major | Breaking fix |
chore |
None | Maintenance, dependencies |
docs |
None | Documentation only |
refactor |
None | Code change (no feature/fix) |
test |
None | Adding/updating tests |
ci |
None | CI/CD changes |
perf |
None | Performance improvement |
Scopes (Optional)
api, web, database, types, ui, utils, infra, deps, release
Subject Rules
- Imperative mood ("add" not "added" or "adds")
- No period at end
- 50 characters preferred, 72 max
- Lowercase first letter
Examples
# Feature
feat(web): add COE comparison chart
# Bug fix
fix(database): handle null month in query
# Breaking change
feat!: migrate HeroUI v2 to v3
BREAKING CHANGE: HeroUI v3 requires motion/react instead of framer-motion
# Dependencies
chore(deps): upgrade Next.js to v16.1
# Refactor
refactor: simplify car makes page
# Multiple changes (use body)
feat(web): add Redis sorted sets for makes filtering
Add sorted set caching for makes list to improve
query performance on the car registrations page.
Git Hooks
- pre-commit (
.husky/pre-commit): Runsgitleaks protect --stagedthenpnpm lint-staged - commit-msg (
.husky/commit-msg): Runspnpm commitlint --edit $1
If commitlint rejects, check:
- Type is valid (see table above)
- Subject length is under 72 characters
- Format matches
type(scope): subject - Scope is from the allowed list (or omitted)
Release Impact
semantic-release reads commit types to determine version bumps:
feat→ minor version bump (v4.46.0 → v4.47.0)fix→ patch version bump (v4.46.0 → v4.46.1)BREAKING CHANGEfooter or!suffix → major bump (v4.46.0 → v5.0.0)chore,docs,refactor,test→ no release
Related
- See
release-managementskill for release workflow - See
changelogskill for auto-generated changelogs - Config:
.releaserc.json(semantic-release),@commitlint/config-conventional
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
component-tester
Run Vitest tests for a specific component with coverage. Use when making changes to React components to ensure tests pass and coverage is maintained.
cache-components
Ensure 'use cache' is used strategically to minimize CPU usage and ISR writes. Use when creating/modifying queries to verify caching decisions align with data update patterns and cost optimization.
ui-design-system
Enforce modern dashboard UI patterns with pill-shaped design, professional colour scheme, and typography standards. Use when building or reviewing UI components for the web application.
typography-spacing-enforcer
Enforce Typography system and modern spacing conventions. Use when implementing new UI components to ensure design consistency with project standards.
dependency-upgrade
Upgrade dependencies safely using pnpm catalog, checking for breaking changes, and testing upgrades. Use when updating packages, applying security patches, upgrading major versions, resolving dependency conflicts, or modernizing tech stack.
component-naming
Enforce consistent React component naming conventions using domain + role patterns. Use when creating, reviewing, or refactoring components.
Didn't find tool you were looking for?