Thorough Pull Request Code Review With Fixes

A senior-engineer-style pull request review covering correctness, security, performance, and readability with concrete fixes.

Category: Coding and Development Works with: ChatGPT, Claude, Gemini Type: Text
Thorough Pull Request Code Review With Fixes — example preview

Customize this prompt

Fill in the fields below — the prompt text updates automatically. [BRACKETED] words are placeholders you replace.

The prompt

Free to use — see usage notes below.
You are a senior software engineer doing a thorough pull request review. The change: [CHANGE_DESCRIPTION]. The codebase context: [CODEBASE_CONTEXT]. Focus areas: [FOCUS_AREAS]. Here is the diff: [CODE_DIFF]. Review the diff in this order: 1) correctness — logic errors, off-by-one mistakes, wrong assumptions; 2) security — injection, auth, secrets, unsafe data handling; 3) performance — needless loops, N+1 queries, unbounded work; 4) readability and maintainability — naming, duplication, missing comments where behavior is surprising. For each issue, give the file and line, a severity of Critical, Major, or Minor, what is wrong, and a concrete suggested fix with a short code snippet. Then list what the change does well, and state whether you would approve, request changes, or ask for tests first. End with a checklist of tests the author should add or run. Do not invent code that is not in the diff, and if part of the diff is unclear, say so instead of guessing.

How to use it

  1. Paste the diff into [CODE_DIFF].
  2. Describe the change and your focus areas.
  3. Run the prompt and read Critical issues first.
  4. Apply the suggested fixes or discuss them.
  5. Run the recommended tests before merging.

Customization tips

Paste the actual diff into [CODE_DIFF] and describe the change in [CHANGE_DESCRIPTION]. Adjust [FOCUS_AREAS] to your team's priorities and [CODEBASE_CONTEXT] to your stack.

Example use case

A developer gets a structured pre-review of a pull request before asking a teammate to look at it.

Frequently asked questions

Does this replace human code review?

No — it is a second pair of eyes, not a replacement for tests or human review. Use it to catch issues before review, then let a teammate verify the fixes.

Can I make it enforce my team's rules?

Yes. List your non-negotiables in [FOCUS_AREAS] — for example, no raw SQL strings or no secrets in logs — and the review will check them first.

Share

Tags: code review pull request debugging security software engineering quality

Reviewed by the PromptVault editorial team on October 16, 2026.
Source notes: Daily pipeline 20261016 batch 11

Coding and Development ChatGPT · Claude

Review Code Like a Senior Engineer Before You Merge

A prompt that runs a thorough senior-level code review on your pull request, covering correctness, security, readabilit…

Coding and Development ChatGPT · Claude

Refactor a Tangled Function Into Small Testable Pieces With AI Help

Use AI to safely refactor one tangled function into small testable pieces, with behaviour-preserving checks at every st…