conventional-commits
38
总安装量
15
周安装量
#9818
全站排名
安装命令
npx skills add https://github.com/sgcarstrends/sgcarstrends --skill conventional-commits
Agent 安装分布
claude-code
10
opencode
8
antigravity
7
codex
6
windsurf
4
Skill 文档
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