Best for
- Designing the system prompt for a new LLM-powered feature.
- Building a few-shot template with dynamic example selection.
- Adding chain-of-thought reasoning to a low-accuracy prompt.
event4u-app/agent-config/src/skills/prompt-engineering-patterns/SKILL.md
Use when designing production-LLM prompts — few-shot, chain-of-thought, system prompts, templates, self-verification — distinct from prompt-optimizer and refine-prompt.
Decision brief
Production patterns for LLM prompts: few-shot, chain-of-thought, system-prompt design, templating, self-verification. Distinct surface from sibling skills:
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/prompt-engineering-patterns"Inspect the Agent Skill "prompt-engineering-patterns" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/prompt-engineering-patterns/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Escalating without evidence is over-engineering. Each level adds tokens, latency, and a maintenance surface.
Fixed instruction hierarchy — every production prompt fills these slots in order:
Bad examples are worse than no examples — the model imitates structure.
CoT improves accuracy on multi-step reasoning, hurts on classification and lookup. Decision rule:
Production prompts handle their own failure cases:
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 96/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Production patterns for LLM prompts: few-shot, chain-of-thought, system-prompt design, templating, self-verification. Distinct surface from sibling skills:
prompt-optimizer — polishes a single end-user prompt for ChatGPT / Claude / Gemini.refine-prompt — refines a free-form work prompt into engine-ready acceptance criteria.Do NOT use when:
prompt-optimizer.refine-prompt.Start at Level 1; only escalate when measurement says you must.
Level 1 Direct instruction "Summarize this article."
Level 2 + constraints (length, format, focus) "...in 3 bullets, key findings only."
Level 3 + reasoning scaffold "Read first, identify findings, then summarize."
Level 4 + few-shot examples "Like these examples: ..."
Level 5 + self-verification step "...then check answer against criteria; revise if fails."
Escalating without evidence is over-engineering. Each level adds tokens, latency, and a maintenance surface.
Fixed instruction hierarchy — every production prompt fills these slots in order:
[System context] role, expertise, constraints, safety
[Task instruction] what to do, in one sentence
[Examples] few-shot demonstrations (optional)
[Input data] the user-supplied content
[Output format] schema, length, citation rules
Stable slots (system, task, format) belong in cached prompt prefixes; volatile slots (examples, input) belong in the per-call portion.
Examples are uniform and small (< 20) → embed all of them; deterministic.
Examples are large or diverse → semantic-similarity retrieval per call.
Edge cases dominate → diversity-sampled examples (cluster + pick one per cluster).
Token budget tight → fewer, higher-quality examples beats many mediocre.
Examples drift with the data → regenerate from a labeled corpus on a schedule, not hand-edited.
Bad examples are worse than no examples — the model imitates structure.
CoT improves accuracy on multi-step reasoning, hurts on classification and lookup. Decision rule:
Task is multi-step / arithmetic / multi-hop → add CoT (zero-shot "let's think step by step", or few-shot CoT).
Task is single-step extraction / classify → CoT adds tokens without lift; skip.
You haven't measured → measure first, decide second.
Self-consistency needed (high-stakes answers) → sample N reasoning paths, majority vote.
Production prompts handle their own failure cases:
prompt-optimizer, refine-prompt, mcp-builder, async-python-patterns.agents/settings/contexts/skills-provenance.yml (entry: prompt-engineering-patterns).verify-before-complete, skill-quality, non-destructive-by-default.Alternatives
wshobson/agents
This skill should be used when the user asks to "optimize a prompt", "improve prompt performance", "design a prompt template", "write better prompts", "debug prompt issues", "use chain-of-thought", "structured prompting", "few-shot prompting", or wants to apply advanced prompt engineering patterns for production LLM applications.
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
event4u-app/agent-config
Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.
event4u-app/agent-config
Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.