How To Prompt Claude
Good Claude prompting starts before the prompt: define success criteria, build a way to test them, and then improve a draft prompt with structure, examples, and explicit verification.
The official prompt-engineering overview asks for success criteria, a way to test them, and a first draft prompt before tuning.
Source: Prompt engineering overview Citable fact Self-checkAnthropic’s prompting best-practices page recommends asking Claude to verify the answer against test criteria before finishing.
Source: Prompting best practicesBefore Prompt Engineering
Anthropic’s prompt-engineering overview is unusually pragmatic: it starts with success criteria, empirical tests, and a first draft prompt. That order prevents prompt tweaks from becoming superstition. If you cannot tell whether output improved, you are not engineering yet.
Write a small eval set before tuning. For writing tasks, include examples of good and bad output. For extraction, include edge cases and expected JSON. For coding, include tests. For research, include citation requirements and unsupported-claim checks.
Give Claude Structure
Claude responds well to explicit context boundaries. Separate role, objective, source material, constraints, output format, and acceptance criteria. XML-style tags can help when you provide multiple documents or want reliable section separation.
Avoid burying important constraints in prose. Put must-follow rules in a compact list and make the final deliverable shape unambiguous. If the output needs to be parsed by software, use structured outputs or strict tool use where possible rather than hoping prose remains valid JSON.
Use Examples Carefully
Few-shot examples are powerful when the format or judgment is hard to infer. They are also expensive if copied into every request without caching. Use the smallest example set that captures the real pattern, and pair it with prompt caching for repetitive production calls.
Examples should include hard cases, not just idealized samples. If you want Claude to refuse unsupported claims, show a case where the correct output says the source does not support the claim.
Prompting Agentic Work
For Claude Code or tool-heavy API agents, prompt for goals, constraints, checkpoints, and verification rather than micromanaging every internal step. Anthropic’s current best-practices page notes that general instructions can outperform prescriptive human-written steps on newer reasoning models.
For long work, ask Claude to preserve state, track assumptions, and verify with concrete evidence before reporting success. In code, “done” should usually mean tests, lint or build output, and a diff summary, not just an explanation.
Not every success criteria or failing eval is best solved by prompt engineering.
Cite This Page
Claude Central. "How To Prompt Claude." Last checked July 6, 2026. https://claudecentral.com/prompting
FAQ
What is the best Claude prompt formula?
There is no universal formula. A strong default is objective, context, constraints, source material, output format, examples if needed, and success criteria.
Should I ask Claude to think step by step?
Use current model-specific guidance. Newer models use adaptive thinking and effort controls; for user-facing answers, ask for careful reasoning and final verification rather than requesting hidden chain of thought.
When is prompting the wrong fix?
When the failure is caused by the wrong model, missing context, bad retrieval, insufficient tools, unrealistic latency budget, or no evaluation harness.