Keep this open while you work in Claude. It has the prompt formula that makes answers sharper, the XML tags and output modifiers Claude responds to, and the phrases that switch on Artifacts, web search, and thinking. Every table is copy-paste ready. For finished prompts built on these, see the best Claude prompts and Claude prompt templates.

Advertisement

The RTCF formula

Almost every strong Claude prompt has four parts: Role, Task, Context, Format.

PartWhat to write
RoleWho Claude should be — sets standards, vocabulary, and point of view.
TaskThe one thing to do, stated precisely.
ContextBackground, material, and constraints — wrapped in XML tags.
FormatThe shape of the answer: length, structure, table/JSON/diff/Artifact.
Act as a senior product marketer. [Role]
Write a launch announcement for our new analytics dashboard. [Task]
<context>
Audience: existing Pro-plan customers. New: real-time charts + CSV export. Brand voice: friendly, plain-spoken.
</context>
Under 150 words, one call to action ("View your dashboard"), no hype words. Return the subject line, then the email body. [Format]

You don't need the literal labels once it's habit — just keep the four ideas present and in order.

XML tags — Claude's superpower

Claude was trained to respect XML tags. Wrap each input in a named tag so Claude knows what it is and never confuses your material with your instructions.

TagUse it for
<document> … </document>A report, contract, or PDF you pasted
<code> … </code>Source code to review, fix, or explain
<error> … </error>A stack trace or error message
<data> … </data>A CSV, table, or dataset
<transcript> … </transcript>A meeting or interview transcript
<samples> … </samples>Examples of your voice or on-brand copy to match
<example> … </example>A worked example of the output you want (multishot)

Then reference them by name: "rewrite the text in <draft> using the voice in <samples>".

Role modifiers

Open with a role to set Claude's perspective and standards. In the API or a Project, put it in the system prompt so it persists.

Role phraseWhat it changesUse for
Act as a staff software engineerIdiomatic code, edge cases, trade-offsCode review, architecture
Act as a strict line editorTightens, cuts, flags weak linesRewrites, proofreading
Act as a skeptical reviewerPushes back, lists risks and gapsPlans, proposals, decisions
Act as a data analystStructured findings, caveats on the dataSpreadsheets, reports
Act as a patient tutorStep-by-step, checks understandingStudying, explanations
Act as my chief of staffPrioritizes, organizes, decidesPlanning, triage
Act as a subject-matter expert in [field]Domain terms, current best practiceTechnical or niche topics

Output-format modifiers

Claude follows explicit format instructions reliably. Add one to the Format part of your prompt.

Say thisYou get
Return a table with columns X, Y, ZA clean markdown table, no preamble
Return valid JSON matching this schema: {...}Parseable JSON only, no prose
Point to the specific lines; don't rewrite the fileA scoped change, not a full rewrite
Put it in an ArtifactA live, editable panel you can iterate on
Give me numbered step-by-step instructionsOrdered steps to follow
Keep it under [N] wordsA hard length cap Claude respects
Answer first, then explainThe conclusion up front, reasoning after
Advertisement

Thinking

Extended thinking makes Claude reason step by step before answering. Match it to the difficulty.

SituationThinking?
Quick rewrite, lookup, simple summary, tone changeOff — keep it fast
Everyday drafting, analysis, multi-step instructionsOptional
Debugging, code architecture, math/logic, forecastingOn — "think step by step before answering"
High-stakes decisions where a wrong answer is costlyOn

On Fable 5, adaptive thinking is always on and scales itself, so you rarely toggle anything.

Feature triggers

These phrases and features change what Claude can do. Include one when you want live data, a live document, or persistent context.

Phrase / featureWhat it does
"Put this in an Artifact", "make it editable"Renders code, docs, or a working app in a live side panel
"Search the web", "cite current sources"Web search — live results with citations
"Use the analysis tool", "compute this with code"Runs code on your data for exact results and charts
"Think step by step before answering"Turns on visible reasoning before the answer
ProjectsSaved workspace with shared files, style, and instructions
StylesA saved writing voice applied to every reply
Claude CodeAgentic coding in your terminal/IDE across a real repo

Model picker

Same prompt text; pick the model for the job.

ModelBest for
Claude Opus 4.8Strong default — coding, hard reasoning, long tasks
Claude Fable 5 (Mythos-class)The most complex, long, multi-step work; 1M context, always-on thinking
Claude Sonnet 5Agentic all-rounder, great value for everyday and browser/terminal work
Claude Haiku 4.5Fast and cheap for high-volume simple tasks

Example prompts

Six complete prompts assembled from the tables — a role, a format, and where useful a feature trigger, wrapped in RTCF.

1. Grounded market summary

Act as a market analyst. Give me the current state of the [market] market. Search the web and cite current sources. Return a table (Brand, Flagship, Price band, Standout feature), then 3 bullets on where it's heading. Under 300 words.

Best for: fast, sourced overviews. (Web search on)

2. Code review

Act as a staff engineer. Think step by step. Review this for correctness, edge cases, and security.
<code>
[paste code]
</code>
List issues most severe first with the line and a fix. Don't rewrite the whole file.

Best for: catching real bugs. (Opus 4.8, thinking on)

3. Doc summary

Summarize this for a [role] who cares about [priority].
<document>
[paste or attach the document]
</document>
3-sentence executive summary, then 7 key points in priority order, then any numbers and deadlines verbatim.

Why it works: the tag plus the priority focus keeps the summary useful, not generic.

4. Rewrite in my voice

Learn my voice from <samples> and write [the piece] in it.
<samples>
[paste 2-3 pieces of your writing]
</samples>
First describe my voice in 5 bullets, then write the piece. Don't drift into generic style.

Best for: on-voice drafts. (Save as a Style to reuse)

5. Data question

Answer this from my data. Use the analysis tool; show your work.
<data>
[attach the CSV]
</data>
Question: [precise question]. Give the exact number, the calculation, and any assumption.

Best for: trustworthy numbers. (Analysis tool on)

6. Build a tool

Build a working single-file [tool] as an Artifact. One self-contained HTML file, no dependencies, clean responsive UI, handle empty and error states. After it works, suggest 3 features to add.

Best for: instant prototypes. (Artifact)

Want ready-made skeletons? Grab Claude prompt templates, or browse the best Claude prompts for finished examples.

Frequently Asked Questions

What is the RTCF prompt formula for Claude?

RTCF stands for Role, Task, Context, Format. Give Claude a role to set standards and vocabulary, state the task precisely, provide the context it needs (wrapped in XML tags), and specify the output format. Keeping all four present removes most of the guesswork that causes vague or off-target answers.

Why does Claude respond so well to XML tags?

Claude was trained to pay attention to XML tags, so wrapping each input in a named tag — <document>, <code>, <data>, <example> — tells Claude exactly what each block is and where it starts and ends. This keeps long or multi-part prompts organized and stops Claude from confusing your source material with your instructions. Tags are optional but reliably improve control.

When should I turn on extended thinking?

Turn it on for hard reasoning — math and logic, code architecture and debugging, multi-document synthesis, and high-stakes decisions — where you want Claude to reason before answering. Leave it off for quick rewrites, simple lookups, and formatting where speed matters. Fable 5 runs adaptive thinking automatically and scales it to the task.

Which Claude model should I pick?

Opus 4.8 is the strong default for coding and hard reasoning. Fable 5, the top Mythos-class model, is best for the most complex, long tasks with its 1M-token context and always-on adaptive thinking. Sonnet 5 is the agentic all-rounder and great value for everyday and browser/terminal work. Haiku 4.5 is the fast, cheap option for high-volume simple tasks.

Do format instructions like "return only a diff" work?

Yes. Claude follows explicit output-format instructions reliably — ask for a diff, a table, JSON, numbered steps, an Artifact, or a strict word count and it honors the structure. Put the format instruction in the Format part of your prompt so it isn't buried in context, and be specific about what you don't want too (e.g. "no preamble").

When should I use a Project instead of a one-off prompt?

Use a Project when you repeat work in the same context — a codebase, a client, a book, a brand. Add your background, files, style, and custom instructions as project knowledge, and Claude carries them into every chat inside the Project, so you stop re-explaining. Use a one-off prompt for anything you only do once.

Advertisement