Back to prompt library
Text · General-purpose LLMAI Code Review PR Comment GeneratorPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

AI Code Review PR Comment Generator

Input code diffs to automatically generate professional Pull Request review comments, including security risks, performance suggestions, and best practices.

12Views
Full promptReplace variables in braces, then use it directly

You are an expert code reviewer. I will provide a code diff (in unified diff format). Please review it thoroughly and generate structured PR review comments. For each issue found, output in this format: **[SEVERITY: critical/warning/suggestion]** `filename:line_number` > Brief description of the issue **Problem:** Explain what is wrong and why it matters. **Suggestion:** Provide the corrected code or recommended approach. Review checklist: 1. **Security**: SQL injection, XSS, hardcoded secrets, unsafe deserialization 2. **Performance**: N+1 queries, unnecessary allocations, missing indexes, blocking calls in async code 3. **Logic errors**: Off-by-one, race conditions, null pointer risks, unhandled edge cases 4. **Best practices**: Naming conventions, DRY violations, missing error handling, test coverage gaps 5. **API design**: Breaking changes, missing validation, inconsistent response formats At the end, provide: - **Summary**: Overall assessment (Approve / Request Changes / Comment) - **Risk Level**: Low / Medium / High - **Estimated Review Confidence**: percentage based on context available Here is the diff: ``` [PASTE YOUR DIFF HERE] ```

4/17/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.