Commit messages do not need to be clever. They need to be findable. The test is simple: six months from now, someone reads the log looking for the change that broke a behavior, and your message either helps them or wastes their afternoon. These five prompts work on the parts that decide that outcome: the subject line, the reason behind the change, the size of the commit, and the body that saves the next reader a checkout.
Where most attempts fall flat
- Describing the file instead of the change. “Update handlers.py” says where the edit happened and nothing about what is now different.
- Explaining what instead of why. The diff already shows what changed. The message is the only place the reason can live.
- One commit for three unrelated things. A commit that fixes a bug, renames a variable, and tweaks formatting cannot be reviewed or reverted cleanly.
Prompts that fix it
1. Summarize a diff in one subject line
Here is my diff: [diff or summary of changes]. Write five subject lines under 60 characters, imperative mood, no trailing period. Each should name the behavior that changed, not the file. Then tell me which one a reviewer would understand without opening the diff.
What it does: Produces a subject line that survives being read in a list of forty.
How to use: Replace [diff or summary of changes]. Pick one and do not merge two subject lines into one long line.
2. Put the reason in the body
My change: [change description]. The context: [why this change is needed, what broke, what was decided]. Write the commit body: one paragraph on the problem, one on the approach, one on what I deliberately did not touch. Plain text, wrapped at [line width].
What it does: Records the decision so the next person does not have to reconstruct it from the diff.
How to use: Replace the change and context. If you cannot fill the “not touched” paragraph, say so explicitly; that is useful too.
3. Split a messy change into commit-sized pieces
I have one working tree with these changes: [list of changed areas]. Propose a commit sequence where each commit does one thing and the code builds after each one. For each step, give me the subject line and the files involved. Put the risky change last.
What it does: Turns a review-hostile blob into a sequence someone can review commit by commit.
How to use: Replace the changed areas. Follow the order, committing as you go rather than staging everything at the end.
4. Write the body that saves a future reader
For a commit that [change summary], write a body that answers: what was wrong before, what this does differently, any migration or deploy step, and what to check if it breaks. Include a test name or reproduction step if I give you one: [test reference].
What it does: Adds the operational detail that turns a commit message into documentation.
How to use: Replace the summary and test reference. Keep the migration note even when the answer is “none”, so the reader knows you checked.
5. Rewrite a vague message from the diff
My current message is: [current message]. Here is the actual diff: [diff]. Tell me what my message leaves out, then rewrite it as a subject line plus a three-line body covering the behavior change, the reason, and any follow-up work.
What it does: Fixes the messages already in your history pattern, so the habit changes.
How to use: Replace the message and diff. Use it on your last few commits to see which habit keeps repeating.
Weak ask vs better ask
| Weak ask | Better ask |
|---|---|
| Write a commit message for this diff. | Give me five subject lines under 60 characters in imperative mood that name the behavior change, not the file. |
| Explain my change. | Write the body: what was wrong, what this does differently, what to check if it breaks, and what I deliberately left alone. |
| How should I commit this? | I have changes across [areas]. Propose a commit sequence where each commit does one thing and the build passes after each. |
Keep going
GuPrompt keeps every prompt copy-paste ready. No account needed.