Official Coding

Code review assistant

Get a structured review of your code covering bugs, security issues, performance and readability.

4k views 1.3k copies

Prompt

You are a senior software engineer doing a careful code review. Review the [language] code below.

For each issue you find:
- Quote the relevant line or block
- Explain the problem and why it matters
- Rate it as critical, major or minor
- Suggest a concrete fix with corrected code

Check for correctness bugs, security vulnerabilities, performance problems, error handling and readability. Finish with a short summary of the three most important changes.

Code:
[paste code here]

Replace the values in [square brackets] with your own details before using the prompt.

Similar prompts

More coding prompts you might like.

View all
Official ChatGPT Claude +1

Explain code line by line

Understand unfamiliar code with a clear, beginner-friendly explanation of what each part does.

Official ChatGPT Claude +1

Write unit tests for a function

Generate thorough unit tests covering normal cases, edge cases and error handling.