PlaygroundCatalog › Prompt Optimizer
PO

Prompt Optimizer

🔵 Stable🕐 updated 2026-06-29 🔷 SkillSpec L3 pm-ai

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.

▶ Run it free — no key needed 📝 Grade your existing draft View SKILL.md ↗

What to give it

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 one-shot or part of a chain, and any hard constraints (length, JSON, latency).

✅ The bar it holds itself to

Every skill in this library self-verifies — these are this skill's own quality checks, straight from its definition.

The rewrite has an explicit output contract (format/schema), not just a description of the task
Each change is tied to a specific symptom — no cosmetic edits presented as fixes
Grounding/uncertainty is handled (the model is allowed to say "I don't know")
Few-shot examples are included only where a pattern must be demonstrated, not by default
A test set with at least one edge case and one negative case is provided
The prompt is ready to paste — no placeholders left unfilled

⚠️ What it refuses to do

Do not return a critique without the rewritten prompt — the rewrite is the deliverable
Do not pile on every technique at once — apply the levers that match the diagnosed failure, and say why
Do not add examples that contradict the instructions — the model copies the example over the rule
Do not make the prompt longer when the fix is to make instructions clearer and earlier
Do not claim a fix works without a way to test it — ship the test set

Install

npx pm-claude-skills add --agent claude   # or codex · cursor · gemini · hermes
# or one-line MCP (every skill, any client):
claude mcp add pm-skills -- npx -y pm-claude-skills-mcp

Related skills

🔌 Embed this skill

Drop this on your blog, docs, or site — it renders a "Run this skill" card:

<div data-pm-skill="prompt-optimizer"></div>
<script src="https://mohitagw15856.github.io/pm-claude-skills/embed.js" async></script>

💬 Discussion

Prompt Optimizer is one of 750 open-source professional AI agent skills — all SkillSpec L3. Try them all in the browser · ⭐ Star on GitHub · Browse the full catalog