GPTPrompts.AI

Claude
Prompts.

Precision, nuance, and code. Our guide reveals the XML-based prompting techniques and extended thinking strategies that make Claude the premier choice for developers and writers seeking human-level quality.

Recommended toolLovableBuild apps and websites by chatting, no coding required.Start building

Affiliate link, we may earn a commission at no extra cost to you.

Tools we use and back

Featured tools

Tiles marked Ours are our own sites. Open slots are available to advertisers.

The Claude Difference: Nuance Over Hype

Anthropic's Claude models have become the developer's favorite for a reason: they follow complex instructions with a precision that often eludes other models. However, to get this performance, you must abandon "chatting" and start "structuring." Claude prompts are at their best when they use clear delimiters, logical blocks, and explicit reasoning steps.

Our guide dives deep into the specific Anthropic-recommended techniques, like using XML tags to separate content from instructions and extended thinking for complex reasoning, that allow Claude to process massive context windows without losing the thread of the conversation.

What Claude Does Well, and Where to Check It

Claude is a strong choice when the task involves a lot of text you supply: a contract, a long report, a codebase, a stack of interview notes. It keeps track of detailed instructions, follows a list of things not to do, and writes prose that needs less cleanup than most models. That makes it a good fit for editing, summarising documents you can open, reviewing code and drafting in a set voice.

It is weaker where every model is weak. It does not know what happened after its training data ends unless you give it a source or turn on web search, it can misread a table in a scanned PDF, and it will sometimes state a wrong figure with confidence. The prompts on this page are built around that: give Claude the material, tell it what to do when something is missing, and check the parts that matter before you use them.

  • Good fit: long-document summaries, code review, rewriting in a house style, turning notes into structured drafts.
  • Check carefully: numbers, dates, legal or medical claims, quotes attributed to people, anything about recent events.
  • Use another tool: live search with citations (Perplexity or Claude with web search on), or image generation.

Mastering XML Tag Structure

Claude is uniquely optimized to recognize XML tags. This is the single most effective way to improve its instruction-following.

The Nested XML Strategy

<instructions>

<goal>Analyze the data.</goal>

<constraints>No jargon.</constraints>

</instructions>

<content>

[Insert Long Text]

</content>

Worked Example: Summarise a Supplier Contract

Here is the XML pattern applied to a real job. You have a 30-page supplier agreement and need to brief your manager on renewal terms before Friday. A vague prompt such as "summarise this contract" gets you a generic overview. This version tells Claude what to look for, what to do when the contract is silent, and how to lay out the answer.

<instructions>
You are helping an operations manager prepare for a contract renewal.
Read the agreement in <contract> and answer the questions in <questions>.
For every answer, quote the clause number you relied on.
If the contract does not cover a question, write NOT IN CONTRACT.
Do not give legal advice. Flag anything a lawyer should review.
</instructions>

<questions>
1. When does the agreement renew, and how much notice is needed to cancel?
2. Can the supplier raise prices at renewal? By how much?
3. What happens if they miss a delivery date?
</questions>

<contract>
[paste the full agreement here]
</contract>

Put your answer in <answer> tags as a three-row table:
question, answer, clause.

A good answer gives three rows, each with a clause number you can look up, and at least one NOT IN CONTRACT or lawyer flag if the agreement is vague. If every row comes back confident and complete, be more careful, not less: open the clauses it cited and confirm the wording. The same structure works for leases, policies, grant terms and employee handbooks. Only the questions change.

Coding and Code Review

For code, give Claude the smallest useful slice: the diff, the function and the test that fails, not the whole repository. Say what the change is meant to do, which language version and framework you use, and what kind of feedback you want, for example correctness and security only, no style comments. Ask it to point to line numbers and to say when it cannot tell whether something is a bug without more context.

When Claude writes code, ask for a self-contained file or component so it opens as an artifact you can edit, and ask for the test that would have caught the original problem. Run that test yourself. Treat its review as a second reader, not an approval. Our Claude prompts for code review cover scoping a diff, security checks, migrations and comments a reviewer can post.

Writing That Does Not Sound Generic

Claude's default voice is fluent but recognisable. To get something that sounds like you or your organisation, show rather than describe. Paste a few paragraphs you wrote and liked, ask Claude to list what makes them distinctive, correct that list, and only then ask for the new draft. Add a short list of phrases you never use. It follows negative instructions well, so "no rhetorical questions, no exclamation marks, no 'in today's fast-paced world'" is worth including.

For editing, ask for changes as a list of before and after pairs with a one-line reason each, rather than a full rewrite. You keep control of the text and can accept or reject each change.

Hard Problems: Ask for the Working, Then Check It

For maths, logic, planning or a tricky refactor, ask Claude to reason step by step inside <thinking> tags and give only the conclusion inside <answer> tags, or switch on extended thinking if your plan includes it. This usually improves the answer and, just as useful, shows you where it went wrong. Read the first two or three steps closely. Most mistakes come from an assumption made early that the rest of the reasoning builds on.

Projects: Instructions and Files That Stay Put

If you run the same kind of task every week, set up a Project. Put the role, audience, format and banned phrases in the Project instructions, and upload the reference files: a style guide, last quarter's report, the API docs. Every chat in that Project starts with that context, so your weekly prompt can be two lines long. Review the instructions every month or so. Old rules that no longer apply quietly make every answer worse.

System Prompts in the API

In the API, the system prompt is where the standing rules go: who Claude is in this product, what it must never do, and the format of every reply. The user turn carries the request and any documents. Keep the system prompt short and specific, test it against awkward inputs such as an empty message or a request outside its scope, and version it like code so you know which wording produced which behaviour.

Common Mistakes

  • Asking without the source. "What does our refund policy say?" only works if you paste the policy.
  • Mixing instructions into the material. Wrap pasted text in tags so a line inside an email is not read as a command.
  • No rule for missing information. Tell Claude what to write when the answer is not there, or it may fill the gap.
  • Asking for everything at once. Split a big job into steps, check each output, then feed it into the next prompt.
  • Trusting a confident tone. Fluent prose is not evidence. Check figures, names and quotes against the original.
Future-Proofing: Computer Use

Prompting the Digital Agent

Claude is capable of using a computer the way a person does: viewing screens, moving cursors, and clicking buttons via the Computer Use API. Prompting for agents requires procedural instructions.

The Agent Framework:

"Use the browser to find the most recent [EVENT]. Once found, navigate to my CRM and update the [LEAD] status. If you encounter a login screen, alert me and wait for manual input."

Key Concept: 'Instruction Buffering'. Break complex agent tasks into clear, verifiable sub-goals.

Claude vs Perplexity AI: Which Should You Use?

Claude and Perplexity AI serve fundamentally different purposes. Claude (rated 4.6/5) is built for long-document analysis, nuanced writing, and extended reasoning sessions. Perplexity AI (rated 4.4/5) is an AI-powered search engine that cites real-time web sources, making it the better pick for research and fact-checking. Many power users run both.

Read the full Claude vs Perplexity comparison β†’

Claude Mastery FAQ

Why does Claude respond so well to XML tags?

Anthropic's own prompting guidance recommends XML tags for separating instructions, context and examples. Tags give Claude clear boundaries, so it is less likely to treat pasted material as an instruction, and you can ask for the answer inside a named tag that is easy to find and reuse.

How is prompting Claude different from prompting ChatGPT?

The basics are the same: a clear task, the source material and the output format. The differences are habits. Claude responds well to XML-tagged sections and to an explicit list of what not to do, and its default prose tends to be less list-heavy, so you may need fewer style instructions. Run the same prompt in both tools before deciding one is better for your task.

What are Claude Projects?

A Project is a workspace in the Claude apps with its own instructions and uploaded files. The instructions apply to every chat in that Project, which makes it useful for a house style, a coding convention or a recurring report. Keep the instructions short and put long reference material in the files instead.

How do I prompt Claude to write in a specific tone?

Paste two or three short samples of the voice you want inside <style_examples> tags and ask Claude to describe the tone, sentence length and vocabulary before it writes. Check that description, correct it if it is wrong, then ask for the new piece in that style. Samples work better than adjectives like 'friendly' or 'punchy'.

What is Artifacts and how do I prompt for it?

Artifacts is a side panel in the Claude apps for standalone content such as code, documents and diagrams. Ask for a self-contained file, component or diagram and Claude will usually open one. You can then ask for changes to that artifact by name instead of pasting it back into the chat.

Can Claude analyze images?

Yes. Claude can read images and PDFs you upload, including charts, screenshots and scanned pages. Ask a specific question, for example which line in a chart changes direction and when, and tell it to say when something is unreadable rather than guess.

How does Claude handle long documents compared to Gemini?

Both handle long documents, and context limits change with each model release, so check the current limit for the model you use. How you lay out the prompt matters more than the headline number: put the long document first, your question last, and ask Claude to quote the passages it relied on so you can check them.

Why does Claude sometimes refuse a request?

Anthropic trains Claude to follow a published set of principles. If it declines a legitimate request, say what the task is for and what you need. Refusals often come from missing context. Trying to trick the model usually produces a worse answer even when it works.

How do I prompt for reasoning in Claude?

Ask Claude to work through the problem inside <thinking> tags and give the final answer inside <answer> tags, or turn on extended thinking where your plan offers it. Then read the reasoning. A tidy chain of steps can still start from a wrong assumption, and that first step is where most errors hide.

Can I use Claude for SEO content?

Yes, if you supply the substance. Paste your own notes, data or interview quotes and ask for an outline that answers one specific reader question. Claude cannot see search volumes or rankings, so do not ask it to invent keywords, traffic figures or statistics.

How do I keep my Claude prompts consistent?

Save the parts that never change, such as role, audience, banned phrases and output format, as Project instructions or as a reusable template. Keep the parts that change, such as the draft or the data, in the message. When a prompt works, save that exact version rather than retyping it from memory.

What is the Claude Project knowledge base?

It is the set of files you upload to a Project, such as PDFs, documents and code. Claude can draw on them in every chat in that Project. Ask it to name the file and section it used, because it can still misread a table or blend two sources.

If you use Artifacts for code or document previews, our Claude Artifacts guide covers it in detail.

Don't stop here

What to read next

Hand-picked guides our readers explore right after this one.