Claude Prompt Guide Cheat Sheet

Anthropic Claude-specific prompting — XML tags, long context handling, thinking mode, artifacts, and Claude 3.

Last Updated: May 1, 2025

Claude-Specific Techniques

ItemDescription
XML Tag StructuringWrap in , , — Claude follows boundaries precisely
Thinking / ScratchpadUse tag — Claude shows reasoning before final answer
Long Context (200K)Process entire books. Use 'quote the exact passage where...' for needle-in-haystack.
ArtifactsGenerate standalone HTML/CSS, React, SVG, Mermaid — ask for interactive demos
Multi-Step InstructionsNumber steps: '1. ... 2. ...' — follows sequential instructions exceptionally well
Constraint StackingHandles many constraints simultaneously — layer without losing earlier ones

Prompt Structure Template

Expert code reviewer
Define role in XML for clear boundary
React + TypeScript app
Set domain context
1. Check bugs 2. Suggest improvements 3. Output JSON
Numbered steps
Under 200 words. No new dependencies.
Hard limits
{issues:[], suggestions:[]}
Exact schema

Capabilities (Claude 3.5 Sonnet)

ItemDescription
Code GenerationTop-tier — better than GPT-4 on many benchmarks for complex refactors
VisionAnalyze charts, screenshots, diagrams — describe specific regions for precision
Tool UseFunction calling via API — same pattern as OpenAI with XML tool descriptions
Extended ThinkingClaude 3.7 Sonnet — allocate thinking budget for complex reasoning
PDF ProcessingExtracts text, tables, structure natively — no OCR needed

Pitfalls

ItemDescription
Over-enthusiasmCan try too hard — set strict 'say you don't know' guardrails
VerbosityCan be wordy. Add 'Be concise. Bullet points over paragraphs.'
Refusal SensitivityRephrase borderline requests as hypothetical or academic discussion
Hallucination >50KFact recall degrades in long context — use 'quote exact text' to verify
Pro Tip: Claude excels at structured instructions. Use XML tags (, ) to organize complex prompts — Claude respects tag boundaries better than most models.