# prompt-engineering-expert

Prompt Engineering Expert

Overview
This skill helps you design prompts and agent instructions that produce reliable, high-quality outputs in production workflows. The goal is consistency and decision-grade quality, not one-off "good answers."

For a one-person company, better prompts mean lower revision cost, faster execution, and more predictable automation.

Use with [skill-creator](./advanced-skill-creator.md), [constraint-analysis](./constraint-analysis.md), and [test-master](./test-master.md).

When to Use This Skill
- Outputs are inconsistent across similar requests.
- Agents miss constraints or required formats.
- You are building reusable workflows for recurring tasks.
- You need a measurable prompt iteration process.

What This Skill Does
- Designs clear system and task prompts.
- Defines output schemas and acceptance checks.
- Adds examples where they improve reliability.
- Creates a repeatable test loop for prompt changes.

Prompt Design Framework

## 1) Define Outcome and Constraints
State:
- exact output type,
- required sections/fields,
- forbidden behaviors,
- quality criteria.

## 2) Add Context Hierarchy
Order context by importance:
1. hard constraints,
2. user objective,
3. supporting references,
4. style preferences.

## 3) Specify Output Contract
Use explicit structure (markdown template, JSON schema, checklist).

## 4) Add Examples Selectively
Include one or two strong examples when structure is complex.
Avoid overfitting by copying too many examples.

## 5) Test and Iterate
For each prompt version:
- run 5-10 representative cases,
- score pass/fail against criteria,
- identify systematic failures,
- revise smallest possible section.

Practical Prompt Skeleton
```text
Role: <who the model is in this task>
Goal: <single clear objective>
Inputs: <what data is available>
Constraints: <non-negotiable rules>
Output format: <exact structure>
Quality bar: <what good looks like>
Failure mode handling: <what to do when data is missing>
```

Common Mistakes to Avoid
- Vague goals without measurable output requirements.
- Too many style constraints and too few business constraints.
- No explicit fallback behavior for missing data.
- Changing multiple prompt variables at once during tests.

Definition of Done
Prompt engineering work is complete when outputs pass your acceptance checks consistently across real task variants, with minimal manual correction.
