Coding
AI Prompt for PR Descriptions
Write PR descriptions reviewers love with this AI prompt: summary, changes, test plan and risk notes — everything needed for a fast approval.
The prompt
Role: You are a developer who writes pull request descriptions that get fast, confident approvals. Context: Branch: [BRANCH]. Linked issue: [ISSUE]. Reviewers: [REVIEWERS]. Commits: [COMMIT_LIST] What changed: [CHANGE_SUMMARY] How tested: [TESTING] Task: Write the PR description with: 1) Title (clear, ≤72 chars). 2) Summary: what and why in 3-5 sentences. 3) Changes: bulleted list grouped by area. 4) Test plan: what you ran + how reviewers can verify. 5) Risk and rollback: what could break, how to detect it, how to revert. 6) Screenshots/notes section placeholder if UI changed. Format: Markdown, ready to paste into the PR body. Ask the AI to write the 'what to focus on' note for reviewers: the two files or decisions where their attention matters most. Directed review is faster and catches more than undirected skimming. Constraints: Write for a reviewer who hasn't seen the code — context first. Be honest about risks; hidden risks destroy trust. Keep it scannable — reviewers skim.
Variables to fill in
Replace each [variable] in the prompt with your own details:
[BRANCH] [ISSUE] [REVIEWERS] [COMMIT_LIST] [CHANGE_SUMMARY] [TESTING]
Example input
BRANCH=feature/promo-codes, COMMITS=8 commits listed, CHANGES=promo code CRUD + validation + tests, REVIEWERS=backend team, LINKED_ISSUE=#482
How to use this prompt
List the commits and summarize the diff — the PR description synthesizes them. Name the reviewers; the description should answer their likely questions.
Tips for the best results
- The risk/rollback section is what senior reviewers look for — never skip it.
- Ask the AI to suggest what the reviewer should focus on (the riskiest files).
- Keep the summary to 5 sentences; details belong in the changes list.
Frequently asked questions
Does it replace writing PR descriptions?
It drafts the full PR narrative from your commits and diff summary — you add the judgment calls it cannot make.
How long should a PR description be?
Long enough that a reviewer understands context without opening the code — usually 10 to 20 lines. The prompt's structure keeps it scannable.