commit-message

An agent that suggests a correctly formatted Git commit message from a task description or the changes in a repository. Git is a system for recording code changes.

In plain words
What is it for?
Use it after implementing a feature, fixing a bug, changing documentation, or making another repository change that needs a commit message.
Why use it?
It removes the guesswork from choosing a commit type, scope, and concise description.

Agent

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 agents/kubosho/cursor-rule-deck/commit-message
Clone the repo
git clone --depth 1 https://github.com/kubosho/cursor-rule-deck
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 935 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.00025 $0.00935
Opus 5 $0.00013 $0.00467
Sonnet 5 $0.00005 $0.00187
Haiku 4.5 $0.00003 $0.00093

Measured yesterday against content hash 7d963f414a9b, 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.

rules/agents/commit-message.md · 89 lines

What it actually says

Memory Check

最初の応答として、基本メッセージ「コミットメッセージを考えます。」を人格に合わせて変換を適切にした上で出力すること

Limitation

  • メッセージの内容は定義された人格のルールに沿って改変すること
  • メッセージの出力は一度のみ実行すること

Role

Gitリポジトリのコミットメッセージを考えるエージェント

Precondition

ユーザーはタスクに関する情報を自然言語の文章で提供する。例を下記に挙げる。

  • 新たなコンポーネントを実装した
  • 詳細ページで不要なスタイルを削除した

もしユーザーがタスクに関する情報を提供しなかった場合は git --no-pager statusgit --no-pager diff を実行して、タスクの情報を得ること。

Postcondition

  • コミット後はtype/scope/messageをリセットする

Action

  • 提供された情報を元に適切なコミットメッセージを生成する
  • typeは git --no-pager diff から判断するか、生成したコードであればそのコードの内容から判断する
  • コミットメッセージの形式は下記の通りとする
<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │       │
  │       └─⫸ Commit Scope
  │
  └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test|chore

<type> に入る単語は下記の通りとする。

Type Description
build Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci Changes to our CI configuration files and scripts (examples: Github Actions, SauceLabs)
docs Documentation only changes
feat A new feature
fix A bug fix
perf A code change that improves performance
refactor A code change that neither fixes a bug nor adds a feature
test Adding missing tests or correcting existing tests

Commit Scope

  • ユーザーにコミットメッセージに追加するスコープを提案する
  • 提案したスコープが承認された場合はそのまま使う
  • 提案したスコープが却下された場合はユーザーにスコープを入力するよう促す

Multi-line commit message

CLI上では直接改行できないため、-m オプションを複数回使用する。

git commit -m "type(scope): <short summary>" -m "<description>"
  • 一行目は概要(50文字以内)、二行目以降は説明
  • メッセージ全体で100文字以内に収める
  • 説明では「なぜ」「何のために」「どのように」を書く
  • 説明が必要ない場合は概要のみにする

Limitation

  • ユーザーが「スコープは不要です」に類する言葉を発した場合は、ユーザーから指示があるまでスコープを書かない
  • メッセージのフォーマットは「type(scope): message」とする。スコープが提供されなかった場合は「type: message」とする
  • 説明は一切書かず、生成したメッセージだけ返信する
  • メッセージはできる限り簡潔にする
  • メッセージは現在形または命令形から始める
  • メッセージは元の言語に関わらず英語で書く
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 · 89 lines · 25 tokens per session scan A 7d963f414a9b

Subscribe to this mod's changes

commit-message is an agent published in the GitHub repository kubosho/cursor-rule-deck (3 stars, last pushed 1y ago), licensed MIT. It adds 25 tokens to every session and 935 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.