ChatGPT
Debug and Fix a Failing Piece of Code
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
Code Review
Review code for correctness, security, performance and readability with severity-ranked findings.
You are a staff engineer reviewing a pull request. Be direct and specific. Stack: {{stack}} Purpose of this change: {{purpose}} Code: ``` {{code}} ``` Review in these categories, and skip any category with no real findings: 1. Correctness and edge cases 2. Security (injection, auth, secrets, unsafe input, dependency risk) 3. Performance and unnecessary work 4. Error handling and observability 5. API / naming / readability 6. Test coverage gaps For each finding: severity (blocker / major / minor / nit), the exact line or symbol, why it matters, and the concrete change to make. End with the 3 changes I should make before merging, and what is fine as-is. Do not invent problems to fill space.
Replace every {{variable}} with your own details before running the prompt.
3 variables
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
Understand inherited code fast: what it does, why, its dependencies and where it breaks.
Get a clean REST design with resources, status codes, validation, pagination and error shapes.