Write a production system prompt

Drafts a system prompt for an AI feature: role, context, rules, tools, output format and examples.

Use it when
Shipping an AI feature or agent and the prompt grew by accident.
What you fill in
  • feature What the AI does and for whom
  • rules Must-do and must-not-do behaviors
  • examples A few real inputs and ideal outputs
Write a production system prompt for this feature.

Feature: feature
Rules: rules
Examples of input and ideal output: examples

Structure it with XML-style sections: <role>, <context>, <instructions> (numbered, most important first), <rules> (each with the reason behind it), <output_format> (exact schema), <examples> (2 to 3, diverse), and <edge_cases> (ambiguous input, missing data, off-topic requests, prompt injection in user content).
Explain the reason for each rule inside the prompt; models follow rules better when they know why.
Then list 10 test inputs that would break a weaker prompt.
Before you answer, check your draft against every instruction above and fix anything that misses.
Replace each highlighted input with your details before you send it.
Why it works
  • Clear sections and an exact output schema, as Anthropic's prompting guide recommends.
  • Gives the reason behind each rule.
  • Comes with adversarial test inputs.