Turn raw instructions into production-grade system prompts.
01 The Concept
System prompts define agent behavior. This meta-prompt takes a raw instruction and compiles it into a structured, production-ready system prompt including role, constraints, input tags, and XML output structures.
02 Weak vs. Strong
EX 01Optimizing a Support Bot Prompt
You are a Meta-Prompt Optimizer. Convert this raw spec into a structured, production-grade system prompt:
Raw Spec: 'Help customers with order refunds. Be friendly, verify order ID exists, don't refund if it's over 30 days.'
Requirements for output:
- Use XML tags for structure.
- Include security guardrails.
- Define output format.
→ Why it works
Converts a simple paragraph into a multi-layered system prompt with XML isolation, edge case states, and output formatting rules.
03 Key Points
01Role definition: define seniority, domain expertise, and tone guidelines.
02Input boundaries: wrap user data in explicit tags to avoid injection vulnerabilities.
03Output contracts: dictate precise markdown, JSON, or XML formats for the response.
04Banned words: explicitly list phrases and tones to avoid.
04 Model-Specific Notes
Claude produces highly structured XML configurations. It is the ideal engine for running system prompt compilers.
05 For Your Role
A template that takes a simple description of what you want an AI to do and turns it into a set of instructions.