Prompts

Best Prompts for Claude: 8 Techniques From Anthropic’s Own Docs

The best prompts for Claude don’t contain magic words. They read like instructions a stranger could follow.

That’s not our opinion, by the way. It’s more or less the “key test” in Anthropic’s own prompting best practices page: show your prompt to a colleague with little context on the task, and if they’d be confused, Claude will be too. Most “secret Claude prompts” you see shared online ignore that and pile on adjectives instead.

Below are the techniques Anthropic documents for its current models, each with a prompt you can copy. We’ve also flagged one old trick that now breaks things on newer Claude models.

1. Say exactly what you want (and a bit more)

Anthropic describes Claude as “a brilliant but new employee who lacks context on your norms and workflows.” New employees do what you asked. They don’t guess at the extra mile. So if you want more than the bare task, ask for it. The docs’ own example turns “Create an analytics dashboard” into a request that adds “Include as many relevant features and interactions as possible.”

Write a product description for [product] for our online store.
Audience: [who buys it]. Length: about 120 words.
Tone: friendly, plain English, no hype words.
Include: one sentence on what problem it solves, 3 short feature bullets, and a closing line about the warranty.
Output only the description, nothing before or after it.

What to change: the audience and the length are the two lines that matter most. “Output only the description” is there because Claude, like most chatbots, likes to open with a friendly “Here’s your description!” that you’d have to delete before pasting.

2. Explain why a rule exists

This one surprises people. Anthropic’s docs compare “NEVER use ellipses” with a version that explains the response will be read aloud by a text-to-speech engine that can’t pronounce them. The second works better, because Claude can generalise from the reason. It’ll avoid other things a speech engine would choke on too.

Summarise this support ticket for our on-call engineer.
They'll read it on a phone at 3am, so keep it to 4 lines max, put the error message first, and skip greetings or background they already know.

<ticket>
[paste ticket]
</ticket>

3. Wrap things in XML tags (Claude prompt engineering 101)

This is the most Claude-specific habit on the list. When a prompt mixes instructions, background, examples and your actual input, tags like <instructions> and <context> tell Claude where each part starts and stops. The docs say it “reduces misinterpretation”. There’s no special list of approved tag names. Pick clear ones and use them consistently.

Best prompts for Claude: example prompt structured with XML tags
<context>
We run a small bakery in Leeds. Our customers are mostly locals ordering birthday cakes.
</context>

<instructions>
Reply to the customer email below. Confirm what they ordered, answer their question, and ask for anything missing (date, size, message on the cake).
Keep it under 100 words and sign it "Sam, The Corner Bakery".
</instructions>

<email>
[paste customer email]
</email>

When to use tags: once your prompt has two or more different kinds of content. A one-line question doesn’t need them. A prompt with instructions, a pasted email and some background on your business does.

4. Show 3 to 5 examples

Anthropic calls examples “one of the most reliable ways to steer Claude’s output format, tone, and structure.” Its tip is to include 3 to 5, keep them close to your real use case, and vary them so Claude doesn’t copy an accidental pattern (say, every example being exactly two sentences long). Put each one inside <example> tags, with the whole set in <examples>.

Write a one-line changelog entry for each commit message I give you. Match the style of the examples.

<examples>
<example>
Commit: fix null check in cart total when coupon removed
Entry: Fixed: removing a coupon no longer breaks the cart total.
</example>
<example>
Commit: add dark mode toggle to settings page
Entry: New: you can now switch to dark mode in Settings.
</example>
<example>
Commit: bump stripe sdk to latest, update webhook handler
Entry: Improved: payments run on the latest Stripe library.
</example>
</examples>

Commits:
[paste commit messages]

5. Give Claude a role in the system prompt

A role belongs in the system prompt if you’re using the API. The docs say “even a single sentence makes a difference.” In the Claude app you don’t get a raw system prompt, so the first lines of your message (or a Project’s custom instructions) do the same job.

You are a senior UK employment lawyer reviewing a contract for a small-business owner with no legal background.
Flag clauses that are unusual or risky, explain each in plain English, and say what question they should ask their own solicitor. Don't give a final legal opinion.

<contract>
[paste contract]
</contract>

A role helps with tone and focus. It doesn’t give Claude knowledge it lacks, so check anything high-stakes with a real professional.

6. Long documents go first, the question goes last

For long inputs (Anthropic says 20k+ tokens), put the documents at the top and your instructions at the bottom. According to the docs, queries at the end “can improve response quality by up to 30 percent in tests,” mainly with complex, multi-document inputs. The same page suggests asking Claude to pull out relevant quotes first, which keeps it anchored to the text.

<documents>
<document index="1">
<source>q3_report.pdf</source>
<document_content>[paste]</document_content>
</document>
<document index="2">
<source>customer_survey.csv</source>
<document_content>[paste]</document_content>
</document>
</documents>

First, find quotes from both documents that relate to customer churn and put them in <quotes> tags.
Then, using only those quotes, list the three most likely reasons customers left, in <answer> tags.

7. Say what to do, not what to avoid

“Do not use markdown” is weaker than describing the output you want. Anthropic’s suggested swap is: “Your response should be composed of smoothly flowing prose paragraphs.” The docs add a related point we see ignored all the time. The style of your prompt leaks into the reply. A prompt stuffed with bullet points and bold text tends to get bullet points and bold text back.

Write this explanation as three or four short prose paragraphs, the way a friendly colleague would explain it over coffee. Use plain sentences. Put any commands in code blocks.

8. Draft, review, refine

The docs call self-correction “the most common chaining pattern”: generate a draft, have Claude review it against criteria, then have it fix what the review found. In the API these are separate calls. In the chat app you can do it in three messages.

Message 1: Draft a cold email to [type of client] offering [service]. Under 120 words.

Message 2: Now review that draft as a busy [client role] who gets 50 of these a day. List every line that would make you stop reading, and why.

Message 3: Rewrite the email fixing every point from your review. Keep it under 120 words.

A worked example, before and after

Here’s a common request rebuilt with the techniques above. The job is turning meeting notes into an update for the team.

Before:
summarise these notes [paste]

After:
<notes>
[paste meeting notes]
</notes>

<instructions>
Turn the notes above into a Slack update for our 8-person product team. Half of them missed the meeting, so they need decisions and owners, not the discussion.
Format: "Decided" (bullets), "Action items" (bullet per person, with due date if mentioned), "Open questions". Under 150 words.
If an action item has no owner in the notes, list it under Open questions instead of guessing.
</instructions>

The second version uses four of the eight techniques. The notes sit in tags at the top (techniques 3 and 6), there’s a reason behind the format (technique 2), and the output is spelled out exactly (technique 1). That last instruction about missing owners stops Claude from inventing who’s responsible for what, which is the kind of quiet error that causes real problems in a team.

The catch: plenty of older Claude guides still teach “prefilling”, where you write the start of Claude’s reply yourself (an opening { to force JSON, say). Anthropic’s docs now say prefilled responses on the last assistant turn are not supported starting with Claude 4.6 models, and such requests return a 400 error. If you’re on the API, use structured outputs or a plain instruction like “Respond directly without preamble” instead. In the chat app this never applied, so you can ignore it there.

Common mistakes when prompting Claude

  • Mixing your instructions into the pasted text. Claude may treat a line in the document as an instruction, or miss your real one. Tags fix it.
  • Writing every rule in capitals. Anthropic’s examples explain reasons instead of shouting. Capitals say a rule is important but not why, and the why is what lets Claude apply it sensibly.
  • Giving one example. A single example gets copied too literally. Three varied ones show the pattern without the accidents.
  • Hiding the question in the middle. With long inputs, the question belongs at the end, per the docs.

What this means if you use the Claude app

You don’t need the API to use any of this. XML tags, examples, roles and the long-document layout all work when typed straight into claude.ai. Two small changes help in the app. Put stable instructions you reuse into a Project, so you don’t paste them every time. And start a new chat when you switch tasks, since a long thread drags old context along.

Which Claude model you’re on matters less for these basics. Anthropic’s page lists the techniques as applying to all current models, with a separate section for model-specific quirks (one newer model, for example, writes longer replies by default and needs an explicit “be concise”). Our guide to every Claude model sorts out the names.

Which of the best prompts for Claude to start with

Use XML tags to separate your instructions from your material. It costs ten seconds, it’s the technique Claude is most clearly tuned for, and it fixes the common failure where Claude starts “answering” the document you pasted instead of following your request.

Second place goes to examples. If you need the same format every time (product listings, changelog lines, support replies), three good examples beat a paragraph of style rules.

Skip the giant “ultimate system prompt” templates. They’re long, they contradict themselves, and you can’t tell which line is helping. Start short and add a rule only when you see a problem.

New to prompting in general? Start with prompt engineering for beginners. Using Claude for code? Our AI prompts for coding include prompts adapted from Anthropic’s coding advice.

Next: see how Claude’s coding agent stacks up in Claude Code vs Codex vs GitHub Copilot.

FAQ

Do Claude XML tags really make a difference?

Anthropic recommends them in its official docs because they help Claude separate instructions, context and input. The tag names aren’t special. Clear, consistent names are what count.

How many examples should I give Claude?

Anthropic’s tip is 3 to 5. Make them varied and close to your real task, and wrap them in example tags.

Do these prompts work in ChatGPT or Gemini?

Mostly, yes. OpenAI’s prompt engineering guide and Google’s Gemini prompting guide also recommend clear instructions, examples and delimiters such as XML or Markdown. The prefill warning is Claude-specific.

Is prefilling Claude’s response still allowed?

Not on the last assistant turn for Claude 4.6 models and newer, per Anthropic’s docs. Older models still accept it.

Leave a Comment