Guides7 min read

Claude Prompting Guide: How to Prompt Claude (2026)

A practical Claude prompting guide: XML tags, role framing, long-document prompts and step-by-step reasoning, with copy-paste templates you can use today.

Marcus JohnsonJuly 2, 2026

I write most of my working prompts for Claude, and the single biggest lesson from years of daily use is this: Claude rewards structure. Where other models tolerate a wall of text, Claude visibly improves when you separate context from instructions and say exactly what you want.

Let's break this down into the techniques that matter most.

1. Use XML-Style Tags to Structure Your Prompt

Claude was trained to pay attention to tag-style boundaries. Wrapping the parts of your prompt in simple tags removes ambiguity about what is background, what is the task, and what is an example.

<context>
We are a B2B SaaS company selling project management software to
engineering teams of 20-200 people. Our tone is direct and technical,
never salesy.
</context>

<instructions>
Write three cold-email opening lines to a VP of Engineering who just
posted about missed sprint deadlines on LinkedIn.
</instructions>

<requirements>
- Under 25 words each
- Reference the sprint-deadline pain specifically
- No flattery, no "I hope this finds you well"
</requirements>

The key insight here is that tags aren't magic words — they're separators. Any consistent structure helps; tags just make the boundaries impossible to misread.

2. Give Claude a Role and a Goal

A specific persona changes the vocabulary, depth, and priorities of the response. Generic roles produce generic output.

You are a senior database engineer who has spent ten years optimizing
PostgreSQL for high-write workloads.

Review the schema below and identify the three changes that would most
improve write throughput. For each change, explain the trade-off it
introduces.

In practice, the goal sentence matters as much as the role: "identify the three changes that would most improve write throughput" gives Claude a finish line instead of an invitation to ramble.

🪄 Want Claude-ready prompts without memorizing all this? Paste any prompt into the free PromptWizz optimizer, pick Claude as the target, and it adds the XML structure, role, and ordering for you — then shows you what it changed.

3. Put Long Documents First, Questions Last

When you're working with long content — contracts, transcripts, codebases — order matters. Paste the material first and ask the question at the end.

<report>
[PASTE THE FULL REPORT HERE]
</report>

Based on the report above, list the five commitments the vendor made,
with the section number where each appears.

The bottom line is: instructions that come after the content are the freshest thing in Claude's context when it starts answering. Use that.

4. Ask for Step-by-Step Reasoning

For analysis, math, debugging, or any decision with moving parts, ask Claude to reason before it concludes.

I need to decide whether to migrate our monolith to microservices this
year or defer to next year.

Think through this step by step:
1. List the strongest argument for each option
2. Identify what evidence would change the decision
3. State your recommendation and the single biggest risk it carries

Team: 8 engineers. Current pain: deploy conflicts, 40-minute CI runs.

This is Chain-of-Thought prompting — the complete guide to prompting frameworks covers when to reach for it versus heavier frameworks like Tree-of-Thought.

5. Tell Claude What To Do, Not What To Avoid

Prohibition lists backfire more often than they help. Convert every "don't" into a "do."

Instead of "don't be verbose, don't use jargon, don't hedge" — write:

Answer in three short paragraphs using plain language a new hire would
understand. Commit to a single recommendation.

The trick is that positive instructions describe the target; negative ones just fence off part of the miss space.

Common Mistakes to Avoid

  • Vague roles. "You are an expert" adds nothing. Name the expertise, the seniority, and the perspective.
  • Question buried mid-prompt. On long inputs, Claude answers best when the ask comes last.
  • One giant unstructured paragraph. If you can't skim your own prompt, Claude can't either — add tags or headers.
  • Skipping the output spec. Say what format, length, and tone you want, every time.

Keep Reading


Want these techniques applied automatically? PromptWizz rewrites your prompt for Claude specifically — structure, role, and output spec included. Try it free.

Frequently Asked Questions

What makes prompting Claude different from prompting ChatGPT?
Claude rewards structure and context more heavily. XML-style tags (<context>, <instructions>, <example>) help it parse complex prompts, and it handles very long documents well when the question comes after the content. ChatGPT tends to do fine with terser, markdown-styled prompts; Claude shines when you are thorough up front.
Should I use XML tags in Claude prompts?
Yes, for anything beyond a simple question. Wrapping sections in tags like <context>...</context> and <instructions>...</instructions> gives Claude unambiguous boundaries between background, task, and examples. This article includes a copy-paste template that uses this structure.
How do I prompt Claude with a long document?
Paste the document first and ask your question at the end. Putting instructions after the content consistently produces better answers on long inputs. For multiple documents, wrap each in its own tag (<doc1>, <doc2>) and refer to them by name.
How do I get Claude to reason more carefully?
Ask it to think step by step before giving a final answer, or give it explicit steps to follow. For high-stakes analysis, frameworks like Chain-of-Thought and Tree-of-Thought (covered in our frameworks guide) structure the reasoning and make it easy to audit.
What are common mistakes when prompting Claude?
The big three: vague roles ("you are an expert"), burying the question in the middle of a long prompt, and long lists of things NOT to do. Fix them with a specific persona, question-last ordering for long context, and positive instructions that say what you want instead.
claudepromptingguidetemplates

Ready to Apply These Techniques?

Try PromptWizz and see your prompts transform instantly with the frameworks discussed above.

Start Optimizing Free
    llms.txt