conventional-commits
Conventional Commits
Format all git commit messages according to the Conventional Commits 1.0.0 specification.
Commit Message Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Type Reference
| Type | When to Use | SemVer |
|---|---|---|
feat |
New feature | MINOR |
fix |
Bug fix | PATCH |
docs |
Documentation only | - |
style |
Formatting, whitespace (no code change) | - |
refactor |
Code restructuring (no feature/fix) | - |
perf |
Performance improvement | - |
test |
Adding/fixing tests | - |
build |
Build system, dependencies | - |
ci |
CI/CD configuration | - |
chore |
Maintenance, tooling | - |
revert |
Reverting previous commit | - |
Decision Framework
When determining commit type, ask:
- Does it add new functionality? →
feat - Does it fix broken functionality? →
fix - Does it only affect documentation? →
docs - Does it improve performance? →
perf - Does it restructure code without changing behavior? →
refactor - Does it only change code style/formatting? →
style - Does it add/modify tests? →
test - Does it change build system or dependencies? →
build - Does it change CI/CD configuration? →
ci - Is it maintenance or tooling? →
chore
Message Best Practices
Description (first line)
- Keep under 50 characters
- Use imperative mood ("add" not "added")
- Don't capitalize first letter
- No period at end
Scope
- Use clear, consistent names:
feat(auth):,fix(api):,docs(readme):
Body
- Include when change requires explanation
- Explain why the change was made
- Describe what problem it solves
- Wrap at 72 characters per line
Footers
Fixes #123- Reference issuesCo-authored-by: Name <email>- Credit contributorsBREAKING CHANGE: description- Breaking changesRefs: #456, #789- Related issues
Breaking Changes
Indicate breaking changes using either method:
feat!: remove deprecated API endpoint
feat(api)!: change authentication flow
fix: update validation logic
BREAKING CHANGE: validation now rejects empty strings
Command Execution
Critical: Use single quotes to avoid shell escaping issues with !:
# Correct - single quotes
git commit -m 'feat!: add new authentication flow'
# Incorrect - backslash escaping (DO NOT USE)
git commit -m "feat\!: add new authentication flow"
For multi-line messages, use HEREDOC:
git commit -m "$(cat <<'EOF'
feat(auth): add OAuth2 support
Implement OAuth2 authentication flow with support for
Google and GitHub providers.
BREAKING CHANGE: removes legacy session-based auth
EOF
)"
Workflow
- Check for staged changes:
git diff --cached --stat - If nothing staged: stage with
git addfirst - Review changes:
git diff --cached - Check recent style:
git log --oneline -5 - Determine type using decision framework
- Write message following best practices
- Execute commit with single quotes
- Verify:
git log -1
Quality Checks
Before committing, verify:
- Message accurately describes the changes
- Type correctly categorizes the change
- Scope (if used) is meaningful and consistent
- Breaking changes are properly marked with
!or footer - Description is clear and under 50 characters
- Body wraps at 72 characters (if present)
Examples
Simple fix:
fix: prevent null pointer in user lookup
Feature with scope:
feat(api): add rate limiting to endpoints
With body:
refactor: extract validation into separate module
Move validation logic from controllers to dedicated
validator classes for better testability and reuse.
Breaking change:
feat!: upgrade to v2 API format
BREAKING CHANGE: response structure changed from
{data: [...]} to {items: [...], meta: {...}}
With issue reference:
fix(auth): resolve token refresh race condition
Fixes #234
Full Specification
For the complete Conventional Commits 1.0.0 specification including all rules and FAQ, see references/full-spec.md.
More from dashed/claude-marketplace
playwright
Browser automation with Playwright for Python. Use when testing websites, taking screenshots, filling forms, scraping web content, or automating browser interactions. Triggers on browser, web testing, screenshots, selenium, puppeteer, or playwright.
22tmux
Remote control tmux sessions for interactive CLIs (python, gdb, git add -p, etc.) by sending keystrokes and scraping pane output. Use when debugging applications, running interactive REPLs (Python, gdb, ipdb, psql, mysql, node), automating terminal workflows, interactive git commands (git add -p, git stash -p, git rebase -i), or when user mentions tmux, debugging, or interactive shells.
11ai-friendly-cli
Build and refactor CLIs for AI agent compatibility. Use when making command-line interfaces machine-readable, adding structured JSON output, hardening inputs against hallucinations, implementing safety rails like dry-run flags, adding schema introspection, or designing multi-surface architectures (CLI + MCP).
3zellij
Terminal workspace and multiplexer for interactive CLI sessions. Use when managing terminal sessions, running interactive REPLs, debugging applications, automating terminal workflows, or when user mentions zellij, terminal multiplexer, floating panes, or session layouts. Simpler alternative to tmux with native session management.
2chrome-cdp
Interact with local Chrome browser session via Chrome DevTools Protocol. Use when asked to inspect, debug, or interact with a page open in Chrome, take screenshots of browser tabs, read accessibility trees, evaluate JavaScript, click elements, navigate pages, or automate browser interactions in a live Chrome session.
2mermaid-cli
Generate, validate, and fix diagrams from Mermaid markup using the mermaid-cli (mmdc) tool. Use when creating flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, mindmaps, or any Mermaid-supported diagram type. Also use when validating, verifying, or fixing Mermaid diagram syntax. Triggers on mentions of mermaid, mmdc, diagram generation, diagram validation, or converting .mmd files to images/SVG/PDF.
2