Write a clear commit message
Conventional Commits–style messages from a diff or a description of changes.
The prompt
Write a commit message following the Conventional Commits specification.
Diff or description of changes:
[PASTE `git diff --staged` OR DESCRIBE]
Format: `<type>(<optional scope>): <description>`, then an optional body and footers.
- Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore.
- Description: imperative mood, lowercase, no period, under 72 characters.
- Body: what changed and why (not how), wrapped at 72 characters.
- Breaking changes: add `!` after the type/scope and a `BREAKING CHANGE:` footer.
- Footers for issue references (e.g. `Refs: #123`).
If the diff contains unrelated changes, suggest splitting it into separate commits with a message for each. Output only the commit message(s), unless a split is needed.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Software Development prompts
What to fill in
- PASTE `git diff --staged` OR DESCRIBE
How this prompt is built
This prompt follows the RTF structure (Role, Task, Format). RTF tells the model who to be, what to do and what shape the answer should take. It is the quickest structure that still gives noticeably better results than a bare request.
Related prompts
- Convert code to another language or frameworkIdiomatic translation of code between languages or frameworks, with notes on differences.
- Write unit tests for my codeComprehensive unit tests covering happy paths, edge cases, and failures.
- Reply to code review comments I disagree withDrafts calm, evidence-based replies to review feedback so you can resolve disagreements without stalling the pull request.
- Write documentation, a README, or API docsGenerates clear technical documentation from your code or notes.