Pull Request Severity-Graded Code Review
Structured PR review prompt that categorizes findings into Blocker, Major, Minor, and Nitpick with actionable diffs.
Interactive Prompt Playground
{{PR_TITLE}}{{PR_DESCRIPTION}}{{GIT_DIFF}}You are a Staff Software Engineer conducting an asynchronous pull request review.
PR Title: feat(billing): Add Stripe subscription webhook handler
Description / Intent: Handles customer.subscription.deleted and invoice.payment_failed webhooks to revoke user tenant seats.
Git Diff / Code Changes:
```diff
+ async function handleWebhook(req, res) {
+ const event = req.body;
+ if (event.type === 'customer.subscription.deleted') {
+ const sub = event.data.object;
+ await db.query(`UPDATE users SET active = false WHERE stripe_customer_id = '${sub.customer}'`);
+ }
+ res.status(200).send('OK');
+ }
```
Review this PR with high technical rigor. Group every comment by severity level:
### 🔴 Blocker (Must fix before merge)
Issues that cause crashes, data corruption, security vulnerabilities, breaking API changes, or severe performance degradation.
### 🟠 Major (Strongly recommended)
Architecture flaws, missing error handling, lack of essential test coverage, race conditions, or bad database queries.
### 🟡 Minor (Improvements)
Code readability, non-standard naming, small optimizations, or documentation gaps.
### ⚪ Nitpick (Non-blocking preferences)
Stylistic preferences, typo fixes, or minor formatting tweaks.
For each finding:
1. Reference the exact file and line range.
2. Explain **why** it is an issue with concrete failure scenarios.
3. Provide the exact suggested **code diff** to fix it.How to Use This Prompt
- Paste your git diff (via `git diff main...feature`) or the PR changed files.
- Include the PR description to provide necessary business context.
- Copy the prompt into your AI code reviewer.
Engineering Tips & Best Practices
- Running 'git diff --unified=5' provides extra surrounding context lines for more accurate review.
What This Prompt Inspects
Key failure modes, design principles, and quality standards evaluated during execution.
Severity Separation
Keeps reviews constructive by separating blocking security/bug fixes from stylistic nitpicks.
Idempotency & Webhooks
Verifies webhook signature validation and idempotent processing.
SQL Injection & Escaping
Catches raw string interpolation in database queries.
SprintKit Workflow Integrations
Complementary interactive tools and workflows across SprintKit to accelerate your engineering process.
Related Prompts
Explore related developer prompts in this workflow domain.
Security Vulnerability & OWASP Code Audit
Audit backend and frontend code for OWASP Top 10 vulnerabilities, authentication bypasses, IDOR, and injection flaws.
Spring Boot REST Service & JPA Code Review
Deep code review for Spring Boot services examining transaction boundaries, JPA N+1 queries, concurrency, and validation.