Good Claude prompts follow a short list of habits that Anthropic documents in its prompting best practices: be clear and direct, explain why, show examples, separate parts with XML tags, give Claude a role, and put long documents before the question. Below, each technique is explained with Anthropic’s own example prompts, followed by five ready prompts from Anthropic’s prompt library that you can copy.

On this page

1. Be clear and direct

Anthropic’s core advice is to treat Claude like “a brilliant but new employee who lacks context on your norms and workflows.” It adds a test it calls the golden rule: show your prompt to a colleague with minimal context. “If they’d be confused, Claude will be too.”

Be specific about format and constraints, and use numbered steps when order matters. If you want more than the minimum, ask for it. Anthropic’s less effective prompt:

Create an analytics dashboard

And the more effective version:

Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics to create a fully-featured implementation.

2. Explain why an instruction matters

Context behind a rule helps Claude apply it in cases you didn’t list. Anthropic’s example replaces a bare command:

NEVER use ellipses

with the reason behind it:

Your response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them.

“Claude is smart enough to generalize from the explanation,” the docs say.

3. Use examples

Anthropic calls examples “one of the most reliable ways to steer Claude’s output format, tone, and structure.” Its guidance:

  • Make examples relevant to your real use case.
  • Make them diverse, so Claude doesn’t copy an accidental pattern.
  • Wrap them in tags so Claude can tell examples from instructions.

It recommends 3 to 5 examples. You can also ask Claude to check your examples or write more based on them.

4. Structure prompts with XML tags

When a prompt mixes instructions, context, examples and inputs, wrapping each part in its own tag “reduces misinterpretation.” Use consistent, descriptive tag names, and nest tags when the content has a hierarchy. Anthropic’s multi-document example looks like this:

<documents>
  <document index="1">
    <source>annual_report_2023.pdf</source>
    <document_content>
      {{ANNUAL_REPORT}}
    </document_content>
  </document>
  <document index="2">
    <source>competitor_analysis_q2.xlsx</source>
    <document_content>
      {{COMPETITOR_ANALYSIS}}
    </document_content>
  </document>
</documents>

Analyze the annual report and competitor analysis. Identify strategic advantages and recommend Q3 focus areas.

5. Give Claude a role

A role in the system prompt “focuses Claude’s behavior and tone for your use case. Even a single sentence makes a difference.” Anthropic’s example:

You are a helpful coding assistant specializing in Python.

In the Claude apps, project instructions do a similar job. Our system prompt guide covers where to set them.

6. Put long documents first

For inputs of 20K tokens or more, Anthropic says to place the long material at the top of the prompt, above the question and instructions. It reports that “queries at the end can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs.”

For long-document tasks, it also suggests asking Claude to quote the relevant parts first and then answer from those quotes. That helps Claude ignore the rest of the document.

7. Control the output format

Anthropic lists several ways to steer formatting:

  1. Say what to do instead of what not to do. Use “Your response should be composed of smoothly flowing prose paragraphs” instead of “Do not use markdown in your response.”
  2. Use XML format indicators, such as asking for prose inside <smoothly_flowing_prose_paragraphs> tags.
  3. Match your prompt style to the output. Less Markdown in your prompt tends to mean less Markdown in the answer.

8. Ask for action when you want action

Claude follows instructions precisely. “Can you suggest some changes to improve this function?” may get you suggestions only. If you want the edits made, say so:

Change this function to improve its performance.

9. Let Claude think, and ask it to check

Current Claude models use adaptive thinking. Anthropic advises general instructions over hand-written step lists: “A prompt like ‘think thoroughly’ often produces better reasoning than a hand-written step-by-step plan.” It also suggests a self-check at the end:

Before you finish, verify your answer against [test criteria].

Asking Claude to write out step-by-step reasoning is a fallback for when thinking is off. On the newest models, the docs say to rely on thinking instead.

Official Claude prompts you can copy

Anthropic publishes ready prompts in its prompt library. Most are system prompts: paste the text as the instructions, then send your material as the message. We keep each one in our library with a copy button.

Meeting notes to action items (Anthropic: Meeting scribe, our listing):

Your task is to review the provided meeting notes and create a concise summary that captures the essential information, focusing on key takeaways and action items assigned to specific individuals or departments during the meeting. Use clear and professional language, and organize the summary in a logical manner using appropriate formatting such as headings, subheadings, and bullet points. Ensure that the summary is easy to understand and provides a comprehensive but succinct overview of the meeting's content, with a particular focus on clearly indicating who is responsible for each action item.

Fix grammar while keeping the meaning (Anthropic: Grammar genie, our listing):

Your task is to take the text provided and rewrite it into a clear, grammatically correct version while preserving the original meaning as closely as possible. Correct any spelling mistakes, punctuation errors, verb tense issues, word choice problems, and other grammatical mistakes.

Find and fix bugs in Python (Anthropic: Python bug buster, our listing):

Your task is to analyze the provided Python code snippet, identify any bugs or errors present, and provide a corrected version of the code that resolves these issues. Explain the problems you found in the original code and how your fixes address them. The corrected code should be functional, efficient, and adhere to best practices in Python programming.

Optimize Python performance (Anthropic: Code consultant, our listing):

Your task is to analyze the provided Python code snippet and suggest improvements to optimize its performance. Identify areas where the code can be made more efficient, faster, or less resource-intensive. Provide specific suggestions for optimization, along with explanations of how these changes can enhance the code's performance. The optimized code should maintain the same functionality as the original code while demonstrating improved efficiency.

Google Apps Script for Slides (Anthropic: Google apps scripter, our listing). This one is a plain user message:

Write me a Google apps script that will translate all text in a Google Slides presentation to Korean.