git-commit-message

Rules for writing Git commit messages, the short records attached to saved changes in a repository. They explain how to describe the reason for a change, choose message length, and mark changes that should not trigger deployment.

In plain words
What is it for?
Use them when creating commit summaries or longer commit descriptions for code, documentation, tests, configuration, or architectural changes.
Why use it?
They make the project's history easier to understand later and help people and automation recognize changes that do not need deployment.

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/technickai/ai-coding-config/git-commit-message
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/ai-coding-config

Made for: Cursor.

Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 875 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.00004 $0.00875
Opus 5 $0.00002 $0.00438
Sonnet 5 $0.00001 $0.00175
Haiku 4.5 $0.00000 $0.00088

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

Security

Grade A, and why

git-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.

Origin

This is a copy

98% identical to git-commit-message — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/git-commit-message.mdc · 129 lines

How it starts

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

Git Commit Message Guidelines

We write commit messages to communicate with our future selves and teammates. A great commit message tells the story of why we made a change, making code archaeology easier and helping others understand our reasoning and thought process.

Core Principles

  • Reflect on the full change before writing the message
  • Focus on motivation and reasoning, not just what changed (the diff shows that)
  • Scale message length to change importance and size - simple changes get one line, major architectural changes deserve 2-3 paragraphs
  • Use imperative mood ("Add feature" not "Added feature")
  • Summary line under 72 characters, no period at the end
  • Capitalize the first word after any emoji

No-Deploy Marker

For changes that should not trigger deployment (documentation, tests, CI config, etc.), include [no-deploy] in the commit message. This signals both humans and CI/CD automation that deployment is unnecessary.

Place the marker either:

  • At the end of the summary line if it fits: Update README with installation steps [no-deploy]
  • On its own line after the summary for longer messages

Emoji Usage

You have complete freedom to choose ANY emoji that adds value. Start with gitmoji as your reference - if there's a clear gitmoji match, use it. But feel free to get creative and use any emoji that genuinely enhances meaning or clarity.

Include an emoji when it:

  • Makes commit history more scannable at a glance
  • Provides instant visual categorization of the change type
  • Creates useful visual anchors in git log
  • Adds personality or context that words alone miss

Skip the emoji entirely when it would feel forced or add no real value. Many excellent commit messages need no emoji at all.

Trust your judgment on which emoji fits best, or whether to use one at all.

Structure

[optional emoji] Summary line under 72 characters

[Optional body when context is needed]

Body is optional. Include when explaining why adds value beyond the summary and diff. When included: explain motivation, problem being solved, impact, trade-offs, or alternatives considered. Wrap at 72 characters. For large/important changes, write 2-3 paragraphs if needed.

Read the full file on GitHub · 129 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 · 129 lines · 4 tokens per session scan A b755bd610b56

Subscribe to this mod's changes

git-commit-message is a cursor rule published in the GitHub repository TechNickAI/ai-coding-config (24 stars, last pushed 2mo ago), licensed MIT. It adds 4 tokens to every session and 875 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to git-commit-message, differing in 1 line, and is treated as a copy.