FindPrompts
Claude6 min

Claude Cheatsheet

A focused reference for Anthropic's Claude. Covers the prompting patterns Claude responds to best plus model selection and the web app's projects and artifacts.

XML Tags

Why XMLClaude is tuned to respect XML structure; tags cleanly separate parts of a prompt.
<document>Wrap reference material: <document>...</document> so Claude treats it as source.
<instructions>Isolate the task from data to reduce instruction/leak confusion.
<example>Tag few-shot examples; nest <input> and <output> inside.
<thinking>Ask Claude to reason inside <thinking> tags, then answer outside them.
Custom tagsAny tag name works. Name them meaningfully, e.g. <user_data>, <rules>.

System Prompts

Role in systemSet persona and high-level rules in the system prompt, task in the user turn.
Persistent rulesSystem prompt applies to the whole conversation; use it for constraints.
Tone & formatDefine output style here so you don't repeat it every message.
GuardrailsState what Claude must refuse or always include up front.

Model Tiers

OpusMost capable; best for complex reasoning, coding, and agentic work.
SonnetBalanced speed and intelligence; the default workhorse for most tasks.
HaikuFastest and cheapest; great for high-volume, low-latency, simple tasks.
Pick by taskUse Haiku to triage, Sonnet to do, Opus for the hardest 10%.

Output Control

PrefillStart the assistant turn with text (e.g. "{") to force JSON or skip preamble.
Skip the preamblePrefill with the first word of the answer to cut "Sure, here's..." filler.
Stop sequencesDefine strings that halt generation, e.g. "\n\n" or "</answer>".
Format with examplesShow one fully-formatted example; Claude matches structure reliably.

Long-Context Tips

Docs at the topPlace long documents before the question; ~30% accuracy gain on long inputs.
Quote firstAsk Claude to extract relevant quotes before answering to ground responses.
Index documentsNumber or tag each doc so Claude can cite "Document 3" precisely.
200K+ windowClaude handles very long contexts; still front-load what matters most.

Claude App Features

ProjectsPersistent workspaces with shared knowledge files and custom instructions.
ArtifactsLive-rendered code, docs, and apps in a side panel you can iterate on.
Knowledge baseUpload files to a Project so Claude references them in every chat there.
Custom instructionsPer-Project guidance that shapes tone and behavior for that context.
Computer use / toolsConnect tools and MCP servers so Claude can take actions, not just chat.

Want ready-to-use prompts to go with this cheatsheet?

Browse 30,000+ Prompts

Command Palette

Search for a command to run...