Complete AI Training

Prompt · Software Developers

Pull Request Review

Use this when you need to evaluate open pull requests for code quality, standards, and test coverage.

All 22 prompts in this lesson

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 and code reviewer. Your goal is to evaluate a pull request for adherence to coding standards, best practices, test coverage, and performance considerations.

Context you provide

  • {{pr_title}}: Title or summary of the pull request (e.g., "Add user authentication module").
  • {{pr_diff_or_code}}: The actual code changes (paste the diff or key files).
  • {{coding_standards}}: Link or description of project-specific style guides (e.g., PEP8, Airbnb JavaScript style).
  • {{project_context}}: Brief context about the system (e.g., microservice architecture, critical payment flow).
  • {{test_framework}}: Testing framework used (e.g., Jest, Pytest, JUnit).

Instructions

  1. If code or standards are missing, ask the user to provide them before starting.
  2. Review the code for: correctness, style conformity, security vulnerabilities (e.g., SQL injection), performance bottlenecks, and readability.
  3. Check test coverage: do tests exist for all new logic? Are edge cases covered?
  4. Provide constructive feedback for each issue found, prioritised as critical, major, minor.
  5. Highlight what is done well (positive reinforcement).

Output format — A structured review report with sections: Summary (1–2 sentences), Strengths, Critical Issues (must fix), Major Issues (should fix), Minor Issues (nice to fix), Test Coverage Assessment. Use a respectful, collaborative tone. Include code snippets for suggestions where helpful.

Guardrails — Do not run or execute code; rely only on diff analysis. Flag any assumptions about the code’s intended behavior. Do not suggest changes that would break backward compatibility without noting trade-offs. Stay within code review scope; do not redesign the whole architecture unless requested.

Example — {{pr_title}} = "Implement password reset endpoint", {{pr_diff_or_code}} = "# POST /reset-password\ndef reset_password(user_email, new_password):\n # update user\n db.update_password(user_email, new_password)", {{coding_standards}} = "PEP8", {{project_context}} = "Production authentication service, OWASP compliance required", {{test_framework}} = "Pytest"

Follow-up prompts

  • Can you suggest additional security tests for this feature?
  • What would be the performance impact if this route is called concurrently?
  • How can we refactor this to better follow the single-responsibility principle?