Performance bottleneck hunt
Model notes: Give real measurements if you have them
Fill in the variables (optional — they're inserted live below):
This is slow: {{what_is_slow}} (currently ~{{current_time}}, target {{target_time}}).
Code / query:
```
{{code}}
```
1. Point out the likely hotspots and estimate their cost (big-O or I/O round trips).
2. Tell me how to measure before changing anything (profiler, EXPLAIN, timing logs) for {{stack}}.
3. Suggest fixes in order of effort vs impact. Don't sacrifice readability for micro-optimisations.
How to use it
- Fill the variables above, or replace each
{{variable}}after pasting. - Paste into your AI tool (ChatGPT, Claude, Gemini, Cursor, Claude Code, or a local model in Ollama/LM Studio).
- Review the output. Models make mistakes, especially with facts, numbers and code.
Get all 209 prompts + agent workflows
Every prompt as Markdown and JSON, 10 multi-step agent workflows, and 12 ready-made slash commands for Cursor and Claude Code. Instant zip download, one-time purchase.
More Debugging prompts
Debugging
Rubber-duck mode
Great for small local models
Variables: code_and_explanation
Be my rubber duck. I'll explain what my code is supposed to do, line by line. Your job:
- Ask one short clarifying question at a time.
- Point out any place where what I say and what the code does don't match.
- Don't give me the answer unless I ask "just tell me".
Here's the code and my explanation:
{{code_and_explanation}} Be my rubber duck. I'll explain what my code is supposed to do, line by line. Your job:
- Ask one short clarifying question at a time.
- Point out any place where what I say and what the code does don't match.
- Don't give me the answer unless I ask "just tell me".
Here's the code and my explanation:
{{code_and_explanation}}
Open & fill variables: Rubber-duck mode → Debugging
Bisect a regression
Any model
Variables: good_versionbad_versionsymptom
Something broke between {{good_version}} and {{bad_version}}. Symptom: {{symptom}}.
Walk me through using `git bisect` to find the commit: the exact commands, how to write an automated test script for `git bisect run` for this symptom, and what to do when I find the commit (how to read it, revert vs fix-forward). Something broke between {{good_version}} and {{bad_version}}. Symptom: {{symptom}}.
Walk me through using `git bisect` to find the commit: the exact commands, how to write an automated test script for `git bisect run` for this symptom, and what to do when I find the commit (how to read it, revert vs fix-forward).
Open & fill variables: Bisect a regression → Debugging
Minimal reproduction builder
Any model
Variables: bug_descriptioncode_or_setup
Help me turn this bug into a minimal reproduction I can share or debug in isolation.
Bug: {{bug_description}}
Current code / setup:
{{code_or_setup}}
1. List everything in my setup that is probably NOT needed to trigger the bug (extra routes, styling, auth, unrelated dependencies, real data).
2. Give me a removal plan: remove one thing, re-run, check the bug is still there. If it disappears, that piece matters, so put it back and note it.
3. Draft the smallest standalone version you think will still show the bug: one file or a short script, with exact versions of anything it depends on.
4. Tell me what to include with it: expected result, actual result and environment details.
Say clearly which parts of the draft are guesses I need to confirm. Help me turn this bug into a minimal reproduction I can share or debug in isolation.
Bug: {{bug_description}}
Current code / setup:
{{code_or_setup}}
1. List everything in my setup that is probably NOT needed to trigger the bug (extra routes, styling, auth, unrelated dependencies, real data).
2. Give me a removal plan: remove one thing, re-run, check the bug is still there. If it disappears, that piece matters, so put it back and note it.
3. Draft the smallest standalone version you think will still show the bug: one file or a short script, with exact versions of anything it depends on.
4. Tell me what to include with it: expected result, actual result and environment details.
Say clearly which parts of the draft are guesses I need to confirm.
Open & fill variables: Minimal reproduction builder → Debugging
Find the signal in a noisy log
Long-context model; remove secrets and personal data before pasting
Variables: what_went_wrongtime_windowlog
Something went wrong: {{what_went_wrong}}. Approximate time: {{time_window}}.
Here's the log:
```
{{log}}
```
1. Ignore routine noise. List the lines that look abnormal, with timestamps: errors, warnings, retries, unusual gaps in time, and messages that only appear around the incident.
2. Put them in order and tell the story of what probably happened, step by step.
3. Mark the earliest line that looks like the start of the problem rather than a side-effect.
4. Say what's missing from the log that would confirm your theory, and what to log next time.
Quote log lines exactly; don't paraphrase them. Something went wrong: {{what_went_wrong}}. Approximate time: {{time_window}}.
Here's the log:
```
{{log}}
```
1. Ignore routine noise. List the lines that look abnormal, with timestamps: errors, warnings, retries, unusual gaps in time, and messages that only appear around the incident.
2. Put them in order and tell the story of what probably happened, step by step.
3. Mark the earliest line that looks like the start of the problem rather than a side-effect.
4. Say what's missing from the log that would confirm your theory, and what to log next time.
Quote log lines exactly; don't paraphrase them.
Open & fill variables: Find the signal in a noisy log → New prompts every week
One short email a week: new tested prompts and agent workflows. Free. Unsubscribe any time.