Git Commit Format.mdc

generating a conventional commit message when commiting to git

Views1
PublishedJun 17, 2026

Loading actions...

5 minBeginnerpromptSingle file

Skill content

Main instructions and any bundled files for this skill.

markdown

Commit Message Formatting Rules

When to apply: When generating commit messages or discussing commit practices

Commit Message Format

Use conventional commits format:

<type>(<scope>): <description>

[optional body]

Signed-off-by: <name> <email>
Assisted-by: <model-name> (via Cursor)

Signed-off-by

  • When you include: Signed-off-by: <name> <email>
  • Get name and email using this priority order:
    1. Environment variables: $GIT_AUTHOR_NAME and $GIT_AUTHOR_EMAIL
    2. Git config: git config user.name and git config user.email
    3. If neither configured, ask user to provide details

Commit Types

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Adding/updating tests
  • chore: Maintenance tasks
  • build: Build system or dependencies
  • ci: CI/CD changes
  • perf: Performance improvements
  • revert: Revert previous commit

Conventional Commit Specification

This project uses the conventional commit, here is the specification https://www.conventionalcommits.org/en/v1.0.0/#specification.

Conventional Commit Examples

Commit message with description and breaking change footer

feat: allow provided config object to extend other configs

BREAKING CHANGE: `extends` key in config file is now used for extending other config files

Commit message with ! to draw attention to breaking change

feat!: send an email to the customer when a product is shipped

Commit message with scope and ! to draw attention to breaking change

feat(api)!: send an email to the customer when a product is shipped

Commit message with both ! and BREAKING CHANGE footer

chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.

Commit message with no body

docs: correct spelling of CHANGELOG

Commit message with scope

feat(lang): add Polish language

Commit message with multi-paragraph body and multiple footers

fix: prevent racing of requests

Introduce a request id and a reference to latest request. Dismiss
incoming responses other than from latest request.

Remove timeouts which were used to mitigate the racing issue but are
obsolete now.

Reviewed-by: Z
Refs: #123

Gitlint Integration

  • The project uses gitlint to enforce commit message format
  • gitlint can be run by using this command make run-gitlint
  • Ensure all commit messages pass gitlint validation
  • Common gitlint rules to follow:
    • Conventional commit format
    • Title line length: 120 characters maximum
    • Body line length: 140 characters maximum per line
    • Required footers
    • No trailing whitespace
Share: