pr-message-format

Rules for writing Pull Request messages. A Pull Request is a request for teammates to review and merge changes into a shared codebase.

In plain words
What is it for?
Use it when preparing PR titles and bodies, including their language, format, change summary, tests, and related issues.
Why use it?
It makes PR titles and descriptions consistent and ensures that summaries, changes, and testing information are recorded.

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/kinopeee/cursorrules/pr-message-format
Clone the repo
git clone --depth 1 https://github.com/kinopeee/cursorrules

Made for: Cursor.

Per session 1,082 This file is loaded in full into every session.
When invoked 1,082 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.01082 $0.01082
Opus 5 $0.00541 $0.00541
Sonnet 5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

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

Security

Grade A, and why

pr-message-format 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/pr-message-format.mdc · 83 lines

What it actually says

PRメッセージの書式ルール

このルールは、Pull Request(PR)のタイトルおよび本文に適用されるガイドラインです。

このルールの位置づけ

  • 本ルールは、Conventional Commits をベースにしたコミットメッセージ規約(commit-message-format.mdc)と整合する形で、PR メッセージのフォーマットを定義します。
  • タイトルの Prefix やサマリはコミットメッセージと同様のスタイルを推奨しつつ、PR 本文では「概要」「変更内容」「テスト内容」などを構造化して記述することを求めます。
  • 他プロジェクトで再利用する場合は、language や必須セクション(例: 「技術的な詳細」)を各プロジェクトのポリシーに合わせて調整してください。

言語指定

  • このルールファイルでは、PR メッセージに用いる言語を表す論理名として language を用いる。
  • language = "ja"
  • タイトルおよび本文は、原則として language で指定した言語で記述する。

タイトル(1行目)

フォーマット(必須)

<Prefix>: <サマリ(命令形/簡潔に)>
  • Prefix はコミットメッセージと同様、Conventional Commits における type を用いることを推奨します(例: feat, fix, refactor, docs, chore など)。
  • language で指定した言語で簡潔に書く。末尾の句点は不要。
  • 何を・なぜ(必要なら)を短く表現し、文字数はおおよそ 50 文字以内を目安にする。

本文(構造化フォーマット)

推奨テンプレート

PR 本文は、以下のような構造化されたセクションを持つことを推奨します。

## 概要

このPRで実装・修正した内容の要約を記載

## 変更内容

- 変更点1の説明
- 変更点2の説明
- 変更点3の説明

## 技術的な詳細(任意)

- 必要に応じて実装の詳細や設計上の意図を記載

## テスト内容

- 実施したテストの種類(ユニットテスト、E2Eテスト、手動確認など)
- 主要な動作確認の結果

## 関連Issue

- Closes #123
- Refs #456
  • 「概要」と「変更内容」は原則として必須とし、「技術的な詳細」「テスト内容」「関連Issue」はプロジェクトの運用ルールに応じて必須化してもよい。
  • 箇条書きには、できる限り「何を」「どこに」「なぜ」変更したかが分かる粒度で記述する。

メッセージ生成の原則

  • PR タイトルおよび本文は、必ず 実際の差分とコミット履歴(例: git diff, git log)を確認したうえで、その内容から要約・構造化して生成する。
  • issue タイトルやブランチ名だけから推測して書かず、変更内容・影響範囲・テスト内容を本文に明示する。
  • AI やスクリプトによる自動生成の場合も、差分・コミット履歴・関連 Issue 情報を入力として用いる。
  • コミットメッセージ規約(commit-message-format.mdc)と整合するように Prefix やサマリを決める(コミットと PR で意味的な不整合が出ないようにする)。

禁止事項

  • language で指定した言語と異なる言語だけでタイトルや本文を書くこと
  • 意味が伝わらない曖昧なタイトル(例: "update", "fix issue", "changes" などの抽象的な表現)
  • 構造化されていない長文だけの本文(セクション見出しや箇条書きがなく、内容の把握が困難なもの)
  • 実際の差分と異なる内容や、重要な変更点・影響・テスト結果を意図的に省略した説明
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 · 83 lines · 1,082 tokens per session scan A 4334932638e3

Subscribe to this mod's changes

pr-message-format is a cursor rule published in the GitHub repository kinopeee/cursorrules (1,116 stars, last pushed 8mo ago), licensed MIT. It adds 1,082 tokens to every session, about $0.0054 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.