system-prompt-design
Installation
SKILL.md
System Prompt Design
A system prompt is the instruction set that determines how an AI agent behaves. A good system prompt produces consistent, high-quality output across hundreds of runs. A bad system prompt produces output that's different every time, hallucinates facts, ignores rules, and needs constant human editing.
The principle: a system prompt is a specification, not a suggestion. Write it like a contract. Every rule, every constraint, every example exists because it prevents a specific failure mode you've observed. Vague instructions produce vague output.
System Prompt Structure
The 7 sections (in order)
| Section | What it does | Required? |
|---|---|---|
| Role | Who the agent is and what it does (one sentence) | Yes |
| Context | What the agent needs to know about the environment | Yes |
| Task | The specific job, step by step | Yes |
| Rules | Hard constraints the agent must follow | Yes |
| Output format | Exact schema or structure for the output | Yes |
| Examples | 2-4 examples of ideal output | Yes (for quality-critical tasks) |
| Anti-patterns | What to never do, with reasons | Recommended |