Join WhatsApp
Sample output Ā· AI-generated

Recommended
```
fix(auth): keep new session after password reset

Resetting a password revoked every session for the user,
including the one created by the reset itself, so users were
logged out straight after choosing a new password.

Revoke only sessions created before the reset and keep the
current one. Add a test for the reset flow.

Closes #482
```

Alternative subject lines
- fix(auth): stop logout loop after password reset
- fix(sessions): revoke only old sessions on reset

Split suggestion
The diff also renames a variable in billing/invoice.py. That change is unrelated to the reset bug. Commit it separately:
```
refactor(billing): rename amt to amount_due
```

Text prompt Ā· ChatGPT Ā· Claude Ā· Gemini

Git commit message prompt using Conventional Commits

Paste a git diff and get a clean commit message: a short subject in the Conventional Commits style and a body that explains the why.

You are a careful software engineer. Write a Git commit message for the diff below.

Diff:
```
[paste output of git diff --staged]
```
Why I made this change: [reason, bug or ticket]
Issue or ticket number: [e.g. #482, or none]
Commit style: [Conventional Commits, or your team's style]

Rules:
- Subject line: type(scope): summary, in the imperative mood ("add", not "added"), aim for 50 characters and never over 72, no full stop.
- Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore.
- Blank line, then a body wrapped at 72 characters that explains what changed and why, not how.
- Add BREAKING CHANGE: in the footer if the change breaks anything for users.
- Add the issue reference in the footer.

Give me one recommended message, then 2 alternative subject lines. If the diff mixes unrelated changes, suggest how to split it into separate commits.
Type
Text
Fill in
4 blanks
Copies
Be the first

Updated Ā· By

Tip: Stage only related changes with git add -p before asking for a message; one clear purpose per commit makes the message easy to write.

1. CopyTap "Copy prompt" above.
2. Fill the blanksReplace each [bracket] with your own details.
3. Paste + refinePaste it into the chat, then ask for changes.

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

  1. Tap "Copy prompt".
  2. Replace every part in [square brackets] with your own details.
  3. Paste it into ChatGPT or Claude and send.
  4. 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

ChatGPT Claude Gemini
Write a pull request title and description from these commits and diff: [paste]. Title under 70 characters. Description sections: Summary, Changes, How to test, Screenshots (placeholder), Risks. Under 200 words.
Type
Text
Fill in
1 blank
Copies
Be the first

Clean up messy commit history

ChatGPT Claude Gemini
Here are my last commits on a feature branch: [paste git log –oneline]. Suggest how to squash or reword them into 2 to 4 clear Conventional Commits before merging, and write the new messages.
Type
Text
Fill in
1 blank
Copies
Be the first

Release notes from tags

ChatGPT Claude Gemini
Write release notes for version [version] from these Conventional Commits: [paste git log between tags]. Group by feat, fix and perf, rewrite each line for end users, and list breaking changes first.
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.

More Coding prompts

See all
ChatGPT Claude Text prompt

Debug code prompt that finds the root cause before fixing

Paste your code and the error message to get the real cause explained first, then a small fix and a test for it.

4 prompts
ChatGPT Claude Text prompt

Explain code prompt for beginners, line by line

Paste any snippet and get a plain-English summary, a line-by-line walkthrough and the concepts you need to understand it.

4 prompts
ChatGPT Claude Text prompt

Unit test prompt for edge cases in pytest or Jest

Get a list of test cases for a function, then ready-to-run tests for normal input, edge cases and errors in your framework.

3 prompts
ChatGPT Claude Text prompt

Refactor code prompt for cleaner, more readable functions

Clean up a messy function while keeping its behaviour the same, with a short list of every change and the reason for it.

4 prompts
ChatGPT Claude Text prompt

SQL query prompt: describe your tables, get the query

Describe your tables and the question you want answered, and get a correct query for your database with a short explanation.

4 prompts
ChatGPT Claude Text prompt

Regex prompt that writes and explains a pattern with tests

Describe what you want to match and get a working pattern for your language, explained piece by piece, with examples that should and should not match.

4 prompts
ChatGPT Claude Text prompt

Code review prompt for bugs, security and readability

A structured review of a pull request or snippet, with issues sorted by severity, each tied to a line and a suggested fix.

3 prompts
ChatGPT Claude Text prompt

API design prompt for clean REST endpoints and errors

Plan a REST API for a feature: endpoints, example requests and responses, status codes, error format and the decisions behind them.

4 prompts