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
- 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 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
- Ask for any missing inputs before starting.
- Review the code for logical, syntax and runtime errors.
- Check for security issues (e.g. input validation, injection risks) and performance concerns.
- For each issue found, explain what's wrong and why it matters.
- 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".