commit-messages

A rule for writing Git commit messages, the short records that describe changes made to a code repository.

In plain words
What is it for?
It is for formatting messages with a change type, optional scope, and short imperative subject, such as feature, bug-fix, documentation, test, or CI changes.
Why use it?
It keeps commit history consistent and makes changes easier to scan, filter, and understand.

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/lukaszzychal/mcp-doc-generator/commit-messages
Clone the repo
git clone --depth 1 https://github.com/lukaszzychal/mcp-doc-generator

Made for: Cursor.

Per session 521 This file is loaded in full into every session.
When invoked 521 The same file — it is already loaded in full.
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.00521 $0.00521
Opus 5 $0.00260 $0.00260
Sonnet 5 $0.00104 $0.00104
Haiku 4.5 $0.00052 $0.00052

Measured 2d ago against content hash 47e6bcf1ebff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

commit-messages 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 2d ago.

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-messages.mdc · 78 lines

How it starts

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

Commit Message Rules

Format: Conventional Commits

ALWAYS use this format for commit messages:

<type>(<scope>): <subject>

<body>

<footer>

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • perf: Performance improvements
  • test: Adding or updating tests
  • chore: Build process or auxiliary tools
  • ci: CI configuration changes

Scope (optional)

  • server: MCP server code
  • client: MCP client code
  • tools: Diagram generation tools
  • docs: Documentation
  • examples: Example files
  • scripts: Utility scripts

Subject Rules

  • Language: English only - No Polish characters allowed
  • Imperative present tense: "change" not "changed" nor "changes"
  • Lowercase first letter: "add" not "Add"
  • No dot at end: "add feature" not "add feature."
  • Max 72 characters

Examples

Good:

  • feat(server): add C4 context diagram generation
  • fix(tools): correct PlantUML container parsing
  • docs(readme): update installation instructions
  • chore(git): add commit message rules and validation hook

Bad:

  • Naprawiono błąd (Polish, no format)
  • Add feature (no type prefix)
  • Added C4 diagram (past tense, no type)
  • feat(server): Add comprehensive C4 context diagram generation with full support (too long, capitalized)

When Creating Commits

  1. Always generate commit message in English
  2. Always use Conventional Commits format
  3. Always keep subject under 72 characters
  4. Always use imperative present tense
  5. Never use Polish in commit messages

The git hook (.githooks/commit-msg) will validate these rules automatically.

Integration with Git Hooks

This Cursor rule works together with the git hook (.githooks/commit-msg):

  • Cursor Rules: Help AI generate correct commit messages
  • Git Hooks: Validate and block incorrect commit messages

Both are required for complete commit message enforcement.

Read the full file on GitHub · 78 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. 2d ago First seen · 78 lines · 521 tokens per session scan A 47e6bcf1ebff

Subscribe to this mod's changes

commit-messages is a cursor rule published in the GitHub repository lukaszzychal/mcp-doc-generator (2 stars, last pushed 9mo ago), licensed MIT. It adds 521 tokens to every session, about $0.0026 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.