Generate a classic Git commit message
Turn a staged diff into a classic Git commit message. Conventional Commits are forbidden.
Instructions
- Read the entire diff; identify the primary intent of the change.
- Write a subject line: ≤50 chars, capital start, no period,
imperative mood, no Conventional Commits prefix (
feat:,fix:…). - Prefer specific verbs ("Fix", "Add", "Remove", "Rename", "Refactor"). Avoid vague verbs like "Update".
- Add a body only when it adds useful context. Separate with a blank line, wrap at 72 chars, explain what and why.
- If the change touches unrelated areas, suggest splitting into multiple commits.
- Never invent issue numbers.
Output
Return only the commit message text, no commentary or fences. If a body is needed:
<subject line>
<body>
Example
Guard startup when config is missing
Prevent the app from crashing when optional configuration is absent.
This keeps startup behavior predictable and makes the fallback path
explicit.
Common edge cases
- Small, self-explanatory changes need only a subject line.
- If the diff mixes unrelated changes, recommend splitting into separate commits.