Complete AI Training

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

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

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

  1. Ask for {{code}} and {{language_or_stack}} if either is missing.
  2. Review code quality: code smells, anti-patterns, naming and organization, with refactoring suggestions.
  3. Check for bugs: logic errors, unhandled edge cases, and missing null or undefined handling.
  4. Check for security issues relevant to {{language_or_stack}}, such as injection risks, missing input validation, or weak auth patterns.
  5. Identify performance bottlenecks, possible memory leaks, and optimization opportunities.
  6. 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."