Why this prompt works
This git commit message prompt follows the Conventional Commits format, which many teams use to generate changelogs and version numbers automatically. The imperative subject and the 50 to 72 character limits are long-standing Git conventions that keep history readable in terminals and code hosting tools.
Giving the AI the reason behind the change matters most: a diff shows what changed, but only you know why. The body focuses on that why, and the split suggestion encourages small, focused commits that are easier to review and revert.
How to use this prompt
- Tap "Copy prompt".
- Replace every part in [square brackets] with your own details.
- Paste it into ChatGPT or Claude and send.
- Ask a follow-up like "make it shorter" or "give me 3 more options" to fine-tune it.
Variations to try
Pull request title and description
- Type
- Text
- Fill in
- 1 blank
- Copies
- Be the first
Clean up messy commit history
- Type
- Text
- Fill in
- 1 blank
- Copies
- Be the first
Release notes from tags
- Type
- Text
- Fill in
- 2 blanks
- Copies
- Be the first
Make it your own
- Replace the type list with your team's own prefixes if you do not use Conventional Commits.
- Add "Write the subject in lowercase" or "capitalise the first word" to match your history.
- Ask for a co-author line format if you pair program and your team records it.
Common problems and fixes
- The subject describes how, not what. Ask for a subject that says what changed for the user or the codebase, and keep the how for the diff.
- The body repeats the diff line by line. Add the reason for the change and ask the body to explain why, in 2 to 4 lines.
FAQ
What is the Conventional Commits format?
It is a simple convention: a type such as feat or fix, an optional scope in brackets, a colon and a short summary, with an optional body and footer.
Is the diff safe to paste into an AI tool?
Check for secrets, keys and customer data in the diff first, and follow your company's policy on sharing code.