name: commit-convention description: Applies the project's commit message convention. Use when writing commit messages, making git commits, or summarizing changes.
Commit Message Convention
Project-Specific Convention
If .commitconventionrc exists in the project root, read it and apply its types, scopes, and rules as the commit convention for this project. The file is JSON and takes precedence over the defaults below.
Default Convention
Used when no .commitconventionrc is found.
Format
<type>(<scope>): <subject>
<body>
Type Categories
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation changes |
style | Code formatting (no functional changes) |
refactor | Refactoring (no functional changes) |
test | Add/modify tests |
chore | Build, config, and other tasks |
Rules
- subject: under 72 characters, imperative mood, lowercase start, no period
- body: optional, wrap at 100 characters, explain "why" the change was made
- scope: optional, indicates the area of change
Workflow
When generating a commit message:
- Check for
.commitconventionrcin the project root — if found, use its config - Analyze changes with
git diff --staged(orgit diffif nothing staged) - Determine appropriate type and scope from the convention
- Generate a commit message following the convention rules