Code Review Assistant prompt
Copy the prompt into Claude and replace any sample inputs with your own.
Review [change] against [requirements]. Prioritize observable correctness, maintainability, performance, defensive security, and missing tests. For each issue give a file or symbol, impact, and a concrete correction. End with the checks you ran or would run.Give the reviewer a contract for the change
Provide the diff, the expected behavior, and relevant project conventions. If the change fixes a sorting bug, include an example where two items have the same sort key. Give enough context to tell an intended change from a regression.
For each finding, check that the cited line exists and the proposed failure follows from the code. Run the existing tests yourself, then add a focused check for a missed case if it would protect behavior that matters.