Blog/Anthropic Prompt Library Examples
Prompt EngineeringAnthropicClaude AI
12 min read

Anthropic Prompt Library Examples: 50+ Claude Templates

A curated collection of prompt templates following Anthropic's best practices for Claude AI. Includes XML formatting, thinking tags, and real-world examples.

Quick Summary

Anthropic's Claude AI works best with structured prompts that leverage XML tags and clear instructions.

  • XML formatting helps Claude parse complex multi-part prompts
  • Thinking tags enable step-by-step reasoning before responses
  • 50+ examples below covering coding, analysis, writing, and creative work

What is the Anthropic Prompt Library?

Anthropic, the company behind Claude AI, provides guidance on effective prompting through their documentation. This page contains examples inspired by Anthropic's best practices, formatted for immediate use with Claude.

Key principles from Anthropic's approach include:

  • Be specific - Tell Claude exactly what you want, including format, length, and tone
  • Use XML tags - Structure complex prompts with tags like <task>, <context>, <requirements>
  • Provide examples - Show Claude what good output looks like
  • Enable thinking - Let Claude reason through problems step-by-step
  • Assign roles - Give Claude a persona or expertise level

Save All 50+ Prompts to Your Library

Don't copy-paste one by one. Create a free account to save all Anthropic-style prompts, organize them, and use AI Optimizer to customize.

Free forever
No credit card

Anthropic-Style Prompt Examples

Copy-paste ready prompts following Anthropic's recommended formatting. Each example uses XML structure for optimal Claude performance.

Coding & Development

Anthropic-style prompts for code generation and review

Code Review with Anthropic XML Format
Code Review
Structured code review following Anthropic's XML guidelines
<task>Review this code and provide detailed feedback</task>

<code>
{{PASTE_YOUR_CODE_HERE}}
</code>

<review_criteria>
  <security>Check for vulnerabilities, injection risks, and unsafe patterns</security>
  <performance>Identify bottlenecks, inefficient algorithms, and memory issues</performance>
  <maintainability>Assess readability, naming conventions, and documentation</maintainability>
  <best_practices>Verify adherence to language-specific conventions</best_practices>
</review_criteria>

<output_format>
  For each issue found:
  1. Location (file/line if applicable)
  2. Severity (Critical/High/Medium/Low)
  3. Description of the issue
  4. Suggested fix with code example
</output_format>
Function Generator with Thinking
Code Generation
Use Claude's thinking capability for complex function design
<task>Create a well-designed function</task>

<requirements>
  <function_name>{{FUNCTION_NAME}}</function_name>
  <language>{{LANGUAGE: TypeScript, Python, etc.}}</language>
  <purpose>{{DESCRIBE_WHAT_IT_SHOULD_DO}}</purpose>
  <inputs>{{EXPECTED_INPUTS}}</inputs>
  <outputs>{{EXPECTED_OUTPUTS}}</outputs>
</requirements>

<thinking>
Before writing the code, think through:
- Edge cases that need handling
- Error conditions and how to handle them
- Performance considerations
- Type safety (if applicable)
</thinking>

<output>
Provide:
1. The complete function with type annotations
2. JSDoc/docstring documentation
3. Unit test examples
4. Usage example
</output>

Research & Analysis

Deep analysis prompts with structured output

Comprehensive Research Analysis
Research
Multi-source research synthesis with citations
<task>Conduct comprehensive research analysis</task>

<topic>{{YOUR_RESEARCH_TOPIC}}</topic>

<research_parameters>
  <scope>{{Broad overview / Deep dive / Comparative analysis}}</scope>
  <perspective>{{Academic / Business / Technical / Consumer}}</perspective>
  <time_frame>{{Last 6 months / Last year / All time}}</time_frame>
</research_parameters>

<analysis_framework>
  <current_state>What is the current landscape?</current_state>
  <key_players>Who are the major stakeholders?</key_players>
  <trends>What patterns are emerging?</trends>
  <challenges>What obstacles exist?</challenges>
  <opportunities>What gaps can be exploited?</opportunities>
  <predictions>Where is this heading?</predictions>
</analysis_framework>

<output_requirements>
  <format>Structured report with sections</format>
  <length>2000-3000 words</length>
  <citations>Include sources where possible</citations>
  <visuals>Suggest charts/graphs where helpful</visuals>
</output_requirements>
Document Summarization
Analysis
Extract key insights from long documents
<task>Summarize and extract key insights</task>

<document>
{{PASTE_DOCUMENT_OR_DESCRIBE_CONTENT}}
</document>

<extraction_goals>
  <main_thesis>What is the central argument or purpose?</main_thesis>
  <key_points>List 5-7 most important points</key_points>
  <evidence>What data or examples support the claims?</evidence>
  <implications>What are the practical takeaways?</implications>
  <questions>What questions remain unanswered?</questions>
</extraction_goals>

<output_format>
  <executive_summary>2-3 sentences</executive_summary>
  <detailed_breakdown>Bullet points by section</detailed_breakdown>
  <action_items>Concrete next steps if applicable</action_items>
</output_format>

Writing & Content

Content creation with Anthropic's structure

Blog Post with SEO Focus
Content Writing
SEO-optimized long-form content generation
<task>Write a comprehensive blog post</task>

<topic>{{YOUR_TOPIC}}</topic>

<seo_requirements>
  <primary_keyword>{{MAIN_KEYWORD}}</primary_keyword>
  <secondary_keywords>{{KEYWORD_1, KEYWORD_2, KEYWORD_3}}</secondary_keywords>
  <search_intent>{{Informational / Transactional / Navigational}}</search_intent>
</seo_requirements>

<content_specifications>
  <length>2000-2500 words</length>
  <tone>{{Professional / Conversational / Technical}}</tone>
  <audience>{{Describe target reader}}</audience>
  <format>
    - H1 title (include primary keyword)
    - Meta description (150-160 chars)
    - Introduction with hook
    - 4-6 H2 sections with H3 subsections
    - Bulleted lists where appropriate
    - Conclusion with CTA
  </format>
</content_specifications>

<examples>
Provide 1-2 examples of the style you want
</examples>
Email Sequence Generator
Email Marketing
Multi-email nurture sequence with personalization
<task>Create an email nurture sequence</task>

<campaign_context>
  <product>{{YOUR_PRODUCT_OR_SERVICE}}</product>
  <goal>{{Lead nurturing / Onboarding / Re-engagement}}</goal>
  <audience>{{Describe your audience}}</audience>
  <sequence_length>{{NUMBER}} emails over {{TIMEFRAME}}</sequence_length>
</campaign_context>

<email_requirements>
  For each email provide:
  <subject_line>Compelling, under 50 chars</subject_line>
  <preview_text>Supporting hook, under 90 chars</preview_text>
  <body>
    - Personal opening
    - Value proposition
    - Single clear CTA
    - P.S. line if appropriate
  </body>
  <send_timing>Day and suggested time</send_timing>
</email_requirements>

<brand_voice>
  <tone>{{Friendly / Professional / Urgent}}</tone>
  <personality>{{Describe brand personality}}</personality>
</brand_voice>

Want 100+ More Claude Prompts?

Check out our complete Claude AI prompts guide with advanced techniques, XML formatting deep-dive, and prompts for every use case.

Read Full Guide

Start Using These Prompts Today

Create a free account to save all Anthropic-style prompts, organize by project, and get AI-powered suggestions to improve them.

Free forever plan
No credit card required
Save up to 50 prompts free
AI

About the Author

This guide was created by the AI Prompt Library team. We maintain a collection of 10,000+ prompts for Claude, ChatGPT, and other AI models.