Bloom Interactive

Bloom Interactive

← Back to home
Preview of Claude Prompt PatternsView on GitHub ↗

Claude Prompt Patterns


A cheat sheet of patterns for writing effective Claude prompts, based on Anthropic guidance as of spring 2026.

  • XML tags as semantic boundaries between prompt sections (context, task, rules, schema)
  • Include the JSON schema directly rather than describing the shape you want
  • Positive framing over "do not" — tell the model what to do, not what to avoid
  • Explain why constraints exist — Claude generalizes from motivation better than from bare rules
  • Few-shot examples are the highest-leverage fix for inconsistent output
  • Data first, task after in long prompts for better attention
  • System prompt for persona and persistent constraints; user prompt for per-call context and data