Most People Write System Prompts Like a Letter. Anthropic Writes Them Like Code.

Most people write system prompts the way they write emails. One big block of instructions, natural language, maybe a few bullet points if they’re feeling organized. The thinking goes: the AI is smart, it’ll figure it out.

Anthropic’s leaked system prompts look nothing like that.

A researcher from r/PromptEngineering spent time reading Claude Opus’s actual system prompt (yes, it got extracted, and yes, you can read the whole thing). What they found isn’t just interesting. It’s a blueprint you can start using right now. And once you see the difference, you can’t unsee it.

The way most people do it vs. the way the pros do it

When most people write system prompts, they describe what they want. “Be helpful. Don’t be rude. Focus on coding topics.” It works okay. But the AI has to infer which instruction applies where, which rules take priority when two of them conflict, and what the actual intent is behind each line. That’s where errors creep in.

Anthropic’s approach treats a system prompt like structured code. They use XML tags as containers, markdown headers inside those containers for detail, and repeat the most critical rules two or three times to make sure they land. The prompt reads more like a spec document than a note to a colleague.

Every place where the AI has to guess how your instructions connect to your goal is a place where it can get it wrong. Structure removes the guesswork. The AI stops inferring and starts executing.

Think about it this way: a vague instruction like “be professional” leaves massive room for interpretation. A structured instruction that defines what professional means in this context, gives a good example, a bad example, and notes which rule wins when professionalism conflicts with helpfulness? That’s a different thing entirely.

🔍 What the leaked prompts actually show

Eight techniques you can apply today:

  • 🏗️ Use XML for structure, markdown inside it for detail. Tags like <artifact_usage_criteria> define the category. Headers and lists inside spell out the rules. Complex logic nests cleanly without turning into a wall of text. This also makes it easier to update one section without accidentally breaking the logic of another.
  • Break text into micro-paragraphs. One idea per paragraph. One blank line whenever the topic shifts. The original poster rewrote one dense paragraph into eight single-sentence chunks after noticing this pattern in Anthropic’s prompt. The model’s attention distributes more evenly across shorter, cleaner units of text.
  • Repeat what matters. Saying something twice to an AI isn’t redundant. It signals priority. Say the critical thing twice and the model treats it as twice as important. Anthropic does this with safety rules and with formatting behavior, the things they absolutely cannot afford to have misread in production.
  • Use caps for critical rules. “CRITICAL: Do not do X” works the same on an AI as it does on a human reader. Anthropic does this often for rules it can’t afford to have misread. It’s a lightweight way to create a visual hierarchy inside plain text.
  • Include rationale, not just rules. Instead of “Claude uses full sentences when declining a request,” they add: “This can soften the blow.” The AI understands the why and applies the rule more accurately in edge cases. When your instruction covers a scenario the AI hasn’t seen before, the rationale is what guides it.
  • Write in third person. “Claude does X” instead of “Do X.” Borrowed directly from Anthropic’s own style. It frames the behavior as identity rather than a command, and it may make the behavior stick better across longer conversations where the model can start to drift from early instructions.
  • Add bad examples alongside good ones. <good_response> and <bad_response> tags appear throughout Anthropic’s prompts. Showing what not to do is just as useful as showing what to do. Most prompt writers skip the bad examples because they feel obvious. They’re not obvious to a model trying to generalize from limited signals.
  • Define a priority hierarchy when rules conflict. Anthropic’s prompt is explicit: copyright and safety override everything, including helpfulness. If your rules can clash with each other, write out which one wins. Without a hierarchy, the model makes its own call. That call may not match yours.

Where to start 🛠️

Pick your next system prompt and do just two things: break it into labeled sections using XML or markdown headers, and add a blank line every time the topic shifts. That alone will tighten performance noticeably. You don’t need to overhaul everything at once. One well-structured section beats five vague paragraphs every time.

After that, go back through your existing prompt and flag every place where two rules could potentially conflict. Add one sentence that resolves the conflict explicitly. That single edit tends to eliminate a surprising number of inconsistent outputs.

If you want to go deeper, the full leaked prompt collection lives at github.com/asgeirtj/system_prompts_leaks. Anthropic, OpenAI, Grok, all of them. Read one end to end and you’ll never write a wall-of-text prompt again.

These techniques aren’t secret. The pros just use them consistently and most of us don’t. Now you know the difference.

Frequently Asked Questions

Q: How do XML tags actually improve system prompts?

XML tags create logical containers that help organize complex instructions so the AI can parse and follow them more reliably. Users studying leaked system prompts have noticed providers like Anthropic use this structure extensively, and some advanced users layer “Friction Constraints” within these containers, essentially control mechanisms that fine-tune which behaviors get applied in specific situations.

Q: Are all system prompt rules changeable through custom instructions?

Some core safety rules, like refusing to generate harmful content, are hardcoded into the AI’s foundation and can’t be overridden. But most behavioral stuff (tone, style, response format, content preferences) is actually flexible and can be significantly modified through custom instructions, which is why learning to write them well is worth the effort.

Tips about Making System Prompts and Custom Instructions
by u/tedbradly in PromptEngineering

Scroll to Top