plugins/pm-ai/skills/prompt-optimizer/SKILL.md
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 skillsauth add mohitagw15856/pm-claude-skills prompt-optimizerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
Ask for these only if they aren't already provided (else infer and label):
1. Diagnosis — the specific failure mode(s), each tied to the line that causes it:
| Symptom | Likely cause | Fix applied | |---|---|---| | Inconsistent format | no explicit output contract | added a schema + example | | Hallucinated details | asked to answer without grounding | added "use only the provided context; say what's unknown" | | Ignores an instruction | buried mid-paragraph | moved to a numbered rule near the top |
2. Rewritten prompt — the full new prompt in a fenced block, ready to paste. Apply the levers that fit: role + task in the first lines, an explicit output contract (structure/schema + a short example), grounding rules ("answer only from X; if unknown, say so"), constraints stated as rules not prose, and 1–3 few-shot examples when the task needs a demonstrated pattern.
3. What changed and why — a short bullet list mapping each edit to the symptom it addresses.
4. Test set — 3–5 concrete inputs (incl. an edge case and a "should refuse / say unknown" case) and the expected output for each, so the user can confirm the rewrite behaves before shipping.
Prompt-engineering practice — explicit output contracts, grounding/uncertainty handling, structured instructions, and example-driven demonstration.
business
Analyze why deals are won and lost and turn it into an action plan. Use when asked to run a win/loss analysis, review closed-won and closed-lost deals, understand why the team is losing to a competitor, or summarize sales feedback into patterns. Produces a structured win/loss report with themes, win/loss rates by segment and competitor, representative quotes, and prioritized actions for product, marketing, and sales.
development
Route a fuzzy request to the right skill in this library. Use when the user is unsure which skill fits, asks 'which skill should I use for X', describes a task without naming a skill, or when a request could plausibly match several skills. Produces a best-fit recommendation with the inputs to gather, a runner-up with the tie-breaker, and a workflow recipe when the job spans multiple skills.
testing
Triage a vulnerability or scanner finding — assess real severity, exploitability, and how urgently to fix. Use when asked to triage a CVE, prioritize scanner/pentest findings, assess a vuln's risk, or decide what to patch first. Produces a triage verdict: CVSS-informed severity adjusted for your context, exploitability, real risk, a fix/mitigation, and an SLA — so you fix what matters, not just what's red.
development
Stand up a Voice of Customer (VoC) program that turns feedback into action. Use when asked to build a VoC program, design a customer feedback loop, consolidate feedback sources, or set up a closed-loop feedback process. Produces a VoC program design — objectives, feedback sources and channels, a taxonomy, collection and analysis cadence, closed-loop routing, ownership, and success metrics.