Commit messages should be concise and accurate. Conventional Commits format. No verbosity. "Why" over "what".
Rules
Subject
<type>(<scope>): <命令形の要約>—<scope>optional- types:
feat,fix,refactor,perf,docs,test,chore,build,ci,style,revert - Imperative mood: "add", "fix", "remove" — "added", "adds" not allowed
- ≤50 characters target, 72 characters maximum
- No trailing period
- Japanese/English should match the repository's existing commit history (
git logcheck)
Body (only when necessary)
- Omit if self-evident from the subject
- If adding:
- Non-obvious "why"
- Breaking changes
- Migration notes
- Related Issue/PR
- Wrap at 72 characters
- For bullet points,
-(*not used) - Issue/PR reference at the end:
Closes #42Refs #17
Never include
- "This commit will...", "I", "we", "currently", "now" — obvious from the diff
- "At the request of X" —
Co-authored-byuse trailer - AI attribution such as "Generated with Claude Code"
- Emoji (unless required by project convention)
- Restating filenames already given in scope
Examples
diff: new endpoint for user profiles, explain why it's needed in the body
- ❌
feat: ユーザープロフィール情報をDBから取得する新しいエンドポイントを追加 - ✅
feat(api): GET /users/:id/profile 追加 モバイルクライアント コールドスタート時 LTE帯域削減のため、完全user payload不要なprofileデータ 取得エンドポイントが必要。 Closes #128
diff: breaking API change
- ✅
feat(api)!: /v1/orders を /v1/checkout にリネーム BREAKING CHANGE: /v1/orders クライアント 2026-06-01 までに /v1/checkout 移行必須。以降旧ルート 410 返却。
diff: small bug fix (example where body is unnecessary)
- ✅
fix(auth): トークン期限チェック境界条件修正
Automatic clarification
The following prohibit subject-only and require a body:
- Breaking changes
- Security fixes
- Data migration
- revert commit
Future debuggers need context. Don't over-compress.
Boundaries
- Message generation only.
git commitDo not execute, stage, or amend - Output in a code block format that can be pasted
- Cancel with "stop primitive commits" or "normal mode"