📈 Coding · Free AI Prompt

Performance Doctor

Finds why your code or query is slow — measured, ranked bottlenecks with the expected speedup of each fix, not folklore optimization.

🛠 Works with: Claude, ChatGPT or Cursor
1
Copy the prompt
One click on the button below.
2
Fill the {BRACKETS}
Replace placeholders with your details.
3
Paste & send
Into Claude, ChatGPT or Cursor.
Diagnose the performance of my {CODE / SQL QUERY / ENDPOINT}. Symptoms: {WHAT'S SLOW, HOW SLOW, AT WHAT SCALE — "fine with 100 rows, dies at 100k"}. Environment: {LANGUAGE/DB + anything relevant}.
Method — measure before optimizing:
1. INSTRUMENT FIRST: tell me exactly how to measure where time goes (the profiler command, the
EXPLAIN ANALYZE, the timing wrapper) so we're not guessing.
2. HYPOTHESES: the 3 most likely bottlenecks for this pattern and scale, ranked — with the
tell-tale signature each would show in the measurement.
3. Once identified (or for your top hypothesis now), THE FIX: corrected code/query, with expected order-of-improvement ("this turns O(n²) into O(n log n) — at your 100k rows, roughly 1000× fewer operations").
4. THE HIERARCHY check — in order, because each level dwarfs the next: algorithm choice → I/O and round-trips (N+1 queries, network calls in loops) → memory allocation patterns →
micro-optimizations. Refuse to micro-optimize if a higher level is unfixed.
5. GUARD: a simple benchmark/assertion to keep in place so this regression can't sneak back.
CODE/QUERY: {PASTE}
🔎 Senior Code Review
Paste any code for a structured review — bugs, security, performance — ranked by severity,…
🔬 Test Suite That Catches Real Bugs
Generates tests that hunt bugs instead of confirming happy paths — edge cases, failure mod…
🛡️ Security Audit (OWASP Mode)
A dedicated security review of your code against the OWASP Top 10 — attack scenarios, seve…
🐞 Debug With Me (Socratic Mode)
Systematic bug diagnosis instead of guessed fixes — hypotheses, tests, root cause — like p…
Browse the full prompt library →
📬 The 5 best new AI tools, every Tuesday
One short email. No spam, unsubscribe anytime.