# Prompt Engineering Skill

## Purpose
Design reliable, consistent prompts for LLM-powered applications.

## Core Principles

### Be Specific
Bad: "Summarize this text"
Good: "Summarize this article in 2-3 sentences. Focus on the main argument and key evidence. Write in present tense."

### Provide Structure
```
Given the following customer email, extract:
1. Sentiment: positive / neutral / negative
2. Category: billing / technical / general
3. Priority: high / medium / low
4. Summary: one sentence

Email: {{email}}

Respond in JSON format only.
```

### Include Examples (Few-shot)
Show 2-3 examples of expected input/output pairs to establish the pattern.

### Set Constraints
- Output format (JSON, markdown, plain text)
- Length limits ("in under 50 words")
- What NOT to include ("do not add explanations")
- Handling edge cases ("if no data found, return null")

### Chain of Thought
For complex reasoning, ask the model to think step by step before giving the final answer.

## Anti-Patterns
- Vague instructions ("be helpful")
- No output format specified
- Missing error/edge case handling
- Prompt injection vulnerabilities (user input in system prompt without sanitization)
- Over-long prompts that exceed context window