Code review & debugging21 categories
Find why this is slow
Something is sluggish and you don't yet know what to measure.
This code is slower than it should be. Help me find out why before I optimise anything. 1. What is the algorithmic complexity, and what dominates as input grows? 2. Where are the hidden costs โ allocations in a loop, repeated work, N+1 queries, re-renders, synchronous I/O? 3. Which of these would actually matter at my scale? Ask me for the input size if you need it. 4. What should I measure first to confirm, and how? Rank fixes by (impact รท effort). Explicitly tell me which optimisations are not worth doing. 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.
Chasing down a bug. Finding the cause when something fails, runs slow, or will not reproduce locally.
Related prompts
Help me reproduce this bugA bug report exists but you can't trigger it locally.Read this stack trace with meAn error you haven't seen before, with a trace that isn't obviously pointing anywhere.Rubber duck, but it asks questionsStuck, and not yet sure what you're even stuck on.Why is this failing?Something broke and you want candidates before you start guessing.Smallest fix that worksA bug you need gone now, not an architecture you need rebuilt.What should I log here?A path that will fail in production and tell you nothing.
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