conventional-commits
This skill should be used when creating Git commits to ensure they follow the Conventional Commits specification. It provides guidance on commit message structure, types, scopes, and best practices for writing clear, consistent, and automated-friendly commit messages. Use when committing code changes or reviewing commit history.
What this skill does
# Conventional Commits This skill provides guidance for writing Git commits that follow the Conventional Commits specification (v1.0.0). ## Purpose Conventional Commits is a specification for adding human and machine-readable meaning to commit messages. It provides an easy set of rules for creating an explicit commit history, which makes it easier to understand project changes and improve collaboration. ## When to Use This Skill Use this skill when: - Creating Git commits - Reviewing commit messages in PRs - Writing clear, structured commit messages - Collaborating on projects with multiple contributors ## Commit Message Structure ### Basic Format ``` <type>[optional scope]: <description> [optional body] [optional footer(s)] ``` ### Examples ``` feat: add user authentication feat(api): add JWT token generation fix: resolve memory leak in image processor docs: update README with setup instructions refactor(database): optimize user query performance ``` ## Commit Types ### Primary Types **feat** - A new feature for the user ``` feat: add export to PDF functionality feat(api): add webhook signature verification ``` **fix** - A bug fix for the user ``` fix: resolve login redirect loop fix(api): handle null response from GitHub webhook ``` **docs** - Documentation only changes ``` docs: update API endpoint documentation docs(readme): add troubleshooting section ``` **style** - Changes that don't affect code meaning (formatting, whitespace) ``` style: format code with StandardRB style(css): update button padding ``` **refactor** - Code change that neither fixes a bug nor adds a feature ``` refactor: extract user validation to service object refactor(models): simplify tenant scoping logic ``` **perf** - Performance improvements ``` perf: add database index for user lookups perf(queries): reduce N+1 queries in artifacts index ``` **test** - Adding or updating tests ``` test: add specs for user authentication test(integration): add webhook processing tests ``` **chore** - Changes to build process, dependencies, or maintenance ``` chore: update Rails to 7.2.0 chore(deps): bump sidekiq from 7.1.0 to 7.2.0 ``` ### Additional Types (Less Common) **build** - Changes to build system or dependencies ``` build: configure Docker for production build(webpack): update asset compilation settings ``` **ci** - Changes to CI configuration ``` ci: add security scanning to GitHub Actions ci(tests): run RSpec in parallel ``` **revert** - Reverts a previous commit ``` revert: revert "feat: add export feature" This reverts commit abc123. ``` ## Scope (Optional) Scope provides additional context about what part of the codebase changed: ``` feat(auth): add two-factor authentication fix(api): handle rate limit errors docs(contributing): update PR guidelines refactor(services): extract common validation logic ``` **Common scope examples:** - `auth` - Authentication/authorization - `api` - API endpoints - `ui` - User interface components - `database` or `db` - Database models/migrations - `services` - Service objects - `jobs` - Background jobs - `tests` - Test suite - `deps` - Dependencies - `config` - Configuration changes - `docs` - Documentation Choose scopes that match your project's architecture and domain areas. ## Description The description is a short summary of the code change: **Rules:** - Use imperative, present tense: "add" not "added" or "adds" - Don't capitalize first letter - No period (.) at the end - Keep under 72 characters (ideally under 50) **Good descriptions:** ``` add user profile page fix memory leak in file upload update email templates for notifications remove deprecated API endpoint ``` **Bad descriptions:** ``` Added user profile page # Past tense Fix Memory Leak In File Upload # Capitalized Updated email templates. # Period at end Lots of changes to the codebase # Vague ``` ## Body (Optional) The body provides additional context about the change: **When to include a body:** - Complex changes needing explanation - Non-obvious design decisions - Breaking changes - Migration instructions **Format:** - Separate from description with blank line - Use imperative mood like description - Wrap at 72 characters - Can include multiple paragraphs **Example:** ``` feat(api): add webhook signature verification Add HMAC-SHA256 signature verification for all incoming webhooks to prevent unauthorized access and replay attacks. The signature is validated using a secret key stored per installation. Requests with invalid signatures are rejected with a 401 response. ``` ## Footer (Optional) Footers provide metadata about the commit: ### Breaking Changes Use `BREAKING CHANGE:` footer for incompatible API changes: ``` feat(api): change authentication endpoint BREAKING CHANGE: The /auth endpoint now requires a client_id parameter. Update all API clients to include client_id in authentication requests. ``` Or use `!` after type/scope: ``` feat!: change authentication endpoint feat(api)!: remove deprecated /login endpoint ``` ### Issue References Reference issues and pull requests: ``` fix(auth): resolve session timeout bug Fixes #123 Closes #456 Related to #789 ``` **Common reference types:** - `Fixes #123` - Closes the issue - `Closes #123` - Closes the issue - `Resolves #123` - Closes the issue - `Related to #123` - References without closing - `See also #123` - Additional reference ### Co-authors Credit multiple contributors: ``` feat: add data export feature Co-authored-by: Jane Doe <[email protected]> Co-authored-by: John Smith <[email protected]> ``` ## Complete Examples ### Simple Feature ``` feat: add password reset functionality ``` ### Feature with Scope ``` feat(api): add rate limiting for endpoints ``` ### Bug Fix with Body ``` fix(api): handle rate limit errors from GitHub When GitHub API returns 429 status, retry the request with exponential backoff up to 3 attempts before failing. Fixes #234 ``` ### Breaking Change ``` feat(api)!: redesign webhook payload structure BREAKING CHANGE: Webhook payloads now use a nested structure. Before: { "event": "issue.created", "data": {...} } After: { "type": "issue", "action": "created", "payload": {...} } Clients must update their webhook handlers to use the new structure. ``` ### Refactoring ``` refactor(services): extract validation to concern Move common validation logic from multiple services into a shared ValidationConcern module. No behavior changes. ``` ### Multiple Footers ``` fix(auth): resolve concurrent login race condition Add database-level locking to prevent race condition when multiple login attempts occur simultaneously for the same user. Fixes #567 Related to #432 Reviewed-by: Jane Doe <[email protected]> ``` ## Best Practices ### Do: ✅ Use present tense imperative mood ("add" not "added") ✅ Keep first line under 50 characters when possible ✅ Reference issues/PRs in footer ✅ Explain "why" in body, not "what" (code shows what) ✅ Break up large changes into multiple commits ✅ Make commits atomic (one logical change per commit) ### Don't: ❌ Use vague descriptions ("fix stuff", "updates") ❌ Combine multiple unrelated changes in one commit ❌ Capitalize first letter of description ❌ End description with period ❌ Use past tense ("added", "fixed") ❌ Commit broken code (each commit should work) ## Summary Conventional Commits provide: - ✅ Clear, consistent commit history - ✅ Better collaboration through explicit intent - ✅ Easier code review and git history navigation - ✅ Improved project documentation through structured messages **Key formula:** ``` <type>(<scope>): <description> [body] [footer] ``` For detailed examples and edge cases, see `references/commit-examples.md`.
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.