Code review & debugging21 categories
Hunt for race conditions
Anything async, concurrent, or touching shared state.
Find the concurrency problems in this code. Consider: - Two calls arriving simultaneously - A call arriving while a previous one is mid-flight - Check-then-act sequences where state changes between the check and the act - Shared mutable state without synchronisation - Operations assumed atomic that aren't - Cleanup that runs while work is still in progress - Ordering assumptions that only hold by luck For each: the exact interleaving that breaks it, written as a timeline of two actors. Then the fix. Code:
Making it yours
- Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
- Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
- If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.
Reviewing a change. Passes you run over a diff before it merges: correctness, security, concurrency, migrations.
Related prompts
Review this diff, correctness firstThe default review pass before you merge anything.Try to prove this code wrongWhen a review came back clean and you don't believe it.Security pass on this changeAnything touching auth, user input, file paths, or the database.What tests am I missing?You wrote tests and want to know what you didn't think of.Is this migration safe to run?Before running a schema change against real data.Is this thread-safe?Shared state, async work, or anything two callers can reach at once.
Keep this one
Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free