Loading...
Loading...
Generates semantic commit messages following the Conventional Commits specification with proper types, scopes, breaking changes, and footers. Use when users request "write commit message", "conventional commit", "semantic commit", or "format commit".
npx skill4agent add patricio0312rev/skills conventional-commits<type>[optional scope]: <description>
[optional body]
[optional footer(s)]| Type | Description | Semver | Example |
|---|---|---|---|
| New feature | MINOR | |
| Bug fix | PATCH | |
| Documentation only | - | |
| Formatting, whitespace | - | |
| Code change, no feature/fix | - | |
| Performance improvement | PATCH | |
| Adding/fixing tests | - | |
| Build system, dependencies | - | |
| CI/CD configuration | - | |
| Maintenance tasks | - | |
| Revert previous commit | - | |
# Component/module scopes
feat(auth): add OAuth2 support
fix(api): handle timeout errors
docs(readme): add installation steps
# File-based scopes
style(eslint): update linting rules
build(docker): optimize image size
# Layer scopes
refactor(service): extract user service
test(e2e): add checkout flow tests!BREAKING CHANGE# Using ! notation
feat(api)!: change response format to JSON:API
# Using footer
feat(api): change response format
BREAKING CHANGE: Response now follows JSON:API specification.
Clients must update their parsers.feat: add dark mode togglefeat(ui): add dark mode toggle to settings pagefix(auth): resolve session expiration race condition
The session refresh was racing with the expiration check,
causing intermittent logouts.
Fixes #234feat(api)!: migrate to v2 response format
BREAKING CHANGE: All API responses now use camelCase keys
instead of snake_case. Update client parsers accordingly.
Migration guide: https://docs.example.com/v2-migrationfix(payments): correct tax calculation for EU customers
Updated tax calculation to use customer's billing country
instead of shipping country for digital goods.
Fixes #456
Reviewed-by: Alice
Co-authored-by: Bob <bob@example.com>revert: feat(auth): add OAuth2 support
This reverts commit abc123def456.
Reason: OAuth provider has rate limiting issues in production.
Will re-implement with proper caching.feat: add email verification flow
fix: prevent duplicate form submissions
refactor: extract payment processing to service
perf: cache user preferences in memory
docs: add API authentication examples# Too vague
fix: fixed it
update: updates
# Wrong tense
feat: added new feature
fix: fixes the bug
# Too long
feat: add a new feature that allows users to export their data in multiple formats including CSV, JSON, and XMLfix(cache): invalidate user cache on profile update
Previously, profile updates were not reflected until cache expiry.
This caused confusion when users updated their avatar and didn't
see the change immediately.
The fix adds cache invalidation after successful profile updates
and ensures CDN purge for static assets.| Token | Purpose | Example |
|---|---|---|
| Closes issue | |
| Closes issue | |
| References issue | |
| Breaking change | |
| Reviewer credit | |
| Co-author credit | |
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', 'fix', 'docs', 'style', 'refactor',
'perf', 'test', 'build', 'ci', 'chore', 'revert'
]
],
'scope-case': [2, 'always', 'kebab-case'],
'subject-case': [2, 'always', 'lower-case'],
'subject-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 100]
}
};# .husky/commit-msg
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit "$1"{
"devDependencies": {
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.0.0",
"husky": "^8.0.0"
},
"scripts": {
"prepare": "husky install"
}
}# .releaserc.yml
branches:
- main
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/npm"
- "@semantic-release/git"| Commit Type | Version Bump | Example |
|---|---|---|
| Minor (0.X.0) | 1.2.0 → 1.3.0 |
| Patch (0.0.X) | 1.2.0 → 1.2.1 |
| Patch (0.0.X) | 1.2.0 → 1.2.1 |
| Major (X.0.0) | 1.2.0 → 2.0.0 |
| Others | No bump | 1.2.0 → 1.2.0 |
# 1. Check staged changes
git diff --cached --name-only
# 2. Analyze change type
# - New files = likely feat
# - Modified test files = test
# - Modified docs = docs
# - Bug-related keywords = fix
# 3. Identify scope from path
# src/components/Button.tsx → components or ui
# src/services/auth.ts → auth or services
# 4. Generate message
feat(ui): add loading state to Button componentgit diff --cached!