Commit message and pull request description from a diff
Generate a clear commit message (Conventional Commits or free form) and a PR description with context, changes, how to test and risks, straight from your diff and ticket. Designed for ChatGPT, Claude, Gemini and Microsoft Copilot. It includes 4 customizable variables and you can copy it for free in one click.
Beginner · Text · Pending editorial review
Prompt
Act as a senior developer who writes clean Git histories and easy-to-review pull requests.
Context:
- Diff or list of changes:
```diff
{{diff}}
```
- Ticket or reason for the change: {{reason}}
- Commit convention: {{convention}}
- Who will review the PR: {{reviewers}}
Deliverables:
1. Commit message:
- Subject line in the imperative mood, ideally 50 characters and never over 72, with type and scope if the convention is Conventional Commits (feat, fix, refactor, docs, test, chore...).
- A blank line, then a body explaining why the change was made, not just what, wrapped at 72 characters.
- A footer with the ticket reference and "BREAKING CHANGE:" if it breaks compatibility.
2. If the diff mixes unrelated changes, propose how to split it into several commits and write a message for each.
3. A pull request description in Markdown with: Summary, Context and motivation, Main changes (list), How to test (reproducible steps), Screenshots or evidence, Risks and rollback plan, Checklist (tests, docs, migrations).
4. Two or three spots where reviewers should pay special attention.
Constraints:
- Only describe what appears in the diff. Do not claim tests were run or performance was measured: use [FILL IN: test results].
- No empty phrases like "various improvements" or "minor fixes".
- If the reason for the change cannot be inferred from the diff or ticket, ask me first.
Format: a text block for the commit and a Markdown block for the PR.How to use it
Run git diff --staged (or git diff main...your-branch) and paste the output. Copy the subject and body into git commit and the description into the PR form, filling in your real test results.
Usage example
Diff: new CSV export endpoint plus test · Reason: ticket SHOP-412, sales needs to export orders · Convention: Conventional Commits · Reviewers: backend team.
Sample output
Assuming the diff adds a plain-text part to the reset email and fixes the From header…
1. Commit message
fix(auth): send password reset email as multipart with plain text
Outlook was filtering the password reset email because it only had an
HTML part and the sender did not match the domain signing the message.
Add a text/plain version rendered from the same template and use the
address configured in MAIL_FROM_ADDRESS.
Refs: JIRA-218
3. Pull request description
Summary Fixes delivery of the password reset email to Outlook users (JIRA-218).
Main changes
password-resettemplate with both HTML and plain-text versions.- Sender read from configuration instead of hard-coded.
How to test
- Request a reset with a test Outlook account.
- Check it lands in the inbox and the link works.
Evidence: [FILL IN: test results]
Risks and rollback: only this email is affected; reverting the commit restores the previous behavior.
4. Where reviewers should look closely
- That the plain-text version does not expose the token outside the link…
Key facts
- Category
- Programming & development · Documentation
- Output type
- Text
- Level
- Beginner
- Designed for
- ChatGPT, Claude, Gemini and Microsoft Copilot
- Verified in
- Pending editorial verification
- Variables
- Diff, Ticket or reason, Convention and Reviewers
- Language
- English
- Price
- Free, no sign-up
- Updated
- Nov 7, 2026
Frequently asked questions
What is Conventional Commits?
A convention for commit messages using the format type(scope): description. It makes history easier to read and lets tools generate changelogs and version bumps automatically.
Why explain the why in the body?
Because the what is already in the diff. Months later, whoever reads git blame needs to know which problem the change solved and which alternatives were rejected.
What is this prompt for?
Generate a clear commit message (Conventional Commits or free form) and a PR description with context, changes, how to test and risks, straight from your diff and ticket.
Which AI tools does it work with?
It is designed for ChatGPT, Claude, Gemini and Microsoft Copilot. We have not verified it in these tools yet, so results may vary between them.
How do I customize the prompt?
Click “Customize” and fill in the variables (Diff, Ticket or reason, Convention and Reviewers). The text updates instantly and you can then copy it in one click. Values are stored only in your browser.
Do I need experience to use it?
No. It is a beginner-level prompt: just fill in the details and paste it into your AI tool.
Is this prompt free?
Yes. Every HomeCasa Prompts prompt is free, with no sign-up or subscription. You can also use them in professional projects.
Can I trust the AI output?
Treat it as a high-quality draft: always check data, figures and important claims before publishing or making decisions.