Anthropic · Opus / Sonnet / Claude Code

How to Prompt Claude

Claude responds exceptionally well to clean structural boundaries, positive phrasing, concrete examples, and modular Skills (SKILL.md) for repeatable tasks.

5 Official Rules for Prompting Claude

  1. Use descriptive XML tags: Wrap distinct blocks in intuitive tags like <documents>, <context>, <instructions>, and <examples>, then reference those exact tag names inside your instructions.
  2. Put long documents ABOVE your query: For payloads over 20k tokens, Anthropic benchmarks show placing reference text at the top and your question at the bottom significantly boosts retrieval accuracy.
  3. Tell Claude what to do, not just what to avoid: Positive instructions paired with a concrete replacement example beat long lists of bare "don't" rules.
  4. Include 3 to 5 diverse few-shot examples: Whenever tone, classification, or exact formatting matters, wrap clean input/output pairs in <example> tags.
  5. Promote repeated prompts into Skills (SKILL.md): If you paste the same checklist across chats, package it as a Skill so Claude loads it dynamically via progressive disclosure. Read the full Skills guide →
Claude Research

Claude Long-Context Document Synthesis (XML)

Follows Anthropic official placement: reference documents at the top, grounded instructions at the bottom.

Skip this "Read these notes and tell me the key takeaways."
Copy-ready template Source: Anthropic XML Docs
<documents>
  <document index="1">
    <source>customer-call-01.md</source>
    <document_content>
      [Paste transcript or report]
    </document_content>
  </document>
  <document index="2">
    <source>customer-call-02.md</source>
    <document_content>
      [Paste transcript or report]
    </document_content>
  </document>
</documents>

<instructions>
1. Analyze only the facts present inside <documents>.
2. Extract the top 5 recurring buyer objections ranked by frequency.
3. For each objection, include a verbatim quote with its source filename.
4. Flag any contradictions between documents separately.
</instructions>

<output_format>
Return a clean Markdown table with columns: Objection | Frequency | Verbatim Quote | Source.
</output_format>
Claude Writing

Anti-AI-Slop Voice Lock (Positive Replacement)

Pairs concrete positive replacements with targeted guardrails so outputs stop reading like robotic templates.

Skip this "Rewrite this so it sounds human and natural."
Copy-ready template Positive Replacement Pattern
<style_rules>
- Start directly with the answer. Skip greetings, preambles, and wrap-up summaries.
- Write in tight paragraphs of 2 to 4 sentences unless a table is requested.
- Replace vague buzzwords with measurable outcomes or named examples.
  Example: Replace "seamlessly streamlines workflows" with "cuts weekly reporting from 40 minutes to 5."
- Use plain verbs: use, build, cut, run, show, test.
- Avoid filler phrases: delve, leverage, utilize, robust, seamless, game-changer, landscape, "it is worth noting."
- Avoid forced "not X, but Y" contrasts and stacked 3-item adjectives.
</style_rules>

<source_draft>
[Paste draft text here]
</source_draft>

<instructions>
Edit the draft in <source_draft> using <style_rules>. Preserve every factual claim and keep my direct tone.
</instructions>

Primary Reference

Built on Anthropic's official The Complete Guide to Building Skills for Claude (PDF) and official XML prompting guidelines.