create-commit-message

A rule for writing commit messages in the Conventional Commits format, such as "fix(auth): handle expired tokens".

In plain words
What is it for?
Use it when creating or suggesting commit messages for features, fixes, tests, documentation, refactoring, and maintenance work.
Why use it?
It keeps commit history consistent and makes the type and affected part of each change clear.

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/brunogama/ios-cursor-rules/create-commit-message
Clone the repo
git clone --depth 1 https://github.com/brunogama/ios-cursor-rules

Made for: Cursor.

Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 504 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.00008 $0.00504
Opus 5 $0.00004 $0.00252
Sonnet 5 $0.00002 $0.00101
Haiku 4.5 $0.00001 $0.00050

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

Security

Grade A, and why

create-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

Copies of this mod

2 near-identical copies found in the catalogue:

.cursor/rules/create-commit-message.mdc · 72 lines

What it actually says

Writing Commit Messages With Convention Commit

You must format commit messages using the Conventional Commits standard.
Only apply this rule when generating or suggesting commit messages.


Format:

<type>(<scope>): <description>
  • Type: Defines the nature of the change.
  • Scope: Derived from the file path or affected component.
  • Description: Written in imperative mood.

Types:

  • feat: A new feature.
  • fix: A bug fix.
  • docs: Documentation changes only.
  • style: Code formatting, no logic change.
  • refactor: Code restructuring, no behavior change.
  • perf: Performance improvements.
  • test: Adding or improving tests.
  • chore: Build process, dependencies, or auxiliary tools.

Commit Logic

function generateCommitMessage(file, changeDescription) {
  let changeType = "chore"
  if (/add|create|implement/i.test(changeDescription)) changeType = "feat"
  else if (/fix|correct|resolve/i.test(changeDescription)) changeType = "fix"
  else if (/refactor|restructure/i.test(changeDescription)) changeType = "refactor"
  else if (/test/i.test(changeDescription)) changeType = "test"
  else if (/doc|comment/i.test(changeDescription)) changeType = "docs"
  else if (/style|format/i.test(changeDescription)) changeType = "style"
  else if (/perf|optimize/i.test(changeDescription)) changeType = "perf"

  const scope = file.split("/").slice(0, -1).join("-")
  return `${changeType}(${scope}): ${changeDescription}`
}

Conventional Commit Examples

Input 1:

CHANGE_DESCRIPTION="add user authentication function"
FILE="Source/Features/Auth/LoginAuth.swift"

Output 1:

feat(Source-Features-Auth): add user authentication function

Input 2:

CHANGE_DESCRIPTION="fix incorrect date parsing"
FILE="Source/Core/Utilities/DateUtils.swift"

Output 2:

fix(Source-Core-Utilities): fix incorrect date parsing
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 · 72 lines · 8 tokens per session scan A cfa08c53e87c

Subscribe to this mod's changes

create-commit-message is a cursor rule published in the GitHub repository brunogama/ios-cursor-rules (74 stars, last pushed 1y ago), licensed MIT. It adds 8 tokens to every session and 504 once invoked, about $0.0000 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-30.