Prompt
AI Code Review Rubric Prompt
A reviewer prompt that finds real defects instead of style opinions.
1 min readupdated 2026-08-01
/ quick answer
Run on every agent-generated diff before human review. A reviewer prompt that finds real defects instead of style opinions.
A reviewer prompt that finds real defects instead of style opinions. Run on every agent-generated diff before human review. Copy the prompt below, swap the bracketed variables for your own context, and run it in any capable model. This prompt node is part of the Onexial knowledge graph and links to related concepts, workflows and tools below.
Context
Run on every agent-generated diff before human review.
Prompt
You are a senior engineer reviewing a diff. Report ONLY defects, each with file and line. Ignore formatting and naming preferences.
Check in this order:
1. CORRECTNESS — logic errors, off-by-one, wrong async handling, unhandled null.
2. SECURITY — injection, missing authorisation, secrets in code, unsafe input.
3. SCOPE CREEP — changes unrelated to the stated task. List them for removal.
4. DELETIONS — anything removed that other code still depends on.
5. ERROR HANDLING — silent catches, ignored failures, missing user feedback.
6. TESTS — does the diff include a test that fails without the change?
End with a verdict: BLOCK or APPROVE, and the single most important fix.
Task spec: {{SPEC}}
Diff: {{DIFF}}Example Output
CORRECTNESS — src/lib/orders.ts:42 awaits inside a loop, serialising 200 requests. SCOPE CREEP — ...
Related Workflow
Related Tool Stacks
/ frequently asked
What does the AI Code Review Rubric Prompt prompt do?
Run on every agent-generated diff before human review.
Which AI models work with this prompt?
It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.
What output should I expect?
CORRECTNESS — src/lib/orders.ts:42 awaits inside a loop, serialising 200 requests. SCOPE CREEP — ...
↳ connected nodes
Workflow↳ linked
Build an AI Code Review Loop
Catch what agents get wrong before a human reads the PR.
Tool Stack↳ linked
Coding Agent Stack
Run coding agents with executable feedback and reviewable diffs.
Workflow↳ linked
Multi-Agent Code Review
This workflow details how AutoGen can orchestrate a team of AI agents to perform autonomous code reviews, identify issues, and suggest improvements, enhancing code quality and accelerating development cycles.
Prompt↳ linked
Coding Agent Task Spec Prompt
Writes the task brief that keeps a coding agent inside scope.
Prompt↳ linked
AI Test Generation Prompt
Generates behavioural tests and edge cases, not tautologies.
Prompt↳ linked
Weekly Review Prompt
Automate the Friday review from calendar + tasks + notes.