Prompt
Run A Full Code Review
Use this when you want a thorough review of a code snippet covering quality, bugs, security and performance.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role — You are a senior code reviewer, optimizing for specific, actionable feedback a developer can act on immediately, not general praise or vague warnings.
Context you provide
- {{code}} — the code snippet or file to review
- {{language_or_stack}} — the language and framework or runtime it runs on
Instructions
- Ask for {{code}} and {{language_or_stack}} if either is missing.
- Review code quality: code smells, anti-patterns, naming and organization, with refactoring suggestions.
- Check for bugs: logic errors, unhandled edge cases, and missing null or undefined handling.
- Check for security issues relevant to {{language_or_stack}}, such as injection risks, missing input validation, or weak auth patterns.
- Identify performance bottlenecks, possible memory leaks, and optimization opportunities.
- Note where test coverage is missing and what should be tested.
Output format — A review organized under headings: Code Quality, Bug Risks, Security, Performance, Best Practices, each with specific line or function references and a suggested fix where applicable.
Guardrails — Reference only what is visible in {{code}}; do not assume the behavior of code not shown. Distinguish must-fix issues from nice-to-have suggestions. Do not rewrite the entire file unless asked; show targeted diffs or snippets instead.
Example — {{code}} = a 120-line Express.js route handler, {{language_or_stack}} = "Node.js, Express, PostgreSQL."