commit-message

A format for Git commit messages, where each message records a code change using a type such as feat, fix, docs, or test, with an optional scope. Git is the version-control system used to track changes to a codebase.

In plain words
What is it for?
Use it when writing or suggesting commit messages. It covers the required structure, allowed change types, scope names, and wording for the subject.
Why use it?
It makes the project history easier to scan and supports tools that generate release notes or determine version changes. It also gives teams a shared way to describe why a change was made.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mitas/cursor-rules/commit-message
Clone the repo
git clone --depth 1 https://github.com/mitas/cursor-rules

Made for: Cursor.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00777
Opus 5 $0.00008 $0.00388
Sonnet 5 $0.00003 $0.00155
Haiku 4.5 $0.00002 $0.00078

Measured yesterday against content hash 7cb54272743c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

commit-message scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/commit-message.mdc · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Semantic Commit Messages

Context

  • Enables standardized, meaningful commit messages across projects.
  • Makes commit history more readable and navigable.
  • Facilitates automated versioning and changelog generation.
  • Based on Angular commit conventions.
  • Ensures consistency in development workflows.

Critical rules

  • Structure commit messages in format: <type>(<scope>): <subject>.
  • Type MUST be one of the following:
    • feat: New features (bumps minor version).
    • fix: Bug fixes (bumps patch version).
    • docs: Documentation changes only.
    • style: Code style changes (formatting, semicolons, etc).
    • refactor: Code changes neither fixing bugs nor adding features.
    • perf: Performance improvements.
    • test: Adding/modifying tests.
    • build: Build system or external dependency changes.
    • ci: CI configuration changes.
    • chore: Regular maintenance tasks.
    • revert: Reverts a previous commit.
  • Scope is optional and indicates section of codebase (e.g., component name, module).
    • Use cursor scope (e.g., chore(cursor)) when adding or modifying Cursor rules.
  • Subject should be imperative, present tense, not capitalized, no period at end.
  • All lines MUST be 72 characters or less.
  • Header line (type + scope + subject) should ideally be 50 characters or less, otherwise hard-limit is 72 characters.
  • For longer messages, add blank line after header followed by body text.
  • Body should explain what and why, not how (code explains how).
  • In case commit contains multiple changes subjects - add bulleted list of changes within body.
  • Footer (optional) for referencing issues: Closes #123, #456.
  • Breaking changes must include BREAKING CHANGE: in footer.
  • Header, body and footer must be always separated by a blank line.
  • Multiple-line commit messages require proper git editor setup or -m flag with quoted text.
  • Always output the complete commit message for user review before executing any git commit command.
  • For UI display/references only, emojis can be used with types (not in actual commit message):
    • feat - new feature.
    • 🐛 fix - bug fix.
    • 📝 docs - documentation.
    • 🎨 style - code style.
    • ♻️ refactor - code refactoring.
    • ⚡️ perf - performance.
    • test - testing.
    • 👷 build - build system.
    • 💚 ci - continuous integration.
    • 🧹 chore - maintenance.
    • revert - revert changes.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 91 lines · 15 tokens per session scan A 7cb54272743c

Subscribe to this mod's changes

commit-message is a cursor rule published in the GitHub repository mitas/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It adds 15 tokens to every session and 777 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.