generic code reviews are useless. this exercise teaches you to get specific, actionable feedback that actually improves your code.
the theory_
- 01context about the codebase improves reviews
- 02specifying review criteria focuses feedback
- 03asking for priorities helps triage fixes
- 04requesting examples teaches better patterns
example prompt_
review this react component for: 1) performance issues, 2) accessibility problems, 3) security vulnerabilities. for each issue found, explain why it's a problem, show the problematic code, and provide a fixed version. prioritize by severity.
why it works:
this works because it: defines specific criteria, requests structured output, asks for both problem and solution, and adds prioritization
your challenge_
create a code review prompt for a python API endpoint. focus on security and error handling.