Claude Prompting Best Practices: What Anthropic Recommends
Anthropic's own guidance for prompting Claude, in one page: be explicit, give reasons, use examples, separate instructions from material, and handle long documents well.
Claude prompting best practices come down to one habit: write the prompt you would give a capable new colleague who knows nothing about your project. Anthropic's documentation says to be explicit about what you want, explain why a rule exists, show examples of the output, and separate instructions from source material. Those four moves fix most weak Claude prompts before any advanced technique is needed.
This page goes deeper on Claude than our main guide, The Best Prompt For Anything. Everything below is drawn from Anthropic's prompting best practices documentation and its article on best practices for prompt engineering. Where the two differ, the difference is noted.
Start with the colleague test
Anthropic describes Claude as a brilliant but new employee: skilled, but with no knowledge of your norms, audience or goals. Its test is practical. Show your prompt to a colleague who has minimal context. If they would be confused, Claude will be too.
The test catches missing information quickly. A prompt that says "summarise this" leaves out who the summary is for, how long it should be and what they will do with it. None of that is hard to write down. It is simply absent.
Be explicit, and ask for the extra mile
Claude does what the prompt says. If you want a fuller result, say so. The documentation's own example is a dashboard request: asking Claude to create an analytics dashboard gets a basic one, while adding a request for as many relevant features and interactions as possible, going beyond the basics, gets a far more complete build.
The same applies to action. Anthropic notes that a question such as "Can you suggest some changes?" tends to produce suggestions, while "Change this function to improve its performance" produces the edit. Decide which you want and phrase the request to match.
When the order of work matters, number the steps.
Give the reason behind a rule
A bare rule is followed literally. A rule with a reason can be applied to cases you did not think of, because Claude generalises from the explanation.
Anthropic's example: telling Claude never to use ellipses works less well than explaining that the response will be read aloud by a text-to-speech engine that cannot pronounce them. With the reason in hand, Claude can also avoid other things a speech engine would stumble on.
Use examples, and choose them carefully
Examples are the most direct way to pin down format, tone and structure. The platform documentation recommends three to five examples that are relevant and varied, wrapped in <example> tags, with a group of them inside <examples>.
Anthropic's article takes a lighter approach: start with one example and add more only if results stay inconsistent. The two are compatible. One example is often enough for a simple format; a harder format benefits from several varied ones.
One caution appears in both sources. Recent Claude models pay close attention to the details of an example, so an example copies across its flaws as well as its strengths. Show only what you want repeated.
Separate instructions from material
When a prompt mixes instructions, background and pasted content, mark where each part begins and ends. The platform documentation recommends XML-style tags for this, with names such as <instructions>, <context> and <input>, used consistently.
<context>
The summary is for a finance director who has not read the report.
</context>
<input>
[paste the report]
</input>
<instructions>
Summarise the report in five bullets. Lead with the decision required.
</instructions>
Anthropic's article is more relaxed about tags. It describes them as less necessary with current models than they once were, while still useful for complex prompts and strict boundaries. A reasonable reading of both: clear headings are enough for short prompts, and tags earn their place once a prompt carries several kinds of content.
Long documents: material first, question last
For long inputs, which the documentation puts at roughly 20,000 tokens and above, place the documents at the top of the prompt and the question at the end. Anthropic reports that putting the query at the end can improve response quality by up to 30 percent in its tests, especially with complex inputs made of several documents.
Two further habits help with long material:
- Wrap each document in its own tags, with the source and the content marked separately.
- Ask Claude to quote the passages relevant to the question first, then answer from those quotes.
Say what to do, not what to avoid
Positive instructions steer format more reliably than prohibitions. Asking for a response "composed of smoothly flowing prose paragraphs" works better than telling Claude not to use markdown. The style of your own prompt also matters: a prompt written in plain paragraphs tends to get paragraphs back.
Roles: one sentence is enough
The platform documentation says that setting a role in the system prompt helps, and that even a single sentence makes a difference. Anthropic's article adds a warning against elaborate personas, which can narrow the answer, and suggests stating the perspective you need instead. Both point the same way: name the lens, and skip the theatre.
Do not shout
Recent Claude models respond strongly to the system prompt. Emphatic wording that older prompts relied on, such as "CRITICAL: You MUST use this tool when", can now cause a tool or rule to be applied too often. Anthropic's advice is to soften it to plain language: "Use this tool when".
Two changes API users should know
Prefilling the last assistant turn. Starting the model's reply for it, for example with an opening brace to force JSON, is no longer supported on recent Claude models; the documentation says such requests return an error. Use structured outputs, or state the format and ask for no preamble. Older write-ups, including Anthropic's own article, still show prefill as a technique, so check which model you are calling.
Thinking. Recent Claude models use adaptive thinking, where the model decides how much to reason based on an effort setting and the difficulty of the request. In practice this means asking for thoroughness in general terms rather than scripting every step of the reasoning.
A Claude prompt checklist
- Would a colleague with no context understand it?
- Is the request explicit, including how far to go?
- Does each rule carry its reason?
- Are there examples, and do they show only what you want?
- Are instructions and material clearly separated?
- For long inputs, is the material first and the question last?
- Are format instructions phrased as what to do?
- Is the wording calm, with no capital-letter commands?
For ready-made starting points, see the Claude model page and the guides to few-shot prompting and system prompts.
FAQ
What is the most important Claude prompting practice?
Being explicit. Anthropic's guidance is to treat Claude like a capable new employee with no context, and to state what you want, who it is for and how far to go.
How many examples should a Claude prompt include?
Anthropic's platform documentation recommends three to five relevant, varied examples in example tags. Its article suggests starting with one and adding more only if results are inconsistent.
Do I still need XML tags with Claude?
Not for short prompts. Tags are most useful when a prompt mixes instructions, context and pasted material, because they mark where each part starts and ends.
Where should a long document go in a Claude prompt?
At the top, with the question at the end. Anthropic reports that placing the query last can improve response quality by up to 30 percent in its tests on complex multi-document inputs.
Does prefilling still work with Claude?
Not on recent models. Anthropic's documentation says prefilling the last assistant turn is no longer supported there, and recommends structured outputs or explicit format instructions instead.
Prompts that put this into practice
Editing and Proofreading Prompt
Edits a draft at the level you choose, protects the author's voice, and returns a change log plus queries instead of silent rewrites.
# Role
You are a copy editor working on someone else's writing. Your job is to make the draft cleaner and clearer while it still sounds like the person who wrot…Research Paper and Report Summary Prompt
Summarizes a paper or report for a named reader: bottom line, method, key findings with exact figures, limits of the evidence, and what it means for them.
# Role
You are a careful analyst who summarizes research for people who will not read the original. Accuracy to the document matters more than fluency.
# What…Behavior-Preserving Refactoring Prompt
Restructures code in small, named steps while holding its observable behavior fixed, and reports anything it could not prove equivalent.
I want this code refactored without changing what it does. You are acting as a careful senior engineer: structure may change, observable behavior may not.
<cod…Keep reading
Guide
The Best Prompt For Anything: The 2026 Guide to Prompts That Actually Work
There is no single best prompt, but there is a best structure. Copy-ready templates for writing, coding, research, learning and marketing, plus the five-part formula behind them.
Guide
OpenAI Prompting Best Practices: The Official Rules Explained
OpenAI's own prompting guidance in one page: the eight rules from its help article, how to structure longer prompts, key settings, and what changes for reasoning models.
Technical guide
Few-Shot Prompting: How to Use Examples in a Prompt
How to include worked examples in a prompt so the model follows a format, label set or style, and how to choose examples that generalize.
Technical guide
How to Use System Prompts
What a system prompt is, what belongs in it versus the user message, a worked example, and the limits to plan for when building on one.
Sources and references
- Prompt engineering overview — Anthropic