Skip to main content

Claude Prompt to Generate a PR Review Checklist

Generate a PR review checklist tailored to your changed files, covering logic, security, performance, testing, maintainability, and deployment risks.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
You are a meticulous senior code reviewer. Based on the following pull request details, generate a thorough review checklist tailored to the specific changes.

**PR Title:** Add Stripe webhook handling for subscription renewals
**PR Description:** Implements webhook endpoint for Stripe subscription events (renewed, failed, cancelled). Adds retry logic and idempotency checks.
**Files Changed:** app/Http/Controllers/WebhookController.php, app/Services/SubscriptionService.php, database/migrations/add_webhook_logs_table.php, tests/Feature/WebhookTest.php, routes/api.php
**Framework:** Laravel 11 + PHP 8.3

**Generate a Review Checklist With These Sections:**

1. **Logic & Correctness:**
   - Does each changed function handle all input variations (null, empty, boundary values)?
   - Are there any race conditions in concurrent scenarios?
   - Do new conditional branches have proper else/default cases?
   - Are error paths handled (not just the happy path)?
   - For database changes: are migrations reversible? Are there data loss risks?

2. **Security:**
   - Any user input used without validation or sanitization?
   - SQL injection risks (raw queries, unparameterized input)?
   - XSS risks (unescaped output in templates)?
   - Mass assignment vulnerabilities (fillable/guarded)?
   - Are new API endpoints properly authenticated and authorized?
   - Secrets or credentials accidentally included?
   - Webhook signature verification — is the Stripe signing secret validated before processing?

3. **Performance:**
   - N+1 query risks with new relationships?
   - Missing database indexes for new query patterns?
   - Large data sets loaded into memory (should use chunking/cursors)?
   - Cache invalidation handled for affected data?
   - Are there any synchronous operations that should be queued?

4. **Testing:**
   - Do new features have corresponding tests?
   - Are edge cases covered (empty arrays, null values, max lengths)?
   - Do tests actually assert behavior (not just "no exception thrown")?
   - Are existing tests still valid after these changes?
   - Integration test coverage for new API endpoints?

5. **Maintainability:**
   - Naming: are new variables, methods, classes clearly named?
   - Documentation: do complex methods have docblocks?
   - DRY: is there duplicated logic that should be extracted?
   - Single Responsibility: does any class/method do too much?
   - Are there any hardcoded values that should be config/constants?

6. **Deployment & Operations:**
   - Do migrations need to be run in a specific order?
   - Are there environment variables that need to be added?
   - Will this cause downtime? Does it need a feature flag?
   - Monitoring: are new error states logged appropriately?

**Output Format:**
- Checkboxes (`[ ]`) for each item
- Prioritize items by risk level: Critical > Important > Nice-to-have
- Add specific line-number references where possible based on the files changed
- End with 3 key questions the reviewer should ask the PR author

What this prompt does

This prompt makes the AI a meticulous senior code reviewer that builds a PR review checklist tailored to your actual changes, not a generic template. You provide the [pr_title], [pr_description], [files_changed], and [tech_stack], and it generates a checklist across six sections: logic and correctness, security, performance, testing, maintainability, and deployment and operations. Because it reasons about your specific changed files, the items are concrete rather than boilerplate.

The structure works because it forces coverage of the areas tired reviewers skip. The security section probes for unvalidated input, SQL injection, XSS, mass assignment, and missing auth, with room for a [security_concern] specific to this PR. The performance section flags N+1 risks, missing indexes, and unbounded memory loads. Output comes as checkboxes prioritized by risk (Critical, Important, Nice-to-have), with line-number references where the changed files allow, and ends with three pointed questions for the PR author.

When to use it

  • You are reviewing a non-trivial PR and want a checklist tied to the real diff
  • The PR touches auth, payments, or webhooks and you can't afford to miss a security gap
  • You want N+1 and indexing risks surfaced before the change hits production
  • You need a reviewer checklist for a junior teammate to follow consistently
  • You want database migration and deployment risks called out explicitly
  • You want three sharp questions to send back to the author instead of vague "looks good"

Example output

You get a checklist of [ ] items grouped into the six sections, each item phrased as a concrete question about your changed files and tagged by risk level so Critical items rise to the top. Where the [files_changed] allow, it references specific files or likely line numbers, and it closes with three key questions the reviewer should ask the PR author.

Pro tips

  • Paste a real [files_changed] list, including paths, so the checklist references actual files
  • Make [pr_description] substantive; "adds Stripe webhooks with idempotency" yields far sharper items than a one-liner
  • Use [security_concern] to point it at the scariest part of the PR, like webhook signature verification
  • Set [tech_stack] so framework-specific risks (mass assignment, fillable/guarded) get checked
  • Treat the output as a checklist to work through, not proof of correctness; it cannot see the full diff
  • Re-run it when the PR changes substantially, since the checklist is only as current as the file list you give it

Frequently Asked Questions

Is the checklist generic or tailored to my PR?
It is tailored. The prompt reasons about your `[files_changed]`, `[pr_description]`, and `[tech_stack]` to produce concrete items and, where possible, line-number references. That said, it cannot see the full diff, so treat it as a guided checklist rather than complete coverage.
Does it catch security issues?
The security section probes for unvalidated input, SQL injection, XSS, mass assignment, missing authentication, and accidentally committed secrets, plus any `[security_concern]` you specify. It flags risks to investigate; you still need to verify each one against the real code.
Will it find performance problems like N+1 queries?
Yes. The performance section specifically asks about N+1 query risks from new relationships, missing indexes for new query patterns, large in-memory data loads, and cache invalidation, which are common issues that tired reviewers miss.
How are the checklist items prioritized?
Items are tagged by risk level as Critical, Important, or Nice-to-have, so the most dangerous issues rise to the top. The output also ends with three key questions for you to ask the PR author directly.
Can I use it for frameworks other than Laravel?
Yes. Set the `[tech_stack]` variable to your framework and language, and the security and performance checks adapt, dropping framework-specific items like fillable/guarded where they do not apply and adding ones that do.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in AI Coding Assistants

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support