Git Commit Conventions
Commit Message Format
type: short description in imperative mood
Optional body paragraph.
- No scope — use
feat: add X, not feat(module): add X.
- Lowercase type and description.
- Imperative mood: "add X", "fix Y", "remove Z" — not "added", "adding", "fixes".
- No period at the end.
- Max ~72 characters on the subject line.
- Optional body (blank line after subject): use for context, not mechanics.
Allowed Types
| Type |
When to use |
feat |
New feature or behaviour |
fix |
Bug fix |
test |
Adding or fixing tests only |
docs |
Documentation only |
refactor |
Code change with no feature/fix |
chore |
Build, tooling, config, deps |
build |
Build system changes |
perf |
Performance improvement |
style |
Formatting, whitespace — no logic change |
revert |
Reverts a previous commit |
Examples
A complete commit with body:
feat: add retry policy to HTTP client
Wrap outbound calls in a retry with exponential backoff so
transient failures from downstream services don't fail the request.
A minimal commit:
fix: handle null input in prompt builder
Subject-only quick reference:
test: add unit tests for retry backoff logic
chore: update dependencies
docs: document skill frontmatter spec
refactor: extract connection string builder to helper
Branch Naming
{type}/{short-description}
- Use the commit type directly (
feat, fix, chore, etc.) — not expanded forms.
- Description uses hyphens to separate words, kept to 3–5 meaningful words.
Branch Name Examples
feat/add-query-meter-api
fix/api-client-retry-policy
chore/update-skill-frontmatter
docs/add-orchestrator-guide
Merge Strategy
PRs merge with a squash merge by default unless the branch has a meaningful commit history worth preserving.
Co-Authored-By Trailer
Commits in this repo end with a Co-Authored-By: Claude ... <noreply@anthropic.com> trailer and a Claude-Session: line. These are applied automatically from the agent's environment/system instructions — do not hand-type them into the message body, and do not invent or alter the email or session URL. Write your type: description subject and optional body as normal; the trailers are appended below the body, separated by a blank line, as the last lines of the message.
Quick Checklist
Anti-Pattern
Forbidden: Amending commits unless the user explicitly asks. After a pre-commit hook failure, create a NEW commit.
1---2name: git-commit3version: 1.3.04description: >5 Guide for creating git commits in this repository: conventional commit format,6 allowed types, and branch naming conventions.7 Use when staging changes and writing a commit message, creating a branch,8 or naming a branch. Trigger on: "commit", "create a commit", "git commit",9 "stage changes", "write a commit message", "make a commit", "branch name",10 "new branch", "create branch". Also use proactively whenever you are about11 to run `git commit` — even if the user did not explicitly mention this skill.12requires_agent_teams: false13requires_claude_code: false14min_plan: starter15owns:16 directories: []17 patterns: []18 shared_read: []19allowed-tools: ["Read", "Bash"]20composes_with: ["git-pr", "git-pr-feedback", "git-post-merge-cleanup"]21spawned_by: []22metadata:23 source: https://skillmd.com/skills/ivy00johns/git-commit24---2526# Git Commit Conventions2728## Commit Message Format2930```text31type: short description in imperative mood3233Optional body paragraph.34```3536- **No scope** — use `feat: add X`, not `feat(module): add X`.37- **Lowercase** type and description.38- **Imperative mood**: "add X", "fix Y", "remove Z" — not "added", "adding", "fixes".39- **No period** at the end.40- **Max ~72 characters** on the subject line.41- Optional body (blank line after subject): use for context, not mechanics.4243### Allowed Types4445| Type | When to use |46|---|---|47| `feat` | New feature or behaviour |48| `fix` | Bug fix |49| `test` | Adding or fixing tests only |50| `docs` | Documentation only |51| `refactor` | Code change with no feature/fix |52| `chore` | Build, tooling, config, deps |53| `build` | Build system changes |54| `perf` | Performance improvement |55| `style` | Formatting, whitespace — no logic change |56| `revert` | Reverts a previous commit |5758### Examples5960A complete commit with body:6162```text63feat: add retry policy to HTTP client6465Wrap outbound calls in a retry with exponential backoff so66transient failures from downstream services don't fail the request.67```6869A minimal commit:7071```text72fix: handle null input in prompt builder73```7475Subject-only quick reference:7677```text78test: add unit tests for retry backoff logic79chore: update dependencies80docs: document skill frontmatter spec81refactor: extract connection string builder to helper82```8384---8586## Branch Naming8788```text89{type}/{short-description}90```9192- Use the commit type directly (`feat`, `fix`, `chore`, etc.) — not expanded forms.93- Description uses hyphens to separate words, kept to 3–5 meaningful words.9495### Branch Name Examples9697```text98feat/add-query-meter-api99fix/api-client-retry-policy100chore/update-skill-frontmatter101docs/add-orchestrator-guide102```103104---105106## Merge Strategy107108PRs merge with a **squash merge** by default unless the branch has a meaningful commit history worth preserving.109110---111112## Co-Authored-By Trailer113114Commits in this repo end with a `Co-Authored-By: Claude ... <noreply@anthropic.com>` trailer and a `Claude-Session:` line. These are applied automatically from the agent's environment/system instructions — do **not** hand-type them into the message body, and do not invent or alter the email or session URL. Write your `type: description` subject and optional body as normal; the trailers are appended below the body, separated by a blank line, as the last lines of the message.115116---117118## Quick Checklist119120- [ ] Subject line: `type: description` (lowercase, imperative, no scope, no period)121- [ ] Type is one of the allowed types above122- [ ] Optional body explains the *why*, not the *what*123- [ ] Branch: `type/short-description`124125---126127## Anti-Pattern128129> **Forbidden:** Amending commits unless the user explicitly asks. After a pre-commit hook failure, create a NEW commit.