AgenticFor ProfessionalsCoding & Tech

Review code for quality, security, and performance issues.

Before merging any production code — especially for security-sensitive or high-traffic paths

ChatGPT · Claude · Gemini·Advanced·~1650 tokens
Curated by the AIPP team
Last updated 14 May 2026 · v3
review-code-for-quality-security-and-performance-issues.md · 1650 words
You are a senior {{role}} brought in to help a professional complete a {{use_case}} task.

# Context
- Category: Coding & Tech
- Use case: Review code for quality, security, and performance issues
- Source task:
  - Conduct a thorough code review of the following code. Do not just spot syntax issues : review for:
  - 1. Correctness : does this code do what it's supposed to do? Are there edge cases it doesn't handle?
  - 2. Security vulnerabilities : SQL injection, XSS, insecure data handling, authentication gaps.
  - 3. Performance : N+1 queries, unnecessary loops, memory leaks, blocking operations.
  - 4. Readability and maintainability : naming clarity, function length, responsibility separation.
  - 5. Error handling : are failures handled gracefully? What happens when this breaks?
  - 6. Test coverage gaps : what scenarios should have a test but don't?
  - For each issue found: severity (Critical / High / Medium / Low), explanation of the problem, and a corrected or improved version.
  - Code: {{code}}.
  - Context: {{what_this_code_does_and_where_it_sits_in_the_sys}}.

# Goal
A prioritised code review with severity ratings, explanations, and corrected versions for each issue

# Constraints
- Think like an expert advisor before writing the final output.
- Ask clarifying questions only if the missing information would materially change the result.
- Avoid generic filler, vague advice, and corporate-sounding language.
- Make the output specific, practical, and ready to use.

# Output
A prioritised code review with severity ratings, explanations, and corrected versions for each issue

The variables to fill in

PlaceholderWhat to put thereExample
{{role}}Rolesenior software engineer with expertise in [language / framework]
{{code}}Codepaste the function or component here
{{what_this_code_does_and_where_it_sits_in_the_sys}}What this code does and where it sits in the syswhat this code does and where it sits in the system
{{use_case}}Your specific valuereview code for quality, security, and performance issues

How to customize this prompt

  1. Replace each {{double-curly}} with your real context.
  2. Adjust the constraints section to match your tone — formal, casual, blunt.
  3. If the engagement is recurring, change the duration line to mention milestones rather than days.
  4. Run it in your tool of choice. The output should be ready to paste with at most one small edit.

When to use

Before merging any production code — especially for security-sensitive or high-traffic paths

PRO TIP

Ask the reviewer to focus on Critical and High issues first. Medium and Low issues are useful but should not block a merge if the codebase is moving fast.

Related prompts

Structured

Weekly Planning System

Build a complete weekly plan. Time-block every day, protect deep work hours, and ensure the top 3 priorities get the best time slots.

Structured

Project Breakdown Planner

Break this project into a full execution plan with milestones, tasks, owners, and deadlines.

Structured

Meeting Agenda Designer

Design a complete meeting agenda with time allocations, facilitation notes, and a clear decision or action framework.

Structured

Goal Setting Framework

Build a complete goal achievement framework using proven goal-setting principles (SMART, OKR, or milestone-based as appropriate). Include the goal, the plan, the tracking method, and accountability st

★ EXPLORE MORE PROMPTS

More for Professionals

Browse all prompts built for Professionals — free and premium, ready to copy.

Browse more prompts →