Back to Library
Code ReviewBeginner
Generate Pull Request Descriptions
Feed Claude a diff and a PR template to generate structured, high-quality PR descriptions that actually help reviewers.
gitpull-requestdocumentation
The Strategy
Consistently great PR descriptions improve review velocity. Using a template forces Claude to produce structured output that matches your team's review process.
prompt.txt
<task>
Generate a pull request description from the git diff below.
</task>
<template>
## What changed
[bullet list of changes]
## Why
[business or technical motivation]
## How to test
[step-by-step testing instructions]
## Screenshots (if UI change)
[placeholder]
## Checklist
- [ ] Tests added or updated
- [ ] Documentation updated
- [ ] No secrets committed
</template>
<diff>
[Paste git diff here]
</diff>You might also need
PromptingBeginner
Specify Output Format Explicitly
Tell Claude exactly what structure you want: JSON, Markdown, TypeScript types, numbered lists—avoid post-processing by baking format into the prompt.
jsonformatstructured-output
View snippet
Code ReviewBeginner
Get Layered Code Explanations
Request explanations at multiple levels of abstraction in a single prompt—from high-level purpose down to specific implementation details.
explanationunderstandingdocumentation
View snippet