Claude Prompt Library

50 Claude Prompts That Review Your Code

50 copy-paste prompts

Paste a diff or a file and Claude returns a real review: findings ranked by severity, the exact lines at fault, and a suggested patch for each one. Prompts for pull requests, bug hunts, security passes, query performance, and the comments you post back to your team. Not "any thoughts on this code?"

In short: This page contains 50 copy-paste ready prompts, organized into 5 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Hand-curated and tested by the AI Academy team.

By Louis Corneloup ยท Founder, Techpresso
Last updated ยทHand-curated & tested by the AI Academy team

Full Diff & PR Reviews

10 prompts

Full Pull Request Review

1/50

You are a staff engineer who gives rigorous, fair pull request reviews. <context> I have a pull request open and I want a real review before my teammates see it, not a summary of what the code does. </context> <inputs> - Stack: [LANGUAGE, FRAMEWORK, VERSION] - What this PR is supposed to do: [INTENT IN ONE LINE] - Full diff: [PASTE THE GIT DIFF] - Conventions we follow: [LINTER, STYLE GUIDE, IN-HOUSE PATTERNS] - Test setup: [TEST RUNNER AND WHERE TESTS LIVE] - Risk level: [INTERNAL TOOL / CUSTOMER FACING / PAYMENTS] </inputs> <task> Review the diff hunk by hunk. Produce findings grouped as Blocking, Should Fix, and Nit, each with the file and line, what actually breaks, and a concrete suggested change. Then judge whether the diff does what the stated intent says, list the tests that are missing, and flag anything it touches that has effects outside the changed files. </task> <constraints> - Quote the exact line before commenting on it. - No praise-only comments and no restating what the code does. - Maximum 3 Blocking findings: rank ruthlessly. - If you need a file you cannot see, name it instead of guessing. </constraints> <format> Return the review as a markdown artifact with the three severity sections, then a one-paragraph merge call: approve, approve with comments, or request changes. </format>

Turns a raw diff into a severity-ranked pull request review with line references and a merge recommendation.

๐Ÿ’ก

Pro tip: Paste your PR description as the intent line. A lot of the useful findings come from Claude noticing the diff does not do what the author claims.

Large Diff Triage Plan

2/50

You are a tech lead who triages oversized pull requests under time pressure. <context> A pull request touching 40+ files landed in my queue and I have limited time. I need to know where to spend it. </context> <inputs> - Diffstat or changed file list: [PASTE GIT DIFF STAT] - Stack: [LANGUAGE AND FRAMEWORK] - What the PR claims to do: [SUMMARY] - Business-critical areas of this codebase: [AUTH, BILLING, DATA EXPORT, ETC] - My time budget: [MINUTES] </inputs> <task> Sort every changed file into three tiers: read closely, skim, safe to trust. Justify each on blast radius, whether it touches money, auth, or persisted data, generated versus handwritten code, and mechanical rename versus real logic. Then give me an ordered checklist of the questions to answer while reading tier one, and which hunks to open first. </task> <constraints> - Assume you can only see paths and line counts, not file contents. - Lockfiles, snapshots, and generated clients go to trust unless pinned versions change. - Say explicitly what you are choosing not to review and what that risks. </constraints> <format> Return a table of file, tier, and reason, then the ordered reading checklist sized to my time budget. </format>

Sorts a huge diff into read-closely, skim, and trust tiers with an ordered reading plan for the time you have.

๐Ÿ’ก

Pro tip: Generate the input with git diff --stat main...HEAD. Path names alone are enough for Claude to spot the risky files.

Self-Review Before You Open the PR

3/50

You are the harshest reviewer on my team, reviewing my work before anyone else sees it. <context> I am about to open a pull request and I want to catch the comments my reviewers would leave, so the review is about design instead of mistakes. </context> <inputs> - My diff: [PASTE THE GIT DIFF] - Ticket or requirement: [WHAT I WAS ASKED TO BUILD] - Stack and conventions: [LANGUAGE, FRAMEWORK, HOUSE RULES] - Known shortcuts I took: [ANYTHING I ALREADY KNOW IS ROUGH] - Who reviews it: [SENIOR ENGINEER / SECURITY / DESIGN] </inputs> <task> Predict the review comments this diff will attract, in the order a reviewer would hit them. For each one give the line, the comment a reviewer would write, and the fix. Separately: list leftover debug code, commented-out blocks, stray console logs, TODOs, unused imports, renamed things I forgot to rename everywhere, and requirements from the ticket the diff does not cover. </task> <constraints> - Judge only the diff, not the whole codebase. - Tell me which comments are worth fixing now and which are worth arguing about. - Do not soften anything: I would rather hear it from you. </constraints> <format> Return a numbered fix list ordered by how embarrassing it would be to ship, then a two-line PR description I can paste. </format>

Predicts the exact comments reviewers will leave on your diff and gives you the fixes plus a PR description.

๐Ÿ’ก

Pro tip: Run this on the staged diff (git diff --cached) so you catch leftovers before they enter the branch history.

Behavior-Preserving Refactor Check

4/50

You are a refactoring specialist who verifies that a rewrite changes structure without changing behavior. <context> I refactored a function or module and I need to know whether behavior shifted anywhere, especially in edge cases nobody tests. </context> <inputs> - Code before: [PASTE THE ORIGINAL] - Code after: [PASTE THE REFACTORED VERSION] - Language and runtime: [E.G. TYPESCRIPT ON NODE 22] - Callers I know about: [WHERE THIS IS USED] - Guarantees callers rely on: [RETURN SHAPE, ORDERING, THROWN ERRORS, NULL HANDLING] </inputs> <task> Compare the two versions for observable differences: return values, thrown error types and messages, ordering, mutation of arguments, short-circuit behavior, number of external calls, and behavior on empty, null, and extreme inputs. For each difference, state the input that reveals it and whether it is a fix, a regression, or a coin flip. </task> <constraints> - Ignore naming, formatting, and comment changes entirely. - Give a concrete input, not a category, for every difference you claim. - If both versions are equivalent, say so plainly instead of inventing findings. </constraints> <format> Return a table of input, old result, new result, and verdict, then the test cases I should add to lock the behavior in. </format>

Diffs two versions of the same code for behavior changes and hands you inputs that prove each one.

๐Ÿ’ก

Pro tip: Ask for the equivalence table first, then feed the rows straight into a parameterized test so the refactor stays honest.

Feature Branch Architecture Review

5/50

You are a software architect reviewing a feature branch for structural decisions, not syntax. <context> A feature branch is functionally done. Before it merges I want to know if we are locking in a shape we will regret. </context> <inputs> - Feature and its purpose: [WHAT IT DOES AND FOR WHOM] - Branch diff or file tree plus key files: [PASTE] - Existing architecture: [LAYERS, PATTERNS, WHERE LOGIC IS SUPPOSED TO LIVE] - Known near-term roadmap: [WHAT WE PLAN TO BUILD NEXT ON TOP OF THIS] - Team size and ownership: [WHO MAINTAINS THIS] </inputs> <task> Assess boundaries and coupling: does business logic sit in the right layer, are new dependencies pointing the right direction, is state owned in one place, are abstractions earned or speculative, and does anything duplicate a capability the codebase already has. Then say which decisions are cheap to change later and which are one-way doors. </task> <constraints> - Do not report style, naming, or test issues here: architecture only. - Every criticism needs a concrete alternative shape, not a principle. - Flag speculative abstraction as loudly as missing abstraction. </constraints> <format> Return findings as decision records: decision made, consequence, one-way door yes or no, recommended change. End with the single change with the highest payoff. </format>

Reviews a feature branch for coupling, layering, and one-way-door decisions before they harden.

๐Ÿ’ก

Pro tip: Give Claude the next two roadmap items. Most architecture mistakes only look like mistakes once you know what is built on top next.

Public API Contract Change Review

6/50

You are an API design reviewer who guards backward compatibility. <context> My diff changes an interface other people consume, and I need to know exactly what breaks for them. </context> <inputs> - API type: [REST / GRAPHQL / GRPC / PUBLISHED LIBRARY] - Diff of the contract: [PASTE SCHEMA, TYPES, ROUTES, OR SIGNATURES BEFORE AND AFTER] - Who consumes it: [INTERNAL SERVICES, MOBILE APPS, EXTERNAL CUSTOMERS] - Versioning policy: [SEMVER, DATE VERSIONS, NONE] - Deprecation window we can offer: [TIME OR NONE] </inputs> <task> Classify every change as breaking, potentially breaking, or additive: removed or renamed fields, changed types and nullability, tightened validation, changed defaults, new required parameters, altered error codes, changed pagination or ordering, and enum values added to a field consumers switch on. For each breaking change give the migration path and what an old client sees if we ship as-is. </task> <constraints> - Treat "clients probably do not use it" as breaking unless I have told you otherwise. - Include serialization details: date formats, number precision, casing. - Note where a non-breaking additive fix exists and prefer it. </constraints> <format> Return a compatibility table, then a migration note I can send to consumers, then the version bump you recommend. </format>

Classifies every contract change as breaking or additive and drafts the migration note for consumers.

๐Ÿ’ก

Pro tip: Paste both schema versions rather than the diff: Claude catches nullability and enum changes far more reliably with the full shapes.

Release Candidate Risk Review

7/50

You are a release manager who reviews a release candidate for blast radius. <context> I am shipping everything merged since the last release and I need a risk picture plus a rollback plan before I press deploy. </context> <inputs> - Commit log since last release: [PASTE GIT LOG ONELINE] - Notable diffs: [PASTE THE RISKY ONES] - Deploy mechanics: [ROLLING, BLUE GREEN, MIGRATIONS RUN WHEN] - Traffic profile: [PEAK HOURS, REGIONS, SLA] - What we can observe: [METRICS, LOGS, ALERTS THAT EXIST TODAY] </inputs> <task> Rank the changes by risk of causing a user-visible incident. For each high-risk item: the failure mode, who notices first, whether it is safe to roll back or one-way (schema changes, data backfills, cache format changes, published messages), the metric that would show it going wrong, and a feature-flag or staged option. Then flag any pair of changes that is risky only when deployed together. </task> <constraints> - Call out irreversible changes separately from reversible ones. - Only propose monitoring using what I said exists. - Cap the go/no-go checklist at 10 items. </constraints> <format> Return a risk table, then a pre-deploy checklist, then a rollback plan with the exact trigger conditions. </format>

Ranks a release by incident risk and produces a pre-deploy checklist plus a rollback plan with triggers.

๐Ÿ’ก

Pro tip: Run it on git log --oneline last-tag..HEAD. The pairwise interaction section is where the surprises usually hide.

Infra and CI Config Diff Review

8/50

You are an infrastructure engineer reviewing configuration changes with production consequences. <context> My diff changes infrastructure or CI config rather than application code, and config mistakes fail silently until they fail loudly. </context> <inputs> - Config type: [DOCKERFILE / COMPOSE / TERRAFORM / K8S MANIFEST / CI WORKFLOW] - Diff: [PASTE] - Environment it applies to: [DEV, STAGING, PROD] - Secrets and env vars involved: [NAMES ONLY, NOT VALUES] - Current runtime facts: [INSTANCE COUNT, VOLUMES, HEALTHCHECKS, RESOURCE LIMITS] </inputs> <task> Review for: build-time versus runtime variable confusion, secrets that end up in an image layer or log, volumes and persistent data at risk of being recreated, healthcheck and readiness gaps, resource limits that will get the process killed, permissive network or IAM rules, unpinned base images and actions, and cache keys that will serve stale artifacts. State what happens on the first deploy and on the tenth. </task> <constraints> - Assume the change ships without anyone watching logs. - Flag every place data loss is possible, even if unlikely. - Give the corrected config snippet for each finding. </constraints> <format> Return findings ordered by worst-case damage, each with the fixed snippet, then a short post-deploy verification list. </format>

Reviews Docker, Terraform, Kubernetes, or CI diffs for data loss, leaked secrets, and silent misconfiguration.

๐Ÿ’ก

Pro tip: Include your real env var names. Build-time versus runtime variable mixups are the single most common finding and they need the names to spot.

First-Time Contributor PR Review

9/50

You are a maintainer known for reviews that teach without discouraging people. <context> Someone opened their first pull request on my project. The code needs work but I want them to come back. </context> <inputs> - Project and its conventions: [WHAT IT IS, CONTRIBUTING RULES] - Their diff: [PASTE] - What they were trying to fix: [ISSUE OR DESCRIPTION] - Their apparent experience level: [BEGINNER / EXPERIENCED ELSEWHERE] - Must-fix bar for merging: [TESTS, CHANGELOG, SIGN-OFF] </inputs> <task> Write the review. Open with the specific thing they got right, not a generic thank you. Then list must-fix items with an explanation of why the project cares, followed by optional suggestions clearly marked as optional. Where the fix is small, include the exact replacement code so they can apply it. Close with the concrete next step to get it merged. </task> <constraints> - Explain reasons, never just cite a rule. - No sarcasm, no "obviously", no rewriting their whole approach if theirs works. - Separate blocking from nice-to-have so nothing is ambiguous. </constraints> <format> Return the review as a GitHub comment I can paste, with a short must-fix checklist they can tick off. </format>

Writes a kind, specific first-PR review that teaches, with a clear must-fix checklist for merging.

๐Ÿ’ก

Pro tip: Tell Claude the must-fix bar explicitly. Without it, reviews drift into rewriting the contributor approach instead of merging their work.

Legacy File Deep Review

10/50

You are an engineer who inherits undocumented code and makes it safe to work in. <context> I have to change a file nobody has touched in years. Before I edit it I need to understand what it really does and where the mines are. </context> <inputs> - The file: [PASTE THE CODE] - Language and era clues: [FRAMEWORK VERSION, YEAR, DEPRECATED APIS] - What I need to change: [MY ACTUAL TASK] - What I know about its callers: [WHO CALLS IT, HOW OFTEN] - Test coverage on it: [NONE / SOME / UNKNOWN] </inputs> <task> Produce a working map: responsibilities, control flow through the main paths, hidden state and globals, implicit assumptions about input, dead branches, and any behavior that looks like a bug but is probably load-bearing for a caller. Then give the safest edit plan for my task: what to touch, what to leave alone, and the characterization tests to write first so I notice if I break something. </task> <constraints> - Do not propose a rewrite: I have to ship a change, not a refactor. - Mark each suspicious behavior as bug or load-bearing quirk, with your reasoning. - Note lines where a change would silently alter output for existing callers. </constraints> <format> Return the map, then a numbered edit plan, then the characterization tests to write before editing. </format>

Maps an old, untested file and gives a safe edit plan plus the characterization tests to write first.

๐Ÿ’ก

Pro tip: Ask which quirks are load-bearing before you clean anything up. Old code is full of accidental contracts callers now depend on.

XML tags are just the start. Learn the full Claude workflow.

A growing library of 300+ hands-on AI tutorials covering Claude, ChatGPT, and 50+ tools. New tutorials added every week.

Start 7-Day Free Trial

Bug Hunting & Edge Cases

10 prompts

Root Cause From a Stack Trace

11/50

You are a debugging specialist who works backwards from a stack trace to the real cause. <context> Production threw an error and I have the trace plus the code around it. I want the actual cause, not the line where it surfaced. </context> <inputs> - Stack trace: [PASTE THE FULL TRACE] - Code at the top frames: [PASTE THE RELEVANT FUNCTIONS] - What the user was doing: [ACTION OR REQUEST] - Frequency: [ONCE / EVERY REQUEST / SPIKES AT A TIME OF DAY] - Environment differences: [WORKS LOCALLY? DIFFERENT NODE, DB, OR DATA VOLUME?] </inputs> <task> Give me ranked hypotheses for the root cause, each with the evidence in the trace that supports it, the evidence that would rule it out, and the cheapest way to confirm it (a log line, a query, a repro input). Then explain how the bad value reached the throwing line, frame by frame. Finish with the fix at the true cause plus the guard that stops the whole class of error. </task> <constraints> - Rank hypotheses by probability and say why the top one beats the second. - Distinguish the line that threw from the line that is wrong. - If the trace is truncated or minified, tell me exactly what to capture next. </constraints> <format> Return the hypothesis table, the value-flow walkthrough, then the patch as a diff. </format>

Turns a stack trace plus surrounding code into ranked root-cause hypotheses, a value-flow trace, and a patch.

๐Ÿ’ก

Pro tip: Include the frequency and whether it reproduces locally. Those two facts eliminate more hypotheses than any amount of extra code.

Null and Undefined Crash Hunt

12/50

You are a static analysis engine that reports every place a value can be missing at runtime. <context> My code crashes on missing values in production even though it looks fine locally, because local data is always well formed. </context> <inputs> - Code: [PASTE THE FILE OR FUNCTION] - Language and strictness: [E.G. TYPESCRIPT STRICT OFF, PYTHON, GO] - Where data comes from: [API RESPONSE, DB ROW, USER FORM, MESSAGE QUEUE] - Fields that really can be absent: [OPTIONAL COLUMNS, LEGACY ROWS, PARTIAL PAYLOADS] - What should happen when a value is missing: [DEFAULT, SKIP, THROW, 400] </inputs> <task> List every dereference, index, destructure, chained property access, and array method call that assumes a value exists. For each: the line, the input that makes it blow up, the error the user sees, and the fix that matches my stated missing-value policy. Separately flag places where an optional chain silently produces undefined and pushes the crash further downstream. </task> <constraints> - Distinguish "crashes" from "silently produces wrong data": the second is worse. - Do not suggest sprinkling optional chaining everywhere: validate at the boundary where it belongs. - Say which checks type narrowing at the entry point would make unnecessary. </constraints> <format> Return a findings table (line, triggering input, symptom, fix), then the boundary validation to add so most rows disappear. </format>

Finds every missing-value crash path in a file and separates hard crashes from silent wrong-data paths.

๐Ÿ’ก

Pro tip: Name the fields that are genuinely nullable in your database. Claude then stops guessing and points only at the paths that actually happen.

Race Condition and Concurrency Review

13/50

You are a concurrency reviewer who finds interleavings that break invariants. <context> My code runs concurrently (multiple requests, workers, or tabs) and I suspect state gets corrupted under load. </context> <inputs> - Code: [PASTE THE HANDLER, JOB, OR SERVICE] - Concurrency model: [ASYNC SINGLE THREAD, THREAD POOL, MULTIPLE PROCESSES, SERVERLESS] - Shared resources: [DB ROWS, CACHE KEYS, FILES, IN-MEMORY MAPS, EXTERNAL API] - Invariants that must hold: [E.G. BALANCE NEVER NEGATIVE, ONE RECORD PER USER] - Transaction and locking used today: [ISOLATION LEVEL, LOCKS, NONE] </inputs> <task> Find the read-modify-write windows, check-then-act gaps, and unguarded shared state. For each: an explicit interleaving of two concurrent runs step by step, the invariant it violates, and how often it would show up at my traffic level. Then recommend the fix, choosing between unique constraints, atomic updates, row locks, idempotency keys, or queue serialization, and say why that fix over the others. </task> <constraints> - Show the interleaving as a numbered timeline: no hand waving. - Prefer database-level guarantees over application locks and explain the tradeoff. - Flag retries and at-least-once delivery as concurrency sources too. </constraints> <format> Return one section per race with its timeline, then a fix table ranked by correctness per unit of complexity. </format>

Exposes concrete interleavings that corrupt state and recommends the right locking or idempotency fix.

๐Ÿ’ก

Pro tip: State your invariants in business terms. "One active subscription per user" gets Claude to the missing unique constraint instantly.

Boundary and Off-By-One Audit

14/50

You are a reviewer who specializes in boundaries: indexes, ranges, limits, and inclusive versus exclusive ends. <context> My function does slicing, pagination, or range math and I do not trust the endpoints. </context> <inputs> - Code: [PASTE THE FUNCTION] - What the ranges mean in business terms: [E.G. PAGE 1 IS THE FIRST PAGE, DATE RANGE INCLUDES END DAY] - Inputs it receives: [TYPES AND REALISTIC VALUES] - Callers and their expectations: [WHO CALLS IT AND WHAT THEY ASSUME] - Limits enforced elsewhere: [MAX PAGE SIZE, MAX LENGTH, DB CONSTRAINTS] </inputs> <task> Check every index, loop bound, slice, comparison operator, and range calculation against the intended semantics. Build a table of boundary inputs: zero, one, exactly the limit, limit plus one, negative, equal start and end, reversed range, empty collection, and the last page of an exact multiple. For each, the expected result, the actual result, and the fix. </task> <constraints> - Be explicit about inclusive versus exclusive at every boundary you discuss. - Include the last-page and exact-multiple cases: they are the usual bugs. - Give the corrected expression, not a description of it. </constraints> <format> Return the boundary table, then the patched function, then the parameterized test cases that cover every row. </format>

Audits index, slice, and range logic against boundary inputs and returns a patched function plus test rows.

๐Ÿ’ก

Pro tip: Write down what page 1 and the end date mean in business terms first. Most off-by-one bugs are a semantics mismatch, not bad arithmetic.

Swallowed Exception and Error Handling Audit

15/50

You are a reliability engineer reviewing how code behaves when things fail. <context> When something breaks in this code, I get an unhelpful log line or nothing at all, and users get a blank screen or a false success. </context> <inputs> - Code: [PASTE THE FILE] - Failure sources: [NETWORK CALLS, DB, PARSING, FILESYSTEM, THIRD-PARTY SDK] - How errors should surface: [HTTP CODE, RETRY, USER MESSAGE, ALERT] - Logging and monitoring available: [LOGGER, SENTRY, METRICS] - What must never be silently lost: [PAYMENTS, WEBHOOK EVENTS, USER EDITS] </inputs> <task> Find every catch that swallows, logs and continues, returns a default that hides failure, or catches too broadly. Also flag missing handling around awaited calls, promise rejections with no handler, partial writes that leave inconsistent state, and error messages that lose the original cause. For each: the line, what the user and the on-call engineer experience today, and the corrected handling. </task> <constraints> - Separate errors that must fail loudly from ones that are safe to degrade. - Never suggest logging sensitive values: name the safe fields to log instead. - Preserve the original error as a cause in every rewrite. </constraints> <format> Return a table of line, current behavior, correct behavior, then the rewritten handling blocks and the two alerts worth adding. </format>

Finds swallowed errors, unhandled rejections, and false successes, then rewrites the handling properly.

๐Ÿ’ก

Pro tip: List what must never be silently lost. That single input turns a generic audit into a prioritized list your on-call rotation cares about.

Timezone and Date Handling Bug Hunt

16/50

You are an expert in date and time correctness across timezones and daylight saving transitions. <context> My date logic works for me and breaks for users in other timezones, or around month ends and clock changes. </context> <inputs> - Code: [PASTE THE DATE LOGIC] - Date library and version: [NATIVE DATE, DAYJS, LUXON, PYTHON DATETIME, ETC] - Where dates come from and go: [USER INPUT, DB COLUMN TYPE, API, CRON] - Server and database timezone settings: [UTC? LOCAL?] - Business rules: [E.G. A DAY ENDS AT MIDNIGHT IN THE USER TIMEZONE, BILLING IS MONTHLY] </inputs> <task> Trace how a date crosses every boundary in this code (parse, store, compute, format, display) and mark where the timezone is lost, assumed, or double-applied. Then test the logic against: a user in UTC+13, a user in UTC-8, the spring-forward and fall-back hours, the last day of a 31-day month rolling into a 30-day month, February 29, and a date-only value stored in a timestamp column. </task> <constraints> - Distinguish instants from calendar dates and say which each variable should be. - Never compare a naive value with an aware one in your fix. - Give the corrected code using the library I named, not a different one. </constraints> <format> Return the boundary trace, a case table with expected versus actual, then the patched code and the tests to freeze it. </format>

Traces dates through parse, store, compute, and display to find lost timezones, DST, and month-end bugs.

๐Ÿ’ก

Pro tip: Tell Claude your database column types. A date stored in a timestamp column is the root of most "off by one day" reports.

Money and Rounding Correctness Audit

17/50

You are a financial systems reviewer who audits monetary arithmetic. <context> My code handles money and totals do not always reconcile to the cent, which finance notices before I do. </context> <inputs> - Code: [PASTE THE PRICING, TAX, OR PAYOUT LOGIC] - How money is represented: [FLOAT, DECIMAL, INTEGER CENTS, DB COLUMN TYPE] - Currencies in play: [SINGLE OR MULTI, ZERO-DECIMAL CURRENCIES?] - Rules that must hold: [TAX ROUNDING, DISCOUNT ORDER, SPLIT PAYOUTS SUM TO TOTAL] - Downstream consumers: [INVOICES, STRIPE, ACCOUNTING EXPORT] </inputs> <task> Find every place floating point, premature rounding, or inconsistent rounding mode can produce a discrepancy: percentage math, tax on discounted amounts, proportional splits, currency conversion, aggregation of already-rounded rows, and comparisons for equality. For each, show a concrete input where the result is off and by how much, then give the corrected calculation and where rounding should happen exactly once. </task> <constraints> - Use real numbers in your examples so I can reproduce the discrepancy. - Specify the rounding mode and the unit of storage in every recommendation. - Ensure splits and line items still sum to the stated total after your fix. </constraints> <format> Return a discrepancy table with reproducible inputs, then the corrected functions, then the reconciliation test to add. </format>

Audits money math for float and rounding errors with reproducible examples and corrected calculations.

๐Ÿ’ก

Pro tip: Ask for the residual-allocation fix on splits. Dividing a total three ways and still summing back exactly is the case most code gets wrong.

Async and Promise Pitfall Review

18/50

You are a reviewer who specializes in asynchronous control flow mistakes. <context> My async code mostly works but I get missing data, unhandled rejections, and operations finishing in a different order than I expect. </context> <inputs> - Code: [PASTE THE ASYNC CODE] - Runtime: [NODE VERSION / BROWSER / PYTHON ASYNCIO] - External calls it makes: [APIS, DB, QUEUE] - Ordering requirements: [WHAT MUST HAPPEN BEFORE WHAT] - Timeout and retry policy: [IF ANY] </inputs> <task> Find: missing awaits, awaits inside loops that should be concurrent, concurrent work that should be sequential, floating promises with no error handler, async callbacks passed to functions that ignore the returned promise (forEach, event handlers), promise combinators that hide partial failures, missing timeouts, unbounded concurrency over a large list, and cleanup that never runs on the error path. For each: the line, the symptom in production, and the fix. </task> <constraints> - State the concurrency limit you recommend and why, not just "batch it". - Be explicit about which combinator to use and how partial failures are handled. - Flag anything that keeps the process alive or leaks a handle after the request ends. </constraints> <format> Return findings ordered by user impact, each with a before and after snippet, then the ordering diagram of the fixed flow. </format>

Catches missing awaits, floating promises, wrong concurrency, and missing timeouts in async code.

๐Ÿ’ก

Pro tip: Say which steps must be sequential. Claude otherwise parallelizes work that depends on ordering and trades one bug for another.

Hidden Mutation and Side Effect Hunt

19/50

You are a reviewer who tracks unintended mutation and side effects through code. <context> Something changes state that should not: shared objects get modified, caches serve mutated values, or a component re-renders from a hidden write. </context> <inputs> - Code: [PASTE THE FUNCTIONS OR COMPONENTS] - Language and paradigm: [E.G. REACT, NODE SERVICE, PYTHON] - Objects that are shared or cached: [MODULE-LEVEL STATE, CACHE, PROPS, DEFAULTS] - What callers assume: [E.G. THIS FUNCTION IS PURE, THIS INPUT IS NOT MODIFIED] - Symptom I observe: [WHAT GOES WRONG AND WHEN] </inputs> <task> Trace every write. Identify functions that mutate their arguments, shallow copies that still share nested references, mutable default values, module-level state that outlives a request, in-place sorts and splices on shared arrays, cached objects handed out by reference, and side effects hidden inside getters, constructors, or render paths. For each: the line, the sequence of calls that makes the symptom appear, and the fix. </task> <constraints> - Say for each finding whether it explains my stated symptom or is a separate latent bug. - Prefer returning new values over defensive copying and explain where copying is still needed. - Flag shallow-copy fixes that leave nested references shared. </constraints> <format> Return a mutation map (what writes what, from where), then the ranked findings with patches, then which one to fix first. </format>

Maps every write in the code to find argument mutation, shared references, and hidden side effects.

๐Ÿ’ก

Pro tip: Describe the symptom precisely, including whether it appears only after the second request. Cross-request module state is a top suspect.

Regression Hunt Between Two Revisions

20/50

You are a debugging engineer who isolates which change broke a working behavior. <context> Something that worked stopped working after a set of changes and I do not have a clean bisect (too many commits, or the failure is intermittent). </context> <inputs> - Broken behavior: [WHAT SHOULD HAPPEN VS WHAT HAPPENS NOW] - Diff between the working and broken revisions: [PASTE] - When it started: [DEPLOY, DATE, OR VERSION] - What else changed at that time: [DEPENDENCY BUMPS, CONFIG, DATA MIGRATION, ENV VARS] - Reproduction status: [ALWAYS / SOMETIMES / ONLY IN PROD] </inputs> <task> Rank the changes in the diff by likelihood of causing this exact symptom, with the mechanism for each: how that change produces this failure. Include non-code suspects (dependency minor bumps, transitive updates, config defaults, changed data shape). Then give the fastest discriminating test per hypothesis so I can confirm in one step instead of bisecting, and the fix for the top suspect. </task> <constraints> - Explain the mechanism, not just the correlation, for every suspect. - If the symptom is intermittent, say what makes it appear and disappear. - Include one hypothesis that does not involve the application code at all. </constraints> <format> Return the ranked suspect table with mechanisms and discriminating tests, then the patch for the leading suspect. </format>

Ranks suspects in a diff by mechanism and gives one-step tests to confirm which change caused a regression.

๐Ÿ’ก

Pro tip: Include dependency bumps in the diff you paste. Transitive minor updates cause a surprising share of "we changed nothing" regressions.

Security & Dependency Review

10 prompts

OWASP Pass on a Route Handler

21/50

You are an application security engineer reviewing server code against the OWASP Top 10. <context> This endpoint is reachable by users and I want a security pass on it before it ships, focused on what is actually exploitable here. </context> <inputs> - Handler code: [PASTE THE ROUTE OR CONTROLLER] - Framework: [EXPRESS, NEXT.JS ROUTE, DJANGO, RAILS, SPRING] - Who can call it: [PUBLIC, LOGGED-IN USER, ADMIN, SERVICE TOKEN] - What it touches: [TABLES, FILES, EXTERNAL APIS, PAYMENTS] - Auth mechanism: [SESSION COOKIE, JWT, API KEY, HOW IT IS VERIFIED] </inputs> <task> Review for broken access control, injection, insecure deserialization, SSRF, mass assignment, missing rate limits, verbose error responses, insecure direct object references, and unvalidated redirects. For each real finding: the line, a concrete exploit request an attacker would send, the impact, and the patched code. Then list the checks that are unnecessary here and why, so I do not add noise. </task> <constraints> - Only report what is exploitable given the stated caller and data: no generic checklist padding. - Show the attacker request (method, path, body, headers) for every finding. - Fix at the boundary: validate and authorize before any work happens. </constraints> <format> Return findings ranked by exploitability with exploit request and patch, then a short list of what you checked and cleared. </format>

Runs an exploitability-focused OWASP pass on one endpoint, with attacker requests and patched code per finding.

๐Ÿ’ก

Pro tip: Tell Claude exactly who is allowed to call the endpoint. Access control findings are the most common and they depend entirely on that answer.

SQL Injection and Raw Query Audit

22/50

You are a database security reviewer auditing query construction. <context> My code builds SQL, sometimes with string interpolation, and I need to know which queries are injectable and how to fix them without breaking dynamic filtering. </context> <inputs> - Query code: [PASTE THE RAW QUERIES OR QUERY BUILDER CODE] - Database and driver: [POSTGRES, MYSQL, SQLITE, ORM AND VERSION] - Which inputs are user controlled: [QUERY PARAMS, BODY FIELDS, HEADERS, IMPORTED FILES] - Dynamic parts needed: [FILTERS, SORT COLUMN, DIRECTION, LIMIT, IN LISTS] - Database user privileges: [READ ONLY? DDL? SUPERUSER?] </inputs> <task> Classify each query as parameterized, injectable, or unsafe-by-construction. For injectable ones, show a payload that works against my database, what it exposes or destroys given the privileges I listed, and the parameterized rewrite. Handle the cases parameters cannot cover: dynamic column and table names, ORDER BY direction, and variable-length IN lists, with an allowlist pattern for each. </task> <constraints> - Use syntax valid for the database I named. - Do not tell me to "sanitize input": show parameter binding or an allowlist. - Flag ORM escape hatches (raw, literal, template SQL) explicitly. </constraints> <format> Return a per-query table (query, verdict, payload, rewrite), then the safe helper for dynamic sort and IN lists. </format>

Classifies every query as safe or injectable with working payloads and parameterized rewrites, including dynamic ORDER BY.

๐Ÿ’ก

Pro tip: Mention your database user privileges. The impact section becomes concrete, and read-only users turn some findings from critical into noisy.

Authorization and IDOR Review

23/50

You are a security reviewer who hunts for missing ownership checks. <context> My app authenticates users correctly but I am not sure every endpoint checks that the requested resource actually belongs to the caller. </context> <inputs> - Endpoints and their code: [PASTE HANDLERS, INCLUDING THE QUERIES] - Data model relationships: [USER, ORG, RESOURCE, HOW OWNERSHIP IS EXPRESSED] - Roles and what each may do: [MEMBER, ADMIN, OWNER, SUPPORT] - Where identity comes from: [SESSION, TOKEN CLAIMS, HEADER] - Resource identifiers: [SEQUENTIAL IDS, UUIDS, SLUGS] </inputs> <task> For every endpoint, state whether authorization is enforced in the query (scoped by owner) or only checked after fetching, or not at all. Write the exact request a logged-in attacker would send to read or modify another account resource. Then patch each finding by scoping the query, and identify any place a role check is missing or is done on client-supplied role data. </task> <constraints> - Treat unguessable identifiers as no protection at all. - Prefer owner-scoped queries over post-fetch comparisons and show the difference. - Include nested resources reached through a parent (child rows, attachments, comments). </constraints> <format> Return an endpoint matrix (endpoint, who can call, ownership enforced where, verdict), then patches, then the shared guard to centralize this. </format>

Audits endpoints for missing ownership checks and IDOR with attacker requests and owner-scoped query patches.

๐Ÿ’ก

Pro tip: Include nested routes. The parent resource is usually checked and the child rows fetched by raw id, which is where the hole lives.

Secrets and Credential Leak Scan

24/50

You are a security engineer reviewing code for exposed credentials and leaked data. <context> I want to be sure this code does not ship secrets or write sensitive values where they can be read later. </context> <inputs> - Code and config: [PASTE FILES, INCLUDING CONFIG AND CLIENT-SIDE CODE] - Deployment target: [SERVER, SERVERLESS, BROWSER BUNDLE, MOBILE APP] - Secret management today: [ENV VARS, VAULT, HARDCODED, CI VARIABLES] - What counts as sensitive here: [TOKENS, PII, CARD DATA, HEALTH DATA] - Where logs and errors go: [PROVIDER, WHO CAN READ THEM] </inputs> <task> Find hardcoded keys and passwords, secrets referenced in client-visible variables, credentials in URLs or query strings, sensitive values written to logs or error messages, secrets committed to config or fixtures, tokens stored in local storage, and anything sent to a third party in a payload or crash report. For each: the line, who could read it, and the remediation, including whether the secret must be rotated. </task> <constraints> - Mark every finding as rotate-now or safe-to-fix-in-place. - Include test fixtures, seed data, comments, and sample files in scope. - Name the safe fields to log instead of removing logging entirely. </constraints> <format> Return a findings table with exposure path and remediation, then a rotation checklist, then the redaction helper to add to the logger. </format>

Scans code, config, and logs for exposed credentials and PII, with a rotation checklist and a redaction helper.

๐Ÿ’ก

Pro tip: Include your client-side files. Public build variables leaking a server key is far more common than a hardcoded password.

Input Validation and XSS Review

25/50

You are a reviewer who audits untrusted input from the boundary to the browser. <context> User-supplied content flows through my app to the page, and I need to know where it is unescaped or unvalidated. </context> <inputs> - Code: [PASTE THE VALIDATION, RENDERING, AND TEMPLATE CODE] - Stack: [FRAMEWORK, TEMPLATING, ANY SANITIZER LIBRARY] - Fields users control: [NAMES, RICH TEXT, URLS, FILE NAMES, MARKDOWN] - Where content is rendered: [HTML BODY, ATTRIBUTE, INLINE SCRIPT, EMAIL, PDF, CSV] - Rich formatting we must allow: [NONE / LINKS / FULL RICH TEXT] </inputs> <task> For each field, follow it from arrival to output. Report missing or weak validation at the boundary (type, length, format, allowed values) and unescaped output per context, since HTML body, attributes, URLs, and scripts each need different handling. Give a working payload for each injection point, then the fix: schema validation at entry plus context-correct escaping or an allowlist sanitizer at output. </task> <constraints> - Do not conflate validation with escaping: report both separately. - Cover attribute and URL contexts, not just HTML body, plus CSV formula injection if data is exported. - Never recommend a blocklist of dangerous strings. </constraints> <format> Return a field-by-field flow table (field, validation, output context, verdict, payload), then the validation schema and the escaping fixes. </format>

Traces each user field from input to render, flagging weak validation and context-wrong escaping with payloads.

๐Ÿ’ก

Pro tip: List every place the content is rendered, including emails and CSV exports. Those outputs are usually escaped for HTML and nothing else.

Dependency Upgrade Risk Review

26/50

You are a reviewer who assesses dependency changes before they merge. <context> A dependency update pull request is open (or I want to upgrade) and I need to know what can break and whether the change is trustworthy. </context> <inputs> - Manifest and lockfile diff: [PASTE THE DEPENDENCY DIFF] - How these packages are used: [WHICH APIS OF THEM WE CALL] - Stack and runtime version: [NODE, PYTHON, ETC] - Test and type coverage on the affected paths: [GOOD, THIN, NONE] - Constraints: [MUST STAY ON A LTS RUNTIME, SUPPORT OLD BROWSERS, ETC] </inputs> <task> For each changed package: whether the bump is patch, minor, or major in practice, the breaking changes and deprecations that touch the APIs we call, new transitive dependencies pulled in, peer dependency and runtime requirement conflicts, install scripts added, and licence changes. Flag any package that changed maintainer, jumped versions unusually, or is a suspicious lookalike name. Then give an upgrade order and what to verify after each step. </task> <constraints> - Separate "affects code we call" from "changed but irrelevant to us". - Call out supply-chain smells explicitly, even if you are unsure. - Recommend one upgrade per pull request when risk is not trivial, and say which ones to split out. </constraints> <format> Return a package table (bump type, breaking for us, transitive additions, verdict), then the upgrade order with verification steps. </format>

Reviews a dependency diff for real breaking changes, transitive additions, and supply-chain smells with an upgrade order.

๐Ÿ’ก

Pro tip: Tell Claude which APIs of the package you actually call. It then ignores the changelog entries that cannot affect you.

File Upload Handling Review

27/50

You are a security engineer reviewing file upload code. <context> My app accepts uploads from users, and uploads are one of the easiest features to get dangerously wrong. </context> <inputs> - Upload code: [PASTE THE HANDLER AND ANY PROCESSING] - Storage target: [LOCAL DISK, S3, VOLUME, DATABASE] - Allowed file types and sizes: [WHAT I INTEND TO ALLOW] - Processing done on files: [IMAGE RESIZE, PDF PARSE, ZIP EXTRACT, VIRUS SCAN] - How files are served back: [PUBLIC URL, SIGNED URL, THROUGH THE APP] </inputs> <task> Review for: type checks based on extension or client content type instead of contents, path traversal in filenames, filename collisions and overwrites, missing size and count limits, decompression bombs and image bombs, files written inside a web-served directory, executable content served with a dangerous content type, missing authorization on download, and metadata (EXIF location) kept in stored files. For each: the malicious upload, the impact, and the fix. </task> <constraints> - Give concrete limits and the exact headers to serve stored files with. - Assume the storage path is shared with other tenants unless I said otherwise. - Cover the download path, not just the upload path. </constraints> <format> Return findings ranked by severity with the malicious upload and the patch, then a hardened version of the handler. </format>

Reviews upload and download code for traversal, spoofed types, bombs, and unsafe serving with a hardened handler.

๐Ÿ’ก

Pro tip: Ask for the exact response headers for serving user files. Content-Type and Content-Disposition mistakes turn any upload into stored XSS.

Webhook Handler Security Review

28/50

You are an integrations engineer reviewing an inbound webhook endpoint. <context> A third party (payments, CRM, or an internal service) posts events to my endpoint and anyone on the internet can also post there. </context> <inputs> - Handler code: [PASTE] - Provider and its verification method: [SIGNATURE HEADER, HMAC, SHARED SECRET, MTLS] - Events handled and their effects: [E.G. SUBSCRIPTION ACTIVE GRANTS ACCESS] - Delivery guarantees: [AT LEAST ONCE? ORDERING GUARANTEED?] - Current failure behavior: [WHAT STATUS CODES YOU RETURN AND WHEN] </inputs> <task> Check signature verification (computed over the raw body, constant-time comparison, secret from config), replay protection with a timestamp tolerance and event id dedupe, idempotency of every side effect, out-of-order event handling, trusting event payload fields instead of re-fetching state from the provider, and the status codes you return so the provider retries when it should and stops when it should not. Give the patched handler. </task> <constraints> - Point out any body parsing that happens before signature verification. - Every side effect must be safe to apply twice after your fix. - Say which fields are safe to trust from the payload and which need a fetch. </constraints> <format> Return a checklist with pass or fail per item and the reason, then the rewritten handler, then the two tests that prove replay and duplicate safety. </format>

Audits a webhook endpoint for signature verification, replay protection, and idempotent side effects.

๐Ÿ’ก

Pro tip: Check whether your framework parses the body before you verify the signature. That single detail invalidates most HMAC implementations.

Session, Cookie and JWT Review

29/50

You are an authentication reviewer auditing session handling. <context> I want to know whether my session or token setup can be stolen, replayed, or kept alive after logout. </context> <inputs> - Auth code: [PASTE LOGIN, SESSION, MIDDLEWARE, LOGOUT] - Mechanism: [SERVER SESSION, JWT, THIRD-PARTY IDENTITY PROVIDER] - Cookie settings today: [FLAGS, DOMAIN, PATH, MAX AGE] - Token contents and lifetime: [CLAIMS, EXPIRY, REFRESH FLOW] - Sensitive actions: [PASSWORD CHANGE, PAYMENTS, ADMIN OPERATIONS] </inputs> <task> Review cookie flags and scope, token signature and algorithm verification (including algorithm confusion and unverified decode), expiry and clock skew, refresh token rotation and reuse detection, whether logout actually invalidates anything server side, session fixation on login, CSRF exposure given the cookie settings, and whether authorization data cached in a token can go stale after a plan or role change. For each: the attack, and the fix. </task> <constraints> - Say explicitly what happens today if a token is stolen, and for how long it works. - Cover the stale-claims problem: a revoked role that still passes checks. - Give exact cookie attributes and verification code, not general advice. </constraints> <format> Return an audit table (item, current, risk, fix), then the corrected session code, then a short logout and revocation test plan. </format>

Audits cookies, tokens, refresh, and logout for theft, replay, and stale-permission problems with corrected code.

๐Ÿ’ก

Pro tip: Ask what happens after a role downgrade. Long-lived tokens carrying permissions keep granting access long after you revoke them.

Multi-Tenant Data Isolation Review

30/50

You are a reviewer who audits tenant isolation in shared-database applications. <context> Multiple customers share my database and a single missing filter means one customer sees another customer data. </context> <inputs> - Code: [PASTE QUERIES, REPOSITORIES, AND MIDDLEWARE] - Tenant model: [TENANT COLUMN, SCHEMA PER TENANT, ROW LEVEL SECURITY] - Where the tenant id comes from: [SESSION, SUBDOMAIN, HEADER, REQUEST BODY] - Cross-tenant features that are legitimate: [ADMIN TOOLS, SUPPORT IMPERSONATION, ANALYTICS] - Caches, queues, and search indexes involved: [WHAT ELSE HOLDS TENANT DATA] </inputs> <task> List every query, aggregate, join, cache key, background job, search index write, and export path, and state whether the tenant scope is enforced, and where. Flag any tenant id taken from client-controlled input, any join that reaches an unscoped table, any cache key without the tenant, any job that loses tenant context, and any admin path with no audit trail. Then propose enforcement that fails closed by default. </task> <constraints> - Treat a missing tenant filter as critical even in read-only paths. - Include background jobs, webhooks, and cache and search layers, not just HTTP handlers. - Prefer a mechanism that makes unscoped access impossible over per-query discipline. </constraints> <format> Return an isolation matrix (path, tenant source, enforced where, verdict), then the fail-closed design, then the tests that prove cross-tenant reads fail. </format>

Audits every query, cache key, and job for tenant scoping and proposes a fail-closed isolation mechanism.

๐Ÿ’ก

Pro tip: Include your cache keys and queue payloads. Application queries are usually scoped correctly, and the cache is where tenants bleed into each other.

These prompts give you the what. Tutorials give you the why.

Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. 300+ tutorials and growing.

Try AI Academy Free

Performance & Query Review

10 prompts

Slow Query Review With Execution Plan

31/50

You are a database performance engineer who tunes slow queries. <context> One query is slow enough to hurt and I want to know why the planner behaves this way and what to change. </context> <inputs> - Query: [PASTE THE SQL] - Execution plan: [PASTE EXPLAIN ANALYZE OUTPUT IF YOU HAVE IT] - Database and version: [POSTGRES 16, MYSQL 8, ETC] - Table sizes and existing indexes: [ROW COUNTS, INDEX DEFINITIONS] - Access pattern: [HOW OFTEN, PART OF A PAGE LOAD? BATCH JOB?] </inputs> <task> Explain what the plan is doing in order and where the time goes: sequential scans on filtered columns, index scans that then re-check most rows, bad row estimates, spilling sorts, nested loops over large sets, and functions on indexed columns that prevent index use. Then give a rewritten query, the index to add with column order and why that order, and the expected effect on rows examined. </task> <constraints> - Justify index column order against the filters, join keys, and sort in this query. - Say which changes help this query and hurt writes or other queries. - Do not suggest an index that duplicates an existing one: check the list I gave you. </constraints> <format> Return the plan walkthrough, the rewritten query, the index DDL, and a before-and-after estimate of rows examined. </format>

Reads an execution plan, explains where time goes, and returns a rewritten query plus justified index DDL.

๐Ÿ’ก

Pro tip: Paste EXPLAIN ANALYZE, not EXPLAIN. Actual versus estimated row counts are what reveal the bad plan choice.

N+1 Query Hunt in ORM Code

32/50

You are a performance reviewer who finds hidden query loops in ORM code. <context> A page or endpoint feels slow and I suspect the ORM is issuing one query per row somewhere I cannot see. </context> <inputs> - Code: [PASTE THE ORM CODE, SERIALIZERS, AND ANY TEMPLATE OR COMPONENT THAT READS THE DATA] - ORM and version: [PRISMA, ACTIVERECORD, SQLALCHEMY, DJANGO ORM, ETC] - Relationships involved: [WHAT BELONGS TO WHAT] - Typical result size: [ROWS PER PAGE, RELATED ROWS PER PARENT] - Query log if available: [PASTE A SAMPLE] </inputs> <task> Point at every lazy relation access inside a loop, map, serializer, computed property, or view, including ones triggered indirectly. For each: how many queries it produces for my stated result size, and the eager loading or batched rewrite. Then check the fix does not create the opposite problem: an over-fetch that pulls huge rows or a cartesian join, and say which relations should be a separate batched query instead. </task> <constraints> - Give query counts before and after with my numbers, not "many fewer". - Watch for count and exists calls per row and aggregate them. - Note where selecting fewer columns matters more than joining differently. </constraints> <format> Return a table of trigger site, queries produced, fix, then the rewritten data-loading code and the assertion to add so this cannot regress. </format>

Finds every lazy-load-in-a-loop with query counts and rewrites the data loading without over-fetching.

๐Ÿ’ก

Pro tip: Also paste the serializer or component that reads the objects. The N+1 usually lives there, not in the code that runs the query.

Index Strategy Review for a Table

33/50

You are a database engineer who designs index sets for real workloads. <context> One table carries most of my traffic. I want the smallest index set that covers its real query patterns. </context> <inputs> - Table definition: [PASTE DDL WITH TYPES AND EXISTING INDEXES] - Row count and growth: [CURRENT SIZE, ROWS PER DAY] - Top queries against it: [PASTE THE 5 TO 10 QUERIES OR PATTERNS] - Write volume: [INSERTS, UPDATES, WHICH COLUMNS UPDATE OFTEN] - Database: [ENGINE AND VERSION] </inputs> <task> Map each query to the index that should serve it, then design the minimal set: composite indexes with justified column order, partial indexes where a filter is always present, covering indexes where they avoid a heap fetch, and unique constraints that also serve as indexes. List indexes to drop as redundant (a prefix of another) or unused. Quantify the write and storage cost of what you add. </task> <constraints> - Never propose one index per query: consolidate and explain the sharing. - Respect selectivity: say which leading column you chose and why. - Flag any index that will not help because of a function, type mismatch, or leading wildcard in the query. </constraints> <format> Return a query-to-index map, the CREATE INDEX statements, the DROP list, and the write-cost note. </format>

Designs a minimal composite and partial index set for a hot table, with drops for redundant indexes.

๐Ÿ’ก

Pro tip: Include your write volume. Index recommendations that ignore update cost make read-heavy queries fast and your write path slow.

Database Migration Safety Review

34/50

You are a database reliability engineer reviewing a schema migration for a live system. <context> I need this migration to run on a production table without locking out traffic or breaking the currently deployed code. </context> <inputs> - Migration: [PASTE THE SQL OR MIGRATION FILE] - Table facts: [ROW COUNT, SIZE, WRITE RATE, PEAK HOURS] - Database engine and version: [POSTGRES, MYSQL, ETC] - Deploy order: [DOES MIGRATION RUN BEFORE OR AFTER THE NEW CODE?] - Downtime allowed: [NONE / A FEW SECONDS / A WINDOW] </inputs> <task> For each statement: the lock it takes, what it blocks, and how long it runs at my table size. Flag adding a NOT NULL column with a default, type changes that rewrite the table, index creation without the concurrent option, foreign keys validated in place, and renames or drops that break the currently running code. Then rewrite the migration as an expand-and-contract sequence with the deploy steps interleaved, plus the rollback for each step. </task> <constraints> - Assume old and new code run at the same time during the deploy. - Every step must be independently reversible or explicitly marked one-way. - Include the backfill strategy in batches with its own safety limits. </constraints> <format> Return a statement-by-statement lock table, then the ordered migration and deploy plan, then the rollback per step. </format>

Reviews a migration for locking and compatibility, then rewrites it as a reversible expand-and-contract plan.

๐Ÿ’ก

Pro tip: State whether the migration runs before or after the new code deploys. Half of all migration incidents are just that ordering being wrong.

Hot Path Complexity Review

35/50

You are an algorithms reviewer who audits code that runs on every request. <context> This function runs in a hot path and I want to know its real cost as my data grows, not its cost on my laptop. </context> <inputs> - Code: [PASTE THE FUNCTION AND ITS HELPERS] - Input sizes today and in a year: [CURRENT AND PROJECTED] - Call frequency: [PER REQUEST, PER ITEM, PER SECOND] - Language and runtime: [DETAILS THAT AFFECT COST] - Latency budget: [MILLISECONDS AVAILABLE] </inputs> <task> State the time and space complexity of each part, then find nested loops that could be a lookup map, repeated work that should be hoisted or memoized, sorts and array scans inside loops, string concatenation in loops, structures with the wrong lookup cost, and repeated serialization or deserialization of the same data. For each: the current cost, the rewrite, the new cost, and the projected latency at my future input size. </task> <constraints> - Use my numbers to show absolute time, not just complexity classes. - Do not micro-optimize anything that is not on the hot path: say so and move on. - Keep readability: flag any optimization that trades a lot of clarity for little gain. </constraints> <format> Return a cost table (section, current, rewrite, new cost), then the optimized function, then the input size where the next bottleneck appears. </format>

Audits a hot function for complexity and repeated work, with rewrites and projected latency at future input sizes.

๐Ÿ’ก

Pro tip: Give both current and projected input sizes. It shifts the answer from generic advice to the two changes that actually matter this year.

Memory Leak and Retention Review

36/50

You are a runtime performance engineer diagnosing growing memory usage. <context> My process memory climbs over hours until it restarts or gets killed, and I need to find what stays alive. </context> <inputs> - Code: [PASTE THE SERVICE, CACHE, OR COMPONENT CODE] - Runtime: [NODE, PYTHON, JVM, BROWSER] - Growth pattern: [LINEAR WITH TRAFFIC, STEPS, ONLY UNDER LOAD] - Long-lived structures: [CACHES, MAPS, EVENT EMITTERS, SUBSCRIPTIONS, CONNECTION POOLS] - Evidence available: [HEAP SNAPSHOT SUMMARY, RSS OVER TIME, ALLOCATION LOGS] </inputs> <task> Identify retention paths: unbounded caches and maps keyed by user or request data, listeners and subscriptions added without removal, timers and intervals never cleared, closures capturing large objects, request-scoped data stored at module level, streams not consumed or destroyed, and buffers accumulated before flush. For each: why the object stays reachable, how fast it grows at my traffic, and the fix with a concrete bound or cleanup point. </task> <constraints> - Distinguish a true leak from expected cache growth and from fragmentation. - Every cache fix needs a size or TTL bound and an eviction policy. - Say what to measure next if the code alone cannot confirm the cause. </constraints> <format> Return ranked retention paths with growth estimates and patches, then the memory metrics and alert threshold to add. </format>

Traces retention paths that grow memory over time and fixes them with bounded caches and cleanup points.

๐Ÿ’ก

Pro tip: Describe the shape of the growth curve. Linear-with-traffic points at per-request retention, while step growth points at caches and pools.

Frontend Render Performance Review

37/50

You are a frontend performance engineer reviewing render and load cost. <context> My interface feels sluggish: typing lags, lists stutter, or the first load takes too long. </context> <inputs> - Component code: [PASTE THE COMPONENTS AND HOOKS OR STATE CODE] - Framework: [REACT, VUE, SVELTE, VERSION] - Symptom and where: [WHICH INTERACTION FEELS SLOW] - Data volumes: [LIST LENGTHS, PAYLOAD SIZES] - Measurements I have: [PROFILER FLAME CHART, LIGHTHOUSE, BUNDLE REPORT, NONE] </inputs> <task> Find render-cost problems: state placed too high causing wide re-renders, objects and functions recreated as props each render, expensive work in the render body, effects with unstable dependencies looping, lists without stable keys or virtualization, layout thrashing from reading and writing the DOM together, and unthrottled input or scroll handlers. Separately flag load-cost problems: heavy imports pulled into the first bundle, blocking scripts, and unsized media. Rank by what my stated symptom would feel like. </task> <constraints> - Do not recommend memoization everywhere: name the specific renders it prevents. - Distinguish problems that affect first load from ones that affect interaction. - Give the measurement that would confirm each finding. </constraints> <format> Return findings ranked by perceived impact with patches, then a short measurement plan to verify the improvement. </format>

Separates interaction render cost from load cost in frontend code and ranks fixes by perceived slowness.

๐Ÿ’ก

Pro tip: Say exactly which interaction feels slow. Render audits without a symptom produce memoization noise instead of the one real fix.

Caching Layer Review

38/50

You are a caching specialist reviewing cache correctness and effectiveness. <context> I added caching and now I am not sure it is helping, or whether it can serve stale or wrong data to the wrong user. </context> <inputs> - Cache code: [PASTE THE READ, WRITE, AND INVALIDATION LOGIC] - Cache store: [REDIS, IN-MEMORY, CDN, FRAMEWORK CACHE] - What is cached and how it changes: [DATA, HOW OFTEN IT UPDATES] - Key structure today: [PASTE THE KEY FORMAT] - Correctness requirement: [CAN USERS SEE DATA A MINUTE OLD? A DAY?] </inputs> <task> Review keys for missing dimensions (user, tenant, locale, permissions, feature flag, API version) that could cross-serve data, then review TTLs against how often the data changes, invalidation on every write path including background jobs, behavior when the cache is empty or down, thundering herd on expiry, negative caching of errors and empty results, and whether in-memory caching breaks with multiple instances. Estimate the real hit rate given the key cardinality. </task> <constraints> - Treat any cross-user or cross-tenant serving risk as critical. - Say which writes currently miss invalidation, by name. - Prefer short TTL plus invalidation over long TTL, and explain the tradeoff for my data. </constraints> <format> Return a key audit table, an invalidation coverage matrix over write paths, then the corrected cache wrapper. </format>

Audits cache keys, TTLs, and invalidation coverage for stale or cross-user data and returns a corrected wrapper.

๐Ÿ’ก

Pro tip: List every write path including cron jobs and admin tools. Invalidation gaps are almost always in the paths nobody remembers.

API Endpoint Latency Review

39/50

You are a backend performance engineer reducing endpoint response time. <context> One endpoint is my slowest and I need to know where the milliseconds go and which ones I can remove. </context> <inputs> - Handler code and everything it calls: [PASTE] - Current timings: [P50, P95, ANY SPAN BREAKDOWN] - External calls made: [DB QUERIES, HTTP CALLS, AND WHETHER THEY ARE SEQUENTIAL] - Response payload: [SHAPE AND TYPICAL SIZE] - Latency target: [WHAT GOOD LOOKS LIKE] </inputs> <task> Build a time budget for the request: work per stage, which stages are sequential that could be concurrent, calls repeated across stages, serialization of oversized payloads, synchronous work that belongs in a background job, blocking calls on the event loop, connection setup per request, and data fetched but never used in the response. Then propose an ordered plan with the millisecond win and the effort for each step. </task> <constraints> - Attribute time to stages, using my measurements where I gave them and stating assumptions otherwise. - Distinguish work that must finish before responding from work that can be deferred. - Note where a smaller payload beats a faster query. </constraints> <format> Return the time budget table, the ordered optimization plan with expected wins, then the spans to instrument to confirm. </format>

Breaks an endpoint into a time budget and returns an ordered optimization plan with expected millisecond wins.

๐Ÿ’ก

Pro tip: Ask which work can move to a background job. Deferring non-essential writes usually beats optimizing the queries you kept in the request.

Batch Job and Cron Scalability Review

40/50

You are a data engineer reviewing scheduled jobs for scale and safety. <context> My nightly job works today, but the dataset keeps growing and I want to know when and how it will break. </context> <inputs> - Job code: [PASTE] - Schedule and current runtime: [E.G. HOURLY, TAKES 12 MINUTES] - Data volume now and growth rate: [ROWS TODAY, GROWTH PER MONTH] - Resources and limits: [MEMORY, TIMEOUT, DB CONNECTIONS, RATE LIMITS] - What happens if it fails halfway: [CURRENT BEHAVIOR] </inputs> <task> Find the scaling limits: everything loaded into memory at once, unbatched writes, per-row queries, no checkpointing so a retry redoes everything, no locking so two runs can overlap, long transactions holding locks during the whole run, external rate limits ignored, and a runtime that will cross its schedule interval. Project when each limit is hit at my growth rate, then rewrite the job as resumable batches with progress, backoff, and idempotent writes. </task> <constraints> - Give the specific batch size and concurrency you recommend, with the reasoning. - The rewrite must be safe to run twice and safe to kill mid-run. - Include an overlap guard and a metric for progress and duration. </constraints> <format> Return the limits table with projected dates, then the rewritten job structure, then the alerts that should fire when it degrades. </format>

Projects when a scheduled job breaks as data grows and rewrites it as resumable, idempotent batches.

๐Ÿ’ก

Pro tip: Include the growth rate. It turns vague scalability advice into a date, which is what gets the work prioritized.

Review Comments & Team Standards

10 prompts

Inline Review Comments From Findings

41/50

You are a senior reviewer who writes review comments people can act on immediately. <context> I know what is wrong with this pull request. I need the comments written so the author can apply them without a back-and-forth thread. </context> <inputs> - Diff with line numbers: [PASTE] - My findings in rough notes: [WHAT I NOTICED, HOWEVER MESSY] - Platform: [GITHUB, GITLAB, BITBUCKET] - Relationship: [PEER, MENTEE, EXTERNAL CONTRIBUTOR] - Severity bar for blocking: [WHAT I WILL BLOCK THE MERGE OVER] </inputs> <task> Turn each note into a single inline comment anchored to the right file and line, containing: what is wrong, why it matters in one sentence, and a concrete suggested change as a code suggestion block where the fix is small. Label each comment blocking, non-blocking, or question. Then write the overall review summary that states the decision and the shortest path to approval. </task> <constraints> - One issue per comment: never bundle three problems in one paragraph. - No "why did you", no "just", no rhetorical questions used as criticism. - If a note is really a preference, label it as such and say it is optional. </constraints> <format> Return a list of comments, each with file, line, label, and the paste-ready body, then the review summary comment. </format>

Converts messy review notes into anchored, labelled inline comments with suggestion blocks and a summary.

๐Ÿ’ก

Pro tip: Ask for suggestion blocks by name. Authors accept single-click suggestions far more often than they act on prose comments.

Kinder Rewrite of a Blunt Comment

42/50

You are an engineering manager who rewrites review feedback so it lands without losing its point. <context> I wrote a review comment that is technically right and reads as an attack. I want the substance kept and the sting removed. </context> <inputs> - My draft comment: [PASTE IT] - The code it refers to: [PASTE THE SNIPPET] - What outcome I actually want: [CHANGE THE CODE, UNDERSTAND THE CHOICE, SET A PRECEDENT] - Context about the author: [JUNIOR, SENIOR, UNDER DEADLINE, DIFFERENT TEAM] - How firm I need to be: [SUGGESTION / STRONG RECOMMENDATION / BLOCKING] </inputs> <task> Rewrite the comment at my stated firmness: state the concrete problem, the impact, and the requested change, and keep the technical judgment intact. Then show what you removed and why it was hurting the message. Give me a second version one notch firmer in case the first is ignored, and a version framed as a question for the case where I might be missing context. </task> <constraints> - Do not water down the technical position: soften the delivery only. - Remove sarcasm, exaggeration, and any reference to the person rather than the code. - Keep each version under 120 words. </constraints> <format> Return the three versions labelled by firmness, then a two-line note on what made the original land badly. </format>

Rewrites a harsh review comment at three firmness levels while keeping the technical judgment intact.

๐Ÿ’ก

Pro tip: Say what outcome you want. "Change the code" and "understand the choice" produce completely different comments, and mixing them starts threads.

Style Guide Conformance Check

43/50

You are a reviewer who checks code against a written style guide, and nothing else. <context> My team has conventions written down. I want a mechanical check of this diff against them so human review can focus on logic. </context> <inputs> - Our style guide or conventions: [PASTE THE RULES] - The diff or file: [PASTE] - Linter and formatter already running: [WHAT THEY COVER] - Rules that are hard requirements versus preferences: [WHICH ARE WHICH] - Language and framework idioms we follow: [E.G. HOOKS RULES, SERVICE LAYER PATTERN] </inputs> <task> Check every rule against the code and report only violations, each with the rule quoted, the offending line, and the corrected line. Skip anything the linter or formatter already enforces automatically and say what you skipped. Then flag any rule my guide does not cover but this diff clearly needs a decision on, and propose the wording for that new rule. </task> <constraints> - Never invent a rule that is not in the guide: mark those as proposals in a separate section. - Distinguish hard requirement violations from preference deviations. - Give the corrected code, not a description of the rule. </constraints> <format> Return a violations table (rule, line, fix), the skipped-because-automated list, then proposed additions to the guide. </format>

Mechanically checks a diff against your written conventions and proposes rules for gaps it exposes.

๐Ÿ’ก

Pro tip: Paste the guide verbatim and tell Claude what the linter already covers. Otherwise half the report is formatting your tooling fixes on save.

Naming and Readability Pass

44/50

You are an editor for code: you improve names and structure without changing behavior. <context> This code works and is hard to read. I want it clearer for the next person, with no functional change. </context> <inputs> - Code: [PASTE THE FILE OR FUNCTION] - Domain vocabulary we use: [THE WORDS THE BUSINESS USES FOR THESE CONCEPTS] - Language conventions: [CASING, NAMING PATTERNS, LENGTH NORMS] - Audience: [WHO READS THIS NEXT, HOW MUCH CONTEXT THEY HAVE] - Constraints: [PUBLIC API NAMES I CANNOT CHANGE] </inputs> <task> Propose a rename table for variables, functions, parameters, and types where the current name is vague, misleading, abbreviated, or inconsistent with the domain vocabulary, with the reason for each. Then flag readability issues: functions doing several things, boolean parameters that hide behavior, deep nesting that inverted guards would flatten, comments that restate code, and magic values that deserve a name. Give the rewritten code. </task> <constraints> - Zero behavior change: no reordering that alters side effects. - Respect the names I said are locked and mention them only if they conflict with the domain. - Prefer domain words over technical ones (data, info, manager, handler). </constraints> <format> Return the rename table (old, new, reason), the readability findings, then the rewritten code and a note on what a reviewer should re-verify. </format>

Produces a justified rename table plus readability fixes and rewrites the code without changing behavior.

๐Ÿ’ก

Pro tip: Give Claude the words your business actually uses. Renames aligned to domain language survive review, generic ones start bikeshedding.

Docstring and Comment Quality Review

45/50

You are a documentation reviewer for source code. <context> The comments in this code are either missing, outdated, or explaining the obvious, and I want them to earn their space. </context> <inputs> - Code with its current comments: [PASTE] - Doc style: [JSDOC, PYTHON DOCSTRINGS, GODOC, TSDOC] - Who reads these: [TEAMMATES, EXTERNAL API USERS, FUTURE ME] - Non-obvious constraints in this code: [PERFORMANCE, LEGAL, HISTORICAL REASONS] - Where generated docs are published: [IF ANYWHERE] </inputs> <task> Flag comments that restate the code, comments that contradict the code (say which one is stale), TODOs with no owner or context, and missing documentation on public functions: parameters, return value, thrown errors, side effects, and units or formats. Then write the comments that are actually missing, focusing on why decisions were made and what a caller must know, and delete the noise. </task> <constraints> - Prefer explaining why over what: the code already says what. - Every public function gets parameters, return, and failure modes documented. - Where you cannot know the intent, write the question I should answer instead of inventing a reason. </constraints> <format> Return a delete list, a rewrite list, and the new docstrings in my chosen style, ready to paste. </format>

Deletes redundant comments, flags stale ones, and writes the missing docstrings including failure modes.

๐Ÿ’ก

Pro tip: Ask it to mark unknown intent as a question rather than guessing. Invented rationale in a docstring is worse than no docstring.

Definition-of-Done Gate Check

46/50

You are a release gatekeeper who checks a change against a definition of done. <context> Before I approve a pull request I want a mechanical check that everything our process requires is actually present. </context> <inputs> - Our definition of done: [PASTE THE CHECKLIST, OR TELL CLAUDE WE HAVE NONE] - The pull request: [DIFF, DESCRIPTION, AND TICKET] - Ticket acceptance criteria: [PASTE] - Required artifacts: [TESTS, MIGRATION, CHANGELOG, DOCS, FEATURE FLAG, METRICS] - Environments it must work in: [BROWSERS, MOBILE, LOCALES, SELF-HOSTED] </inputs> <task> Check each acceptance criterion against the diff and mark it covered, partially covered, or missing, quoting the code that covers it. Then check the required artifacts: tests exercising the new behavior and not just the happy path, migration and rollback, docs and changelog, flag and kill switch, logging and metrics, and error states in the interface. End with the shortest list of additions needed to approve. </task> <constraints> - Quote code as evidence for anything you mark covered. - Say when a criterion cannot be verified from the diff alone and what to check manually. - If we have no definition of done, propose a 7-item one for this kind of change. </constraints> <format> Return a coverage table, the artifact checklist with pass or fail, then the minimal to-do list before approval. </format>

Checks a PR against acceptance criteria and required artifacts, with quoted evidence and a minimal to-do list.

๐Ÿ’ก

Pro tip: Paste the ticket acceptance criteria verbatim. The most expensive review misses are requirements that were never implemented, not bad code.

Team Code Review Checklist

47/50

You are a staff engineer writing the review standard for a specific codebase. <context> Reviews on my team are inconsistent: different reviewers catch different things and some pull requests get waved through. I want one checklist that fits our actual code. </context> <inputs> - Stack and architecture: [LANGUAGES, FRAMEWORKS, SERVICES, DATA STORES] - Our recurring incidents and bugs: [WHAT ACTUALLY BREAKS FOR US] - Team shape: [SIZE, SENIORITY MIX, WHO REVIEWS WHAT] - Automation in place: [LINTERS, TYPES, CI CHECKS, SCANNERS] - Review culture problems: [SLOW REVIEWS, RUBBER STAMPS, NITPICK WARS] </inputs> <task> Write a review checklist tailored to this codebase, split into: automated (do not review by hand), always check, check when the diff touches specific areas (auth, money, migrations, public API, background jobs), and explicitly out of scope for review. Derive the always-check items from our recurring incidents. Add a short section on review etiquette that addresses the culture problems I listed, plus response-time expectations by PR size. </task> <constraints> - Nothing on the manual list may be enforceable by tooling: move those to automated. - Cap always-check at 8 items so it gets used. - Every conditional item names the trigger that activates it. </constraints> <format> Return the checklist as a document artifact ready to commit as CODE_REVIEW.md, then the three items to automate next. </format>

Writes a codebase-specific review checklist derived from your real incidents, with automation and etiquette sections.

๐Ÿ’ก

Pro tip: Feed it your last five incidents. A checklist built from your own postmortems gets followed, a generic one gets ignored by week two.

PR Description and Changelog From a Diff

48/50

You are a technical writer who turns diffs into descriptions reviewers and users can read. <context> My diff is done and my pull request description is one line. I want a description that makes the review fast and a changelog entry that makes sense to users. </context> <inputs> - Diff: [PASTE] - Ticket or motivation: [WHY THIS EXISTS] - Audience for the changelog: [END USERS, API CONSUMERS, INTERNAL] - Testing I did: [MANUAL STEPS, AUTOMATED TESTS] - Risk and rollout notes: [FLAG, MIGRATION, DEPLOY ORDER] </inputs> <task> Write the pull request description: what changed and why, the approach and one alternative rejected with the reason, the files worth reviewing first, how to test it locally step by step, screenshots or output placeholders, and the risk and rollback note. Then write the changelog entry for my audience in their language, and a one-paragraph Slack message announcing the change. </task> <constraints> - Derive everything from the diff: do not invent behavior it does not contain. - The changelog entry describes user-visible effects, not implementation. - Keep the description scannable: no wall of text. </constraints> <format> Return three blocks: PR description in markdown, changelog entry, Slack announcement. </format>

Generates a reviewable PR description, a user-facing changelog entry, and a Slack announcement from a diff.

๐Ÿ’ก

Pro tip: Ask for the review order of files inside the description. Telling reviewers where to start is the single cheapest way to speed up a review.

Review Disagreement Decision Memo

49/50

You are a neutral principal engineer resolving a technical disagreement in a review. <context> A reviewer and I disagree about an approach, the thread is going in circles, and we need a decision instead of another round of comments. </context> <inputs> - The disagreement in one sentence: [WHAT IS CONTESTED] - Position A with its code: [PASTE THE ARGUMENT AND SNIPPET] - Position B with its code: [PASTE THE ARGUMENT AND SNIPPET] - Constraints that are real: [DEADLINE, TEAM SKILLS, EXISTING PATTERNS, SCALE] - What happens if we pick wrong: [COST OF REVERSING LATER] </inputs> <task> State the strongest version of each position, including the point each side is underweighting. Compare them on correctness, failure modes, maintenance cost, consistency with the existing codebase, and cost of reversal. Then make a call, with the conditions under which the other option becomes right, and the smallest change to the losing position that captures most of its value. </task> <constraints> - Take a position: no "both have merit" ending. - Weight cost of reversal heavily and say so. - No appeals to authority or principle names as arguments: use consequences. </constraints> <format> Return the steel-manned positions, a comparison table, the decision with its conditions, then a short thread reply that closes the discussion. </format>

Steel-mans both sides of a review argument, compares consequences, and returns a decision plus a thread-closing reply.

๐Ÿ’ก

Pro tip: Include the cost of reversing the decision later. It is usually the deciding factor and almost never mentioned in the actual thread.

Lint Rule Proposal From Recurring Nits

50/50

You are a developer experience engineer who automates repeated review feedback. <context> I keep leaving the same comments on different pull requests. Anything a human repeats more than twice should be a tool. </context> <inputs> - Comments I keep repeating: [PASTE THE RECURRING NITS] - Stack and tooling: [LANGUAGE, LINTER, FORMATTER, TYPE CHECKER, CI] - Example code that triggers each nit: [PASTE SNIPPETS] - Tolerance for false positives: [BLOCK CI / WARN ONLY] - Existing config: [PASTE YOUR LINT CONFIG IF SHORT] </inputs> <task> For each recurring comment, decide whether it can be enforced by an existing lint or type rule (name the exact rule and options), needs a custom rule, is better solved by an architectural change or a helper that makes the mistake impossible, or must stay human judgment. For the enforceable ones give the config to add and whether it should warn or error. For custom ones, sketch the rule logic and its false-positive risk. </task> <constraints> - Prefer making the mistake impossible over detecting it, when that option exists. - Say which rules will produce noise on the existing codebase and how to adopt them gradually. - Be honest about which nits cannot be automated and should be dropped instead. </constraints> <format> Return a table of nit, mechanism, exact rule or plan, severity, adoption note, then the config diff to commit. </format>

Turns your repeated review comments into lint rules, type constraints, or design changes with adoption notes.

๐Ÿ’ก

Pro tip: Ask which nits should simply be dropped. Some repeated comments are personal preference and automating them just moves the argument into CI.

Frequently Asked Questions

Copy a prompt, paste it into Claude, then replace the bracketed inputs with your own details and paste your diff or file where the prompt asks for it. Claude returns a structured review with findings, line references, and suggested patches instead of a vague opinion.
Claude handles a long file or a multi-file diff comfortably, but review quality drops as the diff grows because attention spreads thin. For diffs over roughly 1,000 changed lines, run the Large Diff Triage Plan first, then review the tier-one files in separate messages.
It can, especially when it cannot see a file the code depends on. That is why these prompts ask Claude to quote the exact line, give a triggering input, and name any missing file rather than guessing. Treat every finding as a hypothesis to verify, not a verdict.
No. It removes the mechanical layer, so mistakes, missing tests, unsafe queries, and swallowed errors are caught before a teammate opens the diff. Humans still own architecture calls, product judgment, and the context that never appears in the code.
Check your employer policy first. Many teams allow it on a business or enterprise plan where inputs are not used for training, and many do not allow it at all. Strip real credentials, customer data, and secrets before pasting, and paste variable names rather than values.
Yes, all 50 prompts are free to copy and use, in Claude or in any assistant that accepts long structured prompts.

Prompts are the starting line. Tutorials are the finish.

A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.

7-day free trial. Cancel anytime.