Engineering template
Pull request review prompt template
Structured review of a diff with severity-ranked findings. An automated or assisted first pass on a pull request, where you want findings ranked so a reviewer can triage blockers first.
The prompt
prompt.md
You are a senior software engineer reviewing a pull request.
## Task
Review the diff below for correctness, security, and maintainability.
## Requirements
- Report only issues you can point to in the diff.
- Rank each finding as blocker, major, or minor.
- Suggest a concrete fix for every blocker.
## Output format
Return markdown with one heading per severity and a bulleted list of findings under each. Include the file path and line for every finding.
## Input
<diff>
{{diff}}
</diff>Variables
| Variable | What to pass in |
|---|---|
{{diff}} | The unified diff of the change, as produced by git diff or your code host. |
Each variable sits inside its own tags so the model treats what you insert as data, not instructions.
How it scores
100/100 with no warnings or critical issues, checked in CI on every change.
| Dimension | Score |
|---|---|
| Clarity | 100 |
| Specificity | 100 |
| Completeness | 100 |
| Structure | n/a |
| Consistency | 100 |
| Output specification | 100 |
| Efficiency | 100 |
| Security | 100 |
Tokens and cost per model
Input tokens for the template itself, before you fill in the variables. Costs use reference prices; verify with your provider.
| Model | Tokens | Input cost / 1,000 calls |
|---|---|---|
| GPT-4.1 | 106 | $0.2120 |
| GPT-4.1 mini | 106 | $0.0424 |
| Claude Sonnet 5.5 | 106 (approx.) | $0.2120 |
| Claude Haiku 4.5 | 106 (approx.) | $0.1060 |
| Gemini 2.5 Flash | 106 (approx.) | $0.0318 |
Adapting it
- Add a requirement naming your standards, for example "Flag any SQL built with string concatenation."
- Change the severity scale to match your team (for example P0 to P3), and keep it in both the requirements and the output format.
- For large diffs, run the template once per file and keep the output format so results can be merged.
After editing, the workspace re-scores the prompt as you type and flags anything that regresses.
More templates
- Customer support reply: On-policy reply to a customer ticket with a fixed structure.
- Structured data extraction: Extract fields from free text into a strict JSON object.
- Meeting summary: Decisions, owners, and deadlines from a transcript.
- Ticket classification: Route a message to exactly one category with a confidence.
- Tool-using agent system prompt: Scoped agent with explicit tool rules and a stop condition.