10 Prompting Techniques for Claude (From Anthropic's Own Playbook)
Prompting isn't magic words — it's interface design. Claude does exactly what a brilliant, extremely literal new colleague would do with your request: everything you specified, and a guess at everything you didn't. These ten techniques, distilled from Anthropic's own prompt engineering documentation and thousands of hours of daily use, are about removing the guessing.
Each comes with a before/after. Steal the pattern, not the words.
1. Front-load context: who, what for, what done looks like
The single biggest quality lever. Claude calibrates depth, tone, and assumptions from context you provide — without it, you get the average answer to the average version of your question.
✗ How do I speed up this query? ✓ Postgres 16, orders table with 40M rows, this query runs on every page load and takes 800ms. We can add indexes but can't change the schema this quarter. How do I get it under 100ms? [query + EXPLAIN output]
2. Show examples instead of describing preferences
Multishot prompting — two or three examples of input → desired output — beats paragraphs of description for anything with a format or a voice. Claude is a world-class pattern matcher; feed it patterns.
✗ Write release notes in a friendly but professional tone. ✓ Write release notes matching these examples: "Fixed: exports over 10k rows no longer time out. (Thanks @maria for the repro.)" "New: dark mode. Your retinas, avenged." Now write notes for: [changes]
3. Structure long prompts with XML tags
When a prompt mixes instructions, data, and examples, wrap each in tags like <instructions>, <document>, <example>. Claude is specifically trained to respect this structure — it stops confusing your content with your commands, and you can reference sections by name ("quote from <document> before answering").
4. Ask for reasoning before conclusions
For analysis, math, or judgment calls, instruct Claude to think through the problem before answering — or use extended thinking where available. Order matters: reasoning-then-answer genuinely computes; answer-then-justification rationalizes.
✗ Is this contract clause risky? ✓ Analyze this clause step by step: first what it literally obligates us to, then the scenarios where that bites, then your risk verdict (low/medium/high) with the single biggest driver. <clause>...</clause>
5. Give it a role with stakes
A system prompt like "you are a security engineer reviewing code before a release" measurably shifts what Claude attends to. The trick is specificity plus stakes — a role with something to lose beats a costume.
✗ Review this code. ✓ You are the on-call engineer who gets paged if this ships broken. Review the diff for what will actually wake you up at 3am — not style. [diff]
6. Constrain the output format explicitly
If you need JSON, a table, exactly five bullets, or 'under 200 words' — say so, and show the shape. For the API, prefilling the start of Claude's response (e.g. an opening {) locks the format harder than any instruction.
7. Tell it what to do, not what to avoid
Negative instructions ("don't be verbose") under-specify — the space of not-verbose is huge. Positive constraints aim the output.
✗ Don't use jargon or write too much. ✓ Write 3 short paragraphs a smart non-engineer can follow. Any technical term gets a plain-English gloss in parentheses the first time.
8. Give it permission to say "I don't know"
Claude hedges toward helpfulness: asked a question, it answers. One line changes the contract and dramatically cuts confabulation on factual work:
✗ What does clause 14.3 of this agreement say about termination? ✓ Answer only from the attached agreement. Quote the relevant text for every claim. If it isn't covered, say 'not in the document' — that answer is more valuable to me than a guess.
9. Chain instead of cramming
One prompt asking for research + outline + draft + edit gets you a mediocre average of four tasks. Four prompts, each consuming the last one's output, get you four focused performances — and a chance to steer between steps. This is also the core design idea behind agent workflows.
10. Iterate on the prompt, not just the output
When output disappoints, the reflex is to say "no, more like X." That fixes one output. The compounding move is asking Claude to fix the instructions:
✗ No, shorter, and less formal. Try again. ✓ This output was too long and too formal. Rewrite MY PROMPT so that a fresh session would produce the right thing first try. Then I'll save that prompt.
Saved, refined prompts are how individuals build leverage — and packaged into slash commands and skills, they're how teams do. That's literally what the ClaudeThings kits are: hundreds of prompts iterated to reliability, installed as one-word commands.
The meta-technique
All ten reduce to one principle: Claude's output quality mirrors your input specificity. Vague in, average out. The good news is that specificity is a writing skill, not a secret — and every prompt in our free prompt library is a worked example of these techniques applied to a real job.