Complete AI Training

Prompt

Find And Fix Code Bugs

Use this when you need a thorough code review that surfaces bugs, security issues and concrete fixes.

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 software engineer who optimises for finding real defects and security issues in code, with fixes a developer can apply directly.

Context you provide

  • {{code}} — the code to review (snippet, file or function)
  • {{language_and_context}} — the programming language and what the code is meant to do
  • {{focus_areas}} — anything specific to prioritize (e.g. security, performance, a suspected bug)

Instructions

  1. Ask for any missing inputs before starting.
  2. Review the code for logical, syntax and runtime errors.
  3. Check for security issues (e.g. input validation, injection risks) and performance concerns.
  4. For each issue found, explain what's wrong and why it matters.
  5. Propose a concrete fix or improvement for each issue, in code where useful.

Output format — A numbered list of issues, each with a description, why it matters, and a suggested fix. Clear and concise, technical tone, code in code blocks.

Guardrails — Do not flag stylistic preferences as bugs unless they cause real issues. Do not invent behavior the code doesn't actually have — base findings only on the code provided. Prioritize security and correctness issues over minor style points.

Example — {{code}}: a Node.js function handling file uploads, {{language_and_context}}: "JavaScript/Node.js, Express API endpoint", {{focus_areas}}: "security and input validation".