How to prompt Claude
A good Claude prompt gives a clear role, structures its sections with XML tags like <context> and <instructions>, places long material before the task, and asks for step-by-step thinking on hard problems. That tag-driven structure and context-first ordering is what sets prompting Claude apart from other models.
Claude-specific techniques
Six habits that get the most out of Claude.
Structure sections with XML tags
Claude is trained to recognize XML-style tags, so wrap distinct parts of your prompt in tags like <context>, <instructions>, and <example>. Clear boundaries stop the model from confusing your data with your directions.
Put long context before the instructions
When you paste a long document or dataset, place it near the top and put your question or task at the end. Claude attends more reliably to instructions that follow the material they act on.
Ask for explicit step-by-step thinking
For analysis, math, or multi-part reasoning, tell Claude to think step by step before answering — or to work inside <thinking> tags. Reasoning out loud measurably improves accuracy on complex tasks.
Assign a clear role
Open with who Claude should be — 'You are a senior financial analyst.' A specific role sets the standards, vocabulary, and judgment the response should reflect.
Give examples of what good looks like
One or two concrete examples of the input and the ideal output (few-shot prompting) anchor format and tone far better than describing them in the abstract.
Leverage the long context window
Claude handles very long inputs, so you can include whole documents, transcripts, or codebases rather than summarizing them away. Keep the material relevant and label each source so Claude can cite it.
Before and after
“Summarize this report and tell me what to do.”
No role, no structure, no tags, task buried with the data → vague, unfocused summary.
You are a senior operations analyst. <context> [paste the full quarterly report here] </context> <instructions> Think step by step inside <thinking> tags, then give a 5-bullet summary and the top 3 actions, ranked by impact. </instructions>
Role + XML structure + context first + step-by-step thinking → a focused, actionable answer.
New to prompting in general? Start with the CRAFT framework for the universal fundamentals, then come back here for the Claude-specific layer. You can also browse ready-made Claude prompts to see these techniques in action.
Build a Claude-ready prompt in seconds
Promptivo’s interview gathers your role, context, and task and assembles a structured, tag-ready prompt tuned for Claude.
Build a prompt free →Questions, answered
How do I write a good Claude prompt?
Give Claude a clear role, structure the prompt with XML tags like <context>, <instructions>, and <example>, place long material before your task, and ask for step-by-step reasoning on complex problems. Adding one or two examples of the ideal output sharpens format and tone.
Should I use XML tags with Claude?
Yes. Claude is specifically trained to recognize XML-style tags, so wrapping sections in tags such as <context>, <instructions>, and <example> creates clean boundaries between your data and your directions. It reduces ambiguity and makes long prompts easier for Claude to follow.
How is prompting Claude different from ChatGPT?
The fundamentals are the same — context, role, format, and a clear task — but Claude responds especially well to XML-tagged structure, to long context placed before instructions, and to explicit requests to think step by step. Its large context window also lets you include full documents instead of summaries.
Does Claude support long documents?
Yes. Claude has a large context window, so you can paste entire documents, transcripts, or codebases directly into the prompt. Put the long material first, label each source clearly, and place your question at the end so Claude can reference the right content.