prompt-optimizer
Diagnose and rewrite an underperforming LLM prompt so it produces reliable, well-structured output. Use when asked to improve a prompt, fix a prompt that gives inconsistent or wrong results, reduce hallucination/refusals, or make output follow a format. Produces a rewritten prompt with a diagnosis of what was failing, the specific changes and why, and a small test set to verify the fix.
npx skills add mohitagw15856/pm-claude-skills --skill prompt-optimizer --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Prompt Optimizer Skill A weak prompt fails in patterned ways — vague task, no output contract, buried instructions, no examples, or asking for judgement with nothing to ground it. This skill diagnoses *which* failure mode is in play and rewrites the prompt to fix it, then hands you a way to check the fix held — so "it's flaky" becomes a specific, testable change rather than another round of fiddling. ## Working from a brief You'll often get just the prompt and a vague "it's not working". **Always deliver a full rewrite anyway** — infer the intended task and output from the prompt's wording, state your assumptions, and rewrite. If the failing behaviour wasn't described, infer the most likely failure mode from the prompt's structure and say so. Never hand back only a critique with no rewritten prompt. ## Required Inputs Ask for these only if they aren't already provided (else infer and label): - **The current prompt** — the exact text being used. - **What's going wrong** — wrong answers, inconsistent format, refusals, too long/short, hallucinated facts. - **The desired output** — what a perfect response looks like (a sample is ideal). - **Context** — the model/runtime, whether it's
- Working from a brief
- Required Inputs
- Output Format
- Prompt Diagnosis & Rewrite
- Quality Checks
- Anti-Patterns
- Based On
What does the prompt-optimizer skill do?
Diagnose and rewrite an underperforming LLM prompt so it produces reliable, well-structured output. Use when asked to improve a prompt, fix a prompt that gives inconsistent or wrong results, reduce hallucination/refusals, or make output follow a format. Produces a rewritten prompt with a diagnosis of what was failing, the specific changes and why, and a small test set to verify the fix.
How do I install it?
Run `npx skills add mohitagw15856/pm-claude-skills --skill prompt-optimizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From mohitagw15856/pm-claude-skills, a repository with 1,255 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
