/ancplua-skills:prompt-engineering-expertfrom ancplua-skills
Use when the user wants help writing, refining, debugging, or evaluating a prompt, system prompt, custom instruction, agent prompt, or skill description. Triggers on phrases like "improve this prompt", "why isn't Claude doing X", "write a system prompt for...", "review my instructions", "this prompt isn't working", "the model keeps doing Y", "how should I phrase this", or any request to design, fix, or analyze AI prompts. Also triggers when the user is iterating on Claude Code skills, agent instructions, CLAUDE.md / AGENTS.md files, description fields for triggering accuracy, few-shot example design, or debugging unexpected model output. Use this even when the user hasn't named prompt engineering explicitly — if they're discussing a prompt's behavior or how to phrase something for a model, this applies. Also use for Claude Fable 5 / Mythos 5 prompting — migrating prompts from older models, effort tuning, agentic behavior issues, or unexpected refusals.
Ships in ancplua-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You're being asked to help with a prompt — refine an existing one, write a new one, or debug why one isn't working. The instinct is to apply best-practice checklists. Resist that. Most prompt failures aren't from missing best practices; they're from prompts that haven't been pressure-tested against real failure cases, or that pile on instructions without explaining why those instructions matter.
The mental model that produces good prompts: today's LLMs are smart enough to handle ambiguity if you explain reasoning, but they aren't psychic. Write to the model like a competent colleague seeing the task for the first time — they need context and the why, not just rules. Heavy-handed MUSTs and ALL-CAPS commands are a code smell: usually you can replace them with a sentence explaining the reasoning, and the model will then handle adjacent cases you didn't anticipate.
Don't start by listing improvements. Diagnose first.
If the user hasn't run the prompt yet — they're writing it for the first time — skip diagnosis and go to drafting. But push back if they try to anticipate every edge case before seeing any real failures: that's a recipe for an overfit, brittle prompt.
Deeper diagnostic flowchart in references/failure-modes.md. Read it when the failure doesn't match a hypothesis above.
These earn their place inline because they apply almost every time.
Show, don't tell. A concrete input → desired-output example teaches the model what you want more reliably than any description of "what good looks like." If you're writing three sentences describing a desired output, replace them with one example.
Explain the why. When you constrain the model, briefly say why the constraint exists. "Don't use bullet points — this will be pasted into an email" gives the model leverage to handle cases you didn't list (it'll know to skip markdown headers too). "Don't use bullet points" gives it a rule that breaks the moment something analogous comes up.
Be specific in the way that matters for the task. Specificity is not word count. "Write a friendly customer service response" is vague even with ten adjectives. "Open by acknowledging the customer's frustration in their own words before offering a solution" is specific in a useful way.
Cut what isn't earning its place. Every instruction can collide with another instruction, attract attention away from what matters, or get followed too literally. The lean version is almost always better than the kitchen-sink version. When in doubt, remove.
Use XML tags when sections matter. When a prompt has parts the model needs to treat differently — context, the task, examples, a document to analyze — wrap them in XML tags. Claude is trained to recognize XML tags as structural; they work better than ### headers for separating roles of content. Don't invent semantic XML (no <if condition="...">, no <thinking_required>); use tags as containers, not as a fake DSL.
Don't ask the model to predict its own future. "Don't hallucinate", "be accurate", "don't make things up" aren't actionable for the model. Replace with constraints on what it should produce: "If you're not certain about a fact, say so explicitly rather than guessing" gives the model something it can actually do.
Calibrate to model strength. Modern Claude already does many things well by default — politeness, basic formatting, hedging on uncertain claims. Don't spend instruction budget on what's already default. Spend it on what's task-specific.
Deeper treatment, plus long-context placement, persona/role decisions, and tone calibration in references/principles.md.
Walk them through these questions before drafting:
CLAUDE.md / AGENTS.md (those are agent-loop instructions, not skills)? A skill's SKILL.md (loaded conditionally by the skill system)? Each has different conventions.Then draft. Then immediately try to think of a realistic case the draft handles poorly and revise. Don't ship a v1 that hasn't survived one round of adversarial reading.
For technique selection (when to use few-shot, when chain-of-thought helps vs. adds noise, prefilling, decomposition, extended thinking), read references/techniques.md.
Skill descriptions are special — they're the trigger deciding whether Claude consults the skill at all, not instructions for what to do once it does. The writing style is different.
A good skill description includes:
A description should err on the side of being "pushy" — Claude tends to under-trigger skills it would benefit from. Phrases like "use this even when the user hasn't explicitly asked for X" are appropriate when the skill applies to a recognizable class of situation.
Avoid meta-narrative: "this skill equips Claude with…", "comprehensive guidance on…", "deep expertise in…". The model isn't being sold on the skill; it's deciding whether to consult it given a specific user query.
If the user wants quantitative description optimization, point them at the skill-creator's description-optimization workflow — it generates trigger eval queries and iterates the description against them.
If the user's prompt, skill, or agent runs on Claude Fable 5 or Claude Mythos 5 — or they're migrating from Claude Opus 4.8 or earlier — read references/fable-5.md before proposing changes. Two things differ enough to change your default advice:
The reference contains field-tested copy-paste snippets indexed by symptom (verbosity, fabricated progress reports, unrequested actions, early stopping, context-budget anxiety, unreadable summaries) plus scaffolding patterns for long-running agents (send-to-user tool, subagents, memory files, effort selection).
Read these when the situation calls for them, not by default.
references/principles.md — fuller treatment of the principles above, plus long-context placement, persona/role decisions, when verbose personas hurt, and tone calibration.references/techniques.md — when each technique actually helps vs. just adds noise: few-shot, chain-of-thought, prefilling, XML structuring, decomposition, extended thinking, tool-use prompting, output structuring.references/failure-modes.md — diagnostic flowchart for common failure patterns: symptom → likely cause → minimum-viable fix.references/examples.md — before/after rewrites with commentary on what changed and why. Useful as concrete reference when explaining a recommendation.references/fable-5.md — model-specific guidance for Claude Fable 5 / Mythos 5: symptom-indexed fix snippets, scaffolding patterns for long-running agents, effort selection, and a migration checklist from Opus 4.8.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ancplua/ancplua-skills --plugin ancplua-skills43 skills in this plugin
/agent-log-scanScan agent transcripts and turn antipatterns into config and routine changes, not just an allowlist like fewer-permission-prompts. Use when asked to scan agent logs or session history, "why do my agents keep failing", "what happened across my sessions", to find retry loops, permission thrash, API dead-ends or limit interrupts, or raise autonomy./analyzer-purityKeep Roslyn analyzers, source generators and code fixes pure, loadable and cache-friendly inside every compiler host. Use when creating, changing, reviewing or packaging a netstandard2.0 project with IsRoslynComponent, EnforceExtendedAnalyzerRules or Microsoft.CodeAnalysis references, or when an RS1xxx/RS2xxx diagnostic, a sluggish IDE or a generator that reruns on every keystroke points at one./