Claude prompting guide

Claude prompting guide
Clear official documentation, applicable to other AI assistants too.
Anthropic's official guide: how to write clear requests, give examples, break down tasks and let Claude think step by step.
Overview
This is the official documentation from Anthropic, the company that develops Claude, on prompt engineering techniques. The overview page explains when to optimize prompts and links to the Prompting best practices page, which collects techniques for the current Claude models.
The documentation stresses that before tuning a prompt, you should have clear success criteria, a way to test results and a first draft prompt. Not every problem is fixed by prompting: sometimes switching to a different model improves speed and cost more easily.
For businesses using Claude to write content, answer customers or process documents, this is the most trustworthy reference because it is written by the model's maker and updated with new versions.
Highlights
Clear and direct
Treat Claude like a very capable new employee who does not yet know how your company works: the more specific your description, the better the result.
Explain the reason
Telling Claude why a request is needed helps the model understand the goal and apply it more sensibly.
Use examples
Give about 3 to 5 realistic, varied examples inside <example> tags to shape tone and format.
Structure with XML tags
Separate instructions, context and input into their own tags such as <instructions>, <context>, <input> to avoid misunderstanding.
Assign a role
Just one sentence declaring a role in the system prompt helps Claude focus on the right tone and expertise.
Long documents go first
For large documents, put the content at the top of the prompt and the question at the end to improve answer quality.
What it's for
Standardizing customer support prompts
The support team applies roles, example answers and XML tags so Claude's replies are consistent across staff.
Analyzing contracts and reports
Paste the long document at the top, ask the question at the end and request quotations for more reliable results.
Writing content in the brand voice
Provide a few sample brand posts as examples so Claude writes in the same style.
Building an internal chatbot
The technical team uses the guidance on tools and agent systems when integrating Claude into workflows.
Fixing prompts that give poor results
Compare the current prompt against each principle to find where context is missing or wording is vague.
How to use it
- 1
Define success criteria
Write down what a good result looks like and prepare a few test cases to compare.
- 2
Write a draft prompt
If you do not have one, you can use the prompt-generator notebook (metaprompt) in the Claude Cookbook that the overview page mentions.
- 3
Read Prompting best practices
Apply the general principles in turn: clarity, added context, examples, XML tags, roles.
- 4
Test and compare
Run the prompt on the test cases and record which changes improve results.
- 5
Check model-specific notes
See the guidance for each model and the migration section if you are upgrading from an older Claude version.
Video guides
AI prompt engineering: A deep dive
Anthropic
Prompting 101 Code w/ Claude
Anthropic
Real-world example
A hypothetical example: a small agency in Ho Chi Minh City uses Claude to write product descriptions for a cosmetics client, but the tone differs each time. The team lead reads Anthropic's documentation and rewrites the prompt with a one-sentence role, a context section explaining the target customers, three sample descriptions inside <example> tags and the product information inside <input> tags. After testing on a few products, the team saves this prompt as a shared template and only swaps the input data for each order.
Tips & notes
Try the colleague rule
Give the prompt to someone unfamiliar with the task; if they are confused, Claude is likely to misread it too.
List steps in order
When order matters, write the instructions as a numbered list.
Name tags consistently
Use the same XML tag names across all prompts for easier maintenance and reuse.
Follow updates
The documentation changes with new models, for example models from Claude 4.6 no longer support prefilling the response (prefill) in the final turn.
FAQ
Is there a Vietnamese version?
The documentation is in English; you can use your browser or Claude itself to translate as you read.
Can non-programmers read it?
The general principles are easy to apply when chatting with Claude; the sections on the API, tools and agents suit technical teams better.
Are there interactive lessons?
Yes, the overview page links to a course on GitHub and a lighter version on Google Sheets.
Does it apply to ChatGPT and Gemini?
Many principles such as clarity, examples and context apply broadly, but this documentation is written specifically for Claude.
Useful links
Want to apply this in your business?
2dm looks at your workflows, picks the right tools and sets them up with your team. The first call is free.
Same topic

2dm Prompt Library
Prompts for marketing, sales, operations and learning. Fill in a few fields, then copy or open directly in ChatGPT or Claude.

Tailor-made sales landing page prompt
A prompt for Claude Code or a coding agent: build a sales landing page with its own identity for each product, honest about figures, with a lead form, stopping at a draft.

Anthropic interactive prompt engineering tutorial
4.0
Notebook-style lessons from beginner to advanced, with hands-on exercises after each chapter.


