Code review & debugging
Most code review prompts fail the same way: you ask "is this good?" and get told yes. The prompts below are written to avoid that. They ask for specific lines, force a verdict, and in several cases explicitly instruct the model to try to prove the code wrong rather than praise it. Use them on a diff you are about to merge, a bug you cannot reproduce, or a file you inherited and do not trust yet.
36 prompts in 5 groups
Code review & debugging21 categories
Reviewing a change
Passes you run over a diff before it merges: correctness, security, concurrency, migrations.
- Review this diff, correctness firstLongThe default review pass before you merge anything.
- Try to prove this code wrongLongWhen a review came back clean and you don't believe it.
- Security pass on this changeLongAnything touching auth, user input, file paths, or the database.
- What tests am I missing?LongYou wrote tests and want to know what you didn't think of.
- Is this migration safe to run?LongBefore running a schema change against real data.
- Hunt for race conditionsLongAnything async, concurrent, or touching shared state.
- Is this thread-safe?ShortShared state, async work, or anything two callers can reach at once.
- Bug or intended?ShortOdd-looking code that might be deliberate and might be a landmine.
- Boundary check, nothing elseMediumA function you trust in the middle and not at the edges.
- What would a sceptic ask?MediumA change you think is ready and want stress-tested first.
Chasing down a bug
Finding the cause when something fails, runs slow, or will not reproduce locally.
- Help me reproduce this bugLongA bug report exists but you can't trigger it locally.
- Read this stack trace with meLongAn error you haven't seen before, with a trace that isn't obviously pointing anywhere.
- Find why this is slowLongSomething is sluggish and you don't yet know what to measure.
- Rubber duck, but it asks questionsLongStuck, and not yet sure what you're even stuck on.
- Why is this failing?ShortSomething broke and you want candidates before you start guessing.
- Smallest fix that worksShortA bug you need gone now, not an architecture you need rebuilt.
- What should I log here?ShortA path that will fail in production and tell you nothing.
- Second opinion on my fixMediumYou have a fix that works and want to know if it fixes the right thing.
Understanding code you inherited
Making sense of an unfamiliar file, line or regex before you dare change it.
- Explain this unfamiliar codeLongInherited a file and need to understand it before touching it.
- Plan for touching legacy codeLongYou need to change something nobody understands and there are no tests.
- Explain this lineShortA single line you keep re-reading without it landing.
- What is this regex doing?ShortA regex you inherited and are afraid to touch.
- What breaks if I delete this?ShortCode that looks dead but you don't trust the search results.
Refactoring and design calls
Cutting code down, naming things properly, and choosing between two workable options.
- Delete as much of this as possibleLongCode that works but feels bigger than the problem.
- Better names for these thingsMediumWhen you've written `data2`, `handleThing`, or `utils`.
- Improve these error messagesMediumErrors that say "something went wrong".
- Critique this API designLongBefore other people start depending on an interface you're designing.
- Should I add this dependency?LongBefore `npm install` on something you could write yourself.
- Name this functionShortYou've called it doThing and you know it.
- Two fixes, pick oneMediumTwo plausible approaches and no strong feeling about either.
Writing the change up
Commit messages, PR descriptions, and review feedback that lands the way you meant it.
- Commit message from a diffMediumEvery commit. Especially the ones you'd otherwise call "fix stuff".
- Write the PR descriptionLongOpening a pull request someone else has to review.
- Check my review before I post itLongBefore sending feedback that might land harder than you intended.
- One-line summary of this diffShortFilling in a PR title or a standup note.
- Rank my review commentsMediumBefore you post a review with fifteen comments on it.
- Explain this bug to a teammateMediumWriting the incident note or the message that goes in the channel.
Got one that isn't here?
Send a prompt you keep coming back to. A person reads every one.
Suggest a prompt