Prompt Debugging
When a prompt misbehaves, most people randomly reword it until something sticks — slow, and it doesn't teach you anything. Prompts fail in diagnosable ways: ambiguity, missing context, a format the model can't follow, or instructions that contradict each other. This finds the actual failure, applies the targeted fix, and names the principle — so you fix it once and stop hitting the same wall.
What This Skill Produces
- A diagnosis — the specific failure mode: ambiguous ask, missing context, unspecified output format, conflicting instructions, buried key instruction, or too much at once
- The targeted fix — the change that addresses that failure, not a superstitious reword
- A corrected prompt — rewritten to fix the diagnosed problem, with the change explained
- A generalization check — testing that the fix works across cases, not just the one example (the trap of overfitting to a single output)
- The principle — the underlying rule (be specific, show the format, resolve conflicts, front-load the key instruction) so you recognize it next time
- When it's the model, not the prompt — the honest call when the task is beyond what prompting fixes
Required Inputs
Ask for these if not provided:
- The prompt — the actual text that's misbehaving
- What it's doing wrong — ignoring an instruction, wrong format, inconsistent, off-topic
- What you want — the correct output, ideally with an example
- The pattern — does it fail always or sometimes (points at ambiguity vs. a hard miss)
Framework: Diagnose Before You Reword
- Name the failure mode. Match the symptom to a cause — ignored instructions often mean it's buried or conflicting; inconsistent output usually means ambiguity; wrong shape means the format wasn't specified.
- Fix that cause specifically. Ambiguous → add specificity; missing context → add it; no format → show the exact format; conflict → resolve it; buried → move the key instruction up front.
- Show, don't just tell. For format and quality problems, an example of the desired output fixes more than paragraphs of description.
- Check it generalizes. Re-test on several cases — a fix that only works on your one example is overfitting, not a fix.
- Extract the principle. Name the rule behind the fix so the next prompt starts right.
- Know when to stop. If the task genuinely exceeds the model or needs tools/context it can't have, say so instead of endless rewording.
Output Format
Prompt debug: [what's failing]
Diagnosis: [the specific failure mode — ambiguity / missing context / no format / conflict / buried / overloaded].
The fix: [the targeted change for that cause].
Corrected prompt:
[rewritten prompt].
Generalization check: [test across cases, not just the one example].
Principle: [the rule — so you avoid it next time].
If it's not the prompt: [when the task exceeds prompting → what's actually needed].
Quality Checks
Anti-Patterns
- Randomly rewording until something works, learning nothing.
- Fixing to one example and overfitting.
- Adding more words when the issue is a conflict or buried instruction.
- Describing the format instead of showing it.
- Blaming the model when the prompt is fixable — or the reverse.
Example Trigger Phrases
- "Why isn't my prompt working?"
- "The AI keeps ignoring one of my instructions — why?"
- "My prompt gives me different results every time."
- "Help me fix this prompt, it's not doing what I want."
- "How do I get consistent output from this prompt?"
1---2name: prompt-debugging-23description: Figure out why a prompt isn't working and fix it — diagnose the actual failure (ambiguity, missing context, wrong format, conflicting instructions) instead of randomly rewording. Use when asked why isn't my prompt working, the AI keeps ignoring my instructions, my prompt gives inconsistent results, or how do I fix this prompt. Produces a diagnosis of the specific failure mode, the targeted fix for it (not a vibes rewrite), a corrected prompt, a check that it generalizes rather than fixing one case, and the principle behind the fix so you stop hitting it — turning prompt frustration into a debuggable, repeatable process.4---56# Prompt Debugging78When a prompt misbehaves, most people randomly reword it until something sticks — slow, and it doesn't teach you anything. Prompts fail in diagnosable ways: ambiguity, missing context, a format the model can't follow, or instructions that contradict each other. This finds the actual failure, applies the targeted fix, and names the principle — so you fix it once and stop hitting the same wall.910## What This Skill Produces1112- **A diagnosis** — the specific failure mode: ambiguous ask, missing context, unspecified output format, conflicting instructions, buried key instruction, or too much at once13- **The targeted fix** — the change that addresses *that* failure, not a superstitious reword14- **A corrected prompt** — rewritten to fix the diagnosed problem, with the change explained15- **A generalization check** — testing that the fix works across cases, not just the one example (the trap of overfitting to a single output)16- **The principle** — the underlying rule (be specific, show the format, resolve conflicts, front-load the key instruction) so you recognize it next time17- **When it's the model, not the prompt** — the honest call when the task is beyond what prompting fixes1819## Required Inputs2021Ask for these if not provided:22- **The prompt** — the actual text that's misbehaving23- **What it's doing wrong** — ignoring an instruction, wrong format, inconsistent, off-topic24- **What you want** — the correct output, ideally with an example25- **The pattern** — does it fail always or sometimes (points at ambiguity vs. a hard miss)2627## Framework: Diagnose Before You Reword28291. **Name the failure mode.** Match the symptom to a cause — ignored instructions often mean it's buried or conflicting; inconsistent output usually means ambiguity; wrong shape means the format wasn't specified.302. **Fix that cause specifically.** Ambiguous → add specificity; missing context → add it; no format → show the exact format; conflict → resolve it; buried → move the key instruction up front.313. **Show, don't just tell.** For format and quality problems, an example of the desired output fixes more than paragraphs of description.324. **Check it generalizes.** Re-test on several cases — a fix that only works on your one example is overfitting, not a fix.335. **Extract the principle.** Name the rule behind the fix so the next prompt starts right.346. **Know when to stop.** If the task genuinely exceeds the model or needs tools/context it can't have, say so instead of endless rewording.3536## Output Format3738### Prompt debug: [what's failing]3940**Diagnosis:** [the specific failure mode — ambiguity / missing context / no format / conflict / buried / overloaded].41**The fix:** [the targeted change for that cause].42**Corrected prompt:**43> [rewritten prompt].4445**Generalization check:** [test across cases, not just the one example].46**Principle:** [the rule — so you avoid it next time].47**If it's not the prompt:** [when the task exceeds prompting → what's actually needed].4849## Quality Checks50- [ ] Diagnoses a specific failure mode before rewriting51- [ ] Applies the fix that matches the cause52- [ ] Uses an example where the problem is format/quality53- [ ] Checks the fix generalizes beyond one case54- [ ] Names the principle; flags when it's a model limit, not a prompt one5556## Anti-Patterns57- **Randomly rewording** until something works, learning nothing.58- **Fixing to one example** and overfitting.59- **Adding more words** when the issue is a conflict or buried instruction.60- **Describing the format** instead of showing it.61- **Blaming the model** when the prompt is fixable — or the reverse.6263## Example Trigger Phrases64- "Why isn't my prompt working?"65- "The AI keeps ignoring one of my instructions — why?"66- "My prompt gives me different results every time."67- "Help me fix this prompt, it's not doing what I want."68- "How do I get consistent output from this prompt?"