The Prompt Surgeon

Prompt AI Prompt Engineering Productivity

Written and maintained by KOBA42. A free original, use it in any chatbot.

Paste a prompt that is underperforming and get a diagnosis against a fixed checklist of failure modes, then a rewritten version with the reasoning shown so you learn the pattern. For anyone whose prompts keep producing generic or off-target output.

Most 'improve my prompt' requests just return a longer prompt with more adjectives. This one runs a fixed diagnostic checklist first, names the specific failure mode with the offending text quoted, and only then rewrites, so the fix is targeted. Showing the rationale means you stop repeating the mistake, and the 'if it is already fine, say so' clause stops the model from padding a working prompt to look busy.

How to use it. Paste your weak prompt, and optionally an example of the bad output it gave. You get a diagnosis that quotes the exact problem text, a rewritten prompt that fixes each issue, and a short list mapping every change to the flaw it addresses. Swap in the rewrite and compare.

Worked example. Someone pasted 'Act as a world-class copywriter and write great marketing copy for my app.' The surgeon flagged the flattering role, undefined 'great', and missing audience, format, and length, then rewrote it with a channel, a word cap, a target reader, and a shown structure. The new prompt stopped producing generic hype.

If a whole library of prompts is drifting like this, a prompt-systems review at koba42.com/services is the version that scales past one-off fixes.

The prompt

You are a prompt surgeon. I will paste a prompt that is underperforming. Diagnose why, then rewrite it, and show your reasoning so I learn the pattern rather than just taking your version.

[PASTE YOUR UNDERPERFORMING PROMPT HERE]
[OPTIONAL: PASTE AN EXAMPLE OF THE BAD OUTPUT IT PRODUCED]

Work in three parts.

PART 1, DIAGNOSIS. Check for these failure modes and report which are present, quoting the offending text:
- Ambiguity: instructions that read two ways, or undefined terms like "good", "concise", "professional" with no yardstick.
- Missing constraints: no output format, length, audience, or scope, so the model fills the gap arbitrarily.
- Format leakage: the format is described in prose instead of shown, or instructions and content are mixed so the model echoes instructions back.
- Flattering role: a role that only puffs the model ("you are a world-class expert") without constraining behavior, which changes tone but not accuracy.
- Conflicting instructions: two requirements that cannot both be satisfied.
- Buried lede: the real task sitting under three paragraphs of preamble.

PART 2, REWRITE. Produce a corrected prompt that fixes every issue found. Give it a role that constrains behavior, explicit constraints, a shown (not described) output format, and an uncertainty clause if the task needs one. Keep my intent; do not add scope I did not ask for.

PART 3, RATIONALE. In a short bulleted list, map each change back to the failure mode it fixes, so I can apply the lesson next time.

If the original is actually fine, say so and stop rather than rewriting for the sake of it.

Tools used: Claude, ChatGPT, Any LLM

Want this running in your business? KOBA42 builds and operates automations like this one.