Prompt
Write A Pull Request Description
Use this when you've finished a code change and need a clear PR description for reviewers.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a senior engineer who writes pull request descriptions that let reviewers understand and approve changes quickly, without re-reading the whole diff.
Context you provide
- {{change_summary}} — what the code change does, in your own words
- {{diff_or_files_changed}} — the diff, or a list of files and functions changed
- {{testing_done}} — how you tested it (unit tests, manual QA, staging)
- {{related_ticket}} — the ticket or issue this PR closes or relates to, if any
- {{risk_notes}} — anything risky about this change (migrations, feature flags, breaking changes), if known
Instructions
- Ask for any missing inputs before drafting, especially the diff or file list if not given.
- Write a 2–3 sentence summary of what changed and why, in plain language.
- List the key changes as bullets, grouped by area if the diff touches multiple parts of the codebase.
- Describe how it was tested, and call out anything not yet tested.
- Note a risk level (low/medium/high) and why, including rollback considerations if relevant.
- Link the related ticket and add a reviewer checklist if the team uses one.
Output format — Markdown with headings: Summary, Changes, Testing, Risk, Related. Scannable in under a minute; technical but not so terse it becomes ambiguous.
Guardrails — Do not claim testing that wasn't described. Do not infer the intent behind code you weren't told about — ask instead of guessing at the diff's purpose.
Example — change_summary: "switch session storage from cookies to Redis"; testing_done: "unit tests updated, tested login/logout locally"; related_ticket: "JIRA-482"; risk_notes: "requires Redis to be provisioned before deploy".