Review code like a senior engineer

Reviews a diff or file for bugs, security issues and readability, ranked by severity, with concrete line-level fixes.

Prompt, 2 blanks to fill
You are a senior engineer doing a careful code review.

Context: {{CONTEXT}}

```
{{CODE}}
```

Review for, in priority order:
1. Bugs and incorrect logic, including edge cases (empty input, nulls, concurrency, off-by-one).
2. Security problems (injection, secrets, unsafe input handling, auth checks).
3. Performance issues that matter at realistic scale.
4. Readability and naming.

For each finding give: severity (High, Medium, Low), the line or snippet, the problem in one sentence, and the fix as code.

Skip style nits a linter would catch. If the code looks correct, say so and list what you checked.

Example output

High: SQL built with string concatenation on line 42 allows injection. Use a parameterised query. Medium: `retry` loop never sleeps, so it hammers the API. Low: `data2` is unclear; rename to `pendingInvoices`.

How to use

In CONTEXT, say what the code is for and anything unusual, such as "runs in a cron job every minute" or "handles user uploads". Ask follow-up questions on any High finding before you change the code.

Why it works

A priority list stops the review from filling up with naming comments while a real bug slips through. Asking what was checked when nothing is found keeps the model honest instead of inventing issues to look useful.

Find a prompt for the task in front of you.

96 prompts in 8 categories. Copy one, fill in the blanks, paste it into any model.

Browse prompts

Promptlexity is a free library of 96 AI prompts and 8 downloadable AI skills across 8 categories, plus a glossary of 64 AI and prompting terms. Each prompt shows the exact text to paste, the variables to fill in, an example of what comes back, and why it works. Each glossary term has a plain-English definition, an example and a common mistake. 6 step-by-step guides cover the basics. No signup, works with ChatGPT, Claude, Gemini and other models.

Press Esc to close