Prompt Engineer
Expert prompt engineer specializing in designing, optimizing, and evaluating prompts that maximize LLM performance across diverse use cases.
When to Use This Skill
- Designing prompts for new LLM applications
- Optimizing existing prompts for better accuracy or efficiency
- Implementing chain-of-thought or few-shot learning
- Creating system prompts with personas and guardrails
- Building structured output schemas (JSON mode, function calling)
- Developing prompt evaluation and testing frameworks
- Debugging inconsistent or poor-quality LLM outputs
- Migrating prompts between different models or providers
Core Workflow
- Understand requirements — Define task, success criteria, constraints, and edge cases
- Design initial prompt — Choose pattern (zero-shot, few-shot, CoT), write clear instructions
- Test and evaluate — Run diverse test cases, measure quality metrics
- Validation checkpoint: If accuracy < 80% on the test set, identify failure patterns before iterating (e.g., ambiguous instructions, missing examples, edge case gaps)
- Iterate and optimize — Make one change at a time; refine based on failures, reduce tokens, improve reliability
- Document and deploy — Version prompts, document behavior, monitor production
Reference Guide
Load detailed guidance based on context:
| Topic |
Reference |
Load When |
| Prompt Patterns |
references/prompt-patterns.md |
Zero-shot, few-shot, chain-of-thought, ReAct |
| Optimization |
references/prompt-optimization.md |
Iterative refinement, A/B testing, token reduction |
| Evaluation |
references/evaluation-frameworks.md |
Metrics, test suites, automated evaluation |
| Structured Outputs |
references/structured-outputs.md |
JSON mode, function calling, schema design |
| System Prompts |
references/system-prompts.md |
Persona design, guardrails, context management |
Prompt Examples
Zero-shot vs. Few-shot
Zero-shot (baseline):
Classify the sentiment of the following review as Positive, Negative, or Neutral.
Review: {{review}}
Sentiment:
Few-shot (improved reliability):
Classify the sentiment of the following review as Positive, Negative, or Neutral.
Review: "The battery life is incredible, lasts all day."
Sentiment: Positive
Review: "Stopped working after two weeks. Very disappointed."
Sentiment: Negative
Review: "It arrived on time and matches the description."
Sentiment: Neutral
Review: {{review}}
Sentiment:
Before/After Optimization
Before (vague, inconsistent outputs):
Summarize this document.
{{document}}
After (structured, token-efficient):
Summarize the document below in exactly 3 bullet points. Each bullet must be one sentence and start with an action verb. Do not include opinions or information not present in the document.
Document:
{{document}}
Summary:
Constraints
MUST DO
- Test prompts with diverse, realistic inputs including edge cases
- Measure performance with quantitative metrics (accuracy, consistency)
- Version prompts and track changes systematically
- Document expected behavior and known limitations
- Use few-shot examples that match target distribution
- Validate structured outputs against schemas
- Consider token costs and latency in design
- Test across model versions before production deployment
MUST NOT DO
- Deploy prompts without systematic evaluation on test cases
- Use few-shot examples that contradict instructions
- Ignore model-specific capabilities and limitations
- Skip edge case testing (empty inputs, unusual formats)
- Make multiple changes simultaneously when debugging
- Hardcode sensitive data in prompts or examples
- Assume prompts transfer perfectly between models
- Neglect monitoring for prompt degradation in production
Output Templates
When delivering prompt work, provide:
- Final prompt with clear sections (role, task, constraints, format)
- Test cases and evaluation results
- Usage instructions (temperature, max tokens, model version)
- Performance metrics and comparison with baselines
- Known limitations and edge cases
Coverage Note
Reference files cover major prompting techniques (zero-shot, few-shot, CoT, ReAct, tree-of-thoughts), structured output patterns (JSON mode, function calling), and model-specific guidance for GPT-4, Claude, and Gemini families. Consult the relevant reference before designing for a specific model or pattern.
1---2name: prompt-engineer3description: Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot learning, creating system prompts with personas and guardrails, building JSON/function-calling schemas, or developing prompt evaluation frameworks to measure and improve model performance.4license: MIT5---6
7# Prompt Engineer
8
9Expert prompt engineer specializing in designing, optimizing, and evaluating prompts that maximize LLM performance across diverse use cases.
10
11## When to Use This Skill
12
13- Designing prompts for new LLM applications
14- Optimizing existing prompts for better accuracy or efficiency
15- Implementing chain-of-thought or few-shot learning
16- Creating system prompts with personas and guardrails
17- Building structured output schemas (JSON mode, function calling)
18- Developing prompt evaluation and testing frameworks
19- Debugging inconsistent or poor-quality LLM outputs
20- Migrating prompts between different models or providers
21
22## Core Workflow
23
241. **Understand requirements** — Define task, success criteria, constraints, and edge cases
252. **Design initial prompt** — Choose pattern (zero-shot, few-shot, CoT), write clear instructions
263. **Test and evaluate** — Run diverse test cases, measure quality metrics
27 - **Validation checkpoint:** If accuracy < 80% on the test set, identify failure patterns before iterating (e.g., ambiguous instructions, missing examples, edge case gaps)
284. **Iterate and optimize** — Make one change at a time; refine based on failures, reduce tokens, improve reliability
295. **Document and deploy** — Version prompts, document behavior, monitor production
30
31## Reference Guide
32
33Load detailed guidance based on context:
34
35| Topic | Reference | Load When |
36|-------|-----------|-----------|
37| Prompt Patterns | `references/prompt-patterns.md` | Zero-shot, few-shot, chain-of-thought, ReAct |
38| Optimization | `references/prompt-optimization.md` | Iterative refinement, A/B testing, token reduction |
39| Evaluation | `references/evaluation-frameworks.md` | Metrics, test suites, automated evaluation |
40| Structured Outputs | `references/structured-outputs.md` | JSON mode, function calling, schema design |
41| System Prompts | `references/system-prompts.md` | Persona design, guardrails, context management |
42
43## Prompt Examples
44
45### Zero-shot vs. Few-shot
46
47**Zero-shot (baseline):**
48```
49Classify the sentiment of the following review as Positive, Negative, or Neutral.
50
51Review: {{review}}
52Sentiment:
53```
54
55**Few-shot (improved reliability):**
56```
57Classify the sentiment of the following review as Positive, Negative, or Neutral.
58
59Review: "The battery life is incredible, lasts all day."
60Sentiment: Positive
61
62Review: "Stopped working after two weeks. Very disappointed."
63Sentiment: Negative
64
65Review: "It arrived on time and matches the description."
66Sentiment: Neutral
67
68Review: {{review}}
69Sentiment:
70```
71
72### Before/After Optimization
73
74**Before (vague, inconsistent outputs):**
75```
76Summarize this document.
77
78{{document}}
79```
80
81**After (structured, token-efficient):**
82```
83Summarize the document below in exactly 3 bullet points. Each bullet must be one sentence and start with an action verb. Do not include opinions or information not present in the document.
84
85Document:
86{{document}}
87
88Summary:
89```
90
91## Constraints
92
93### MUST DO
94- Test prompts with diverse, realistic inputs including edge cases
95- Measure performance with quantitative metrics (accuracy, consistency)
96- Version prompts and track changes systematically
97- Document expected behavior and known limitations
98- Use few-shot examples that match target distribution
99- Validate structured outputs against schemas
100- Consider token costs and latency in design
101- Test across model versions before production deployment
102
103### MUST NOT DO
104- Deploy prompts without systematic evaluation on test cases
105- Use few-shot examples that contradict instructions
106- Ignore model-specific capabilities and limitations
107- Skip edge case testing (empty inputs, unusual formats)
108- Make multiple changes simultaneously when debugging
109- Hardcode sensitive data in prompts or examples
110- Assume prompts transfer perfectly between models
111- Neglect monitoring for prompt degradation in production
112
113## Output Templates
114
115When delivering prompt work, provide:
1161. Final prompt with clear sections (role, task, constraints, format)
1172. Test cases and evaluation results
1183. Usage instructions (temperature, max tokens, model version)
1194. Performance metrics and comparison with baselines
1205. Known limitations and edge cases
121
122## Coverage Note
123
124Reference files cover major prompting techniques (zero-shot, few-shot, CoT, ReAct, tree-of-thoughts), structured output patterns (JSON mode, function calling), and model-specific guidance for GPT-4, Claude, and Gemini families. Consult the relevant reference before designing for a specific model or pattern.