subagentprompts

.com prompt engineering
14 techniques, live from D1

Techniques

Real prompting techniques and guardrails, each citing the exact doc it came from. Filter by category:

titlecategoryapplies toguidance
The reference is organized model-specific, then general, then migration
tec_best_practices_structure
general all Anthropic's own prompting-best-practices reference for Claude's latest models (Fable 5, Mythos 5, Opus 4.8/4.7/4.6, Sonnet 5/4.6, Haiku 4.5) is organized in three parts, in this order: model-specific guidance first (where Fable 5, Sonnet 5, and Opus 4.8 behave differently and what to change), general techniques for all current models second, and migration considerations for prompts moving from earlier generations last.
Specify the exact output format
tec_increase_consistency_format
guardrail all Precisely define the desired output format (JSON, XML, or a custom template) so Claude understands every formatting element required, rather than describing the shape loosely.
Prefill is not supported on Fable 5 — use structured outputs or system instructions instead
tec_increase_consistency_no_prefill_on_fable
guardrail claude-fable-5 Prefilling the Assistant turn is a real technique for format consistency, but it is explicitly NOT supported on Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 4.8/4.7/4.6, or Claude Sonnet 4.6.
Explicitly allow "I don't know"
tec_reduce_hallucinations_idk
guardrail all Give Claude explicit permission to admit uncertainty — this simple technique can drastically reduce false information.
Extract direct quotes before analysis on long documents
tec_reduce_hallucinations_quotes
guardrail all For documents over roughly 20k tokens, ask Claude to extract word-for-word quotes first before performing its task.
Automatic caching needs one field; explicit breakpoints give fine control
tec_prompt_caching_automatic
infrastructure all Prompt caching resumes from specific prefixes to cut processing time and cost on repeated or consistent prompts.
Define exactly when Fable 5 should pause vs. proceed
tec_fable5_autonomy_checkpoint
model specific claude-fable-5 "Pause for the user only when the work genuinely requires them: a destructive or irreversible action, a real scope change, or input only they can provide.
Consider all effort levels, not just the highest
tec_fable5_effort_levels
model specific claude-fable-5 Effort is the primary lever for the intelligence/latency/cost trade-off on Fable 5.
Lead with the outcome, not the reasoning trail
tec_fable5_lead_with_outcome
model specific claude-fable-5 "Lead with the outcome.
Effort defaults to high; instructions are read literally, especially at low effort
tec_sonnet5_effort_literalism
model specific claude-sonnet-5 On Claude Sonnet 5, effort defaults to high (same as Sonnet 4.6); raise to xhigh for the hardest coding/agentic tasks.
Calibrate verbosity explicitly rather than assuming a fixed style
tec_sonnet5_verbosity
model specific claude-sonnet-5 Claude Sonnet 5 calibrates response length to task complexity rather than defaulting to a fixed verbosity — shorter answers on simple lookups, longer ones on open-ended analysis.
Accepted advisor pairings, verbatim
tec_advisor_accepted_pairings
tooling all The advisor must be at least as capable as the main model.
Pair a Sonnet main model with a Fable 5 advisor
tec_advisor_pairing_sonnet_fable
tooling sonnet+fable The advisor tool lets Claude consult a second, typically stronger model at key moments during a task — before committing to an approach, when stuck on a recurring error, or before declaring a task complete.
Use the Console prompt improver for complex, high-accuracy tasks
tec_prompting_tools_improver
tooling all The prompt improver enhances a prompt template in four steps: locate and extract examples, produce a structured initial draft with XML tags, add chain-of-thought refinement, then enhance the examples to demonstrate the new reasoning.

Machine-readable version: GET /api/prompt-techniques