Claude prompts
Prompts and techniques for Anthropic's Claude: long documents, careful reasoning, structured output and code.
-
Claude Multishot Reasoning With example Tags
Multishot prompting works effectively with extended thinking: when you provide 3 to 5 diverse examples inside <examples><example>...</example></examples> tags showing how to think through edge cases, Claude follows simil
-
Claude Extended Thinking in Other Languages
Claude developer guides note that Extended Thinking performs best in English, even though final outputs can be generated in any language Claude supports. Instruct the model to conduct its internal deliberation in English
-
Reduce Claude Adaptive Thinking on Long System Prompts
Large or complex enterprise system prompts can cause Claude to trigger adaptive thinking more often than desired on straightforward queries. Add explicit guidance to steer the trigger threshold and keep latency low on ro
-
Steer Claude Adaptive Thinking After Tool Use
According to Anthropic's internal evaluations, adaptive thinking reliably drives better performance than extended thinking by scaling deliberation to query complexity. Because adaptive thinking trigger behavior is prompt
-
Fix Claude Over-Triggering Tools in Your Prompts
In older models, developers used emphatic capitalization like "CRITICAL: You MUST use this tool". Anthropic's best practices note that on newer Claude models, overly aggressive language can cause tools to overtrigger. Re
-
Claude Read-Only Audit Mode Prompt
When auditing production infrastructure or security configurations, proactive tool execution can cause unintended mutations. Injecting the <donotactbeforeinstructions> block restricts Claude to research, analysis, and re
-
Explain Why: The Claude Prompt Motivation Rule
Claude generalizes edge-case rules more reliably when you provide context and motivation explaining why a constraint is required rather than issuing a bare prohibition. Anthropic's documentation notes that explaining why
-
Claude Prefill Deprecated: Migrate to Structured Outputs
In earlier Claude 3 models, engineers prefilled the assistant turn with { to force JSON output. Per Anthropic's official migration guide, starting with Claude 4.6 and preview models, prefilling assistant turns is unsuppo
-
Claude Quote Extraction Prompt to Reduce Hallucinations
To keep Claude from going beyond the legal text, ask it to extract verbatim passages into <quotes> tags before it writes its analysis. Anthropic's prompting guide describes this quote-first step for long documents (it de
-
Write Build and Test Commands by Hand, Not /init
Developer guides warn against relying on generic auto-generated configs from /init (and note that Claude Code appending memory at the bottom of CLAUDE.md is often undesirable—edit CLAUDE.md directly to solve concrete cod
-
CLAUDE.md Hierarchy: The 4-Tier Merge Order
Claude Code loads and merges CLAUDE.md files in four ordered locations: (1) /.claude/CLAUDE.md (global personal instructions), (2) ./CLAUDE.md (git-shared project root), (3) subdirectory CLAUDE.md files (scoped rules for
-
Claude Parallel Tool Calls: How to Trigger Them
Anthropic's documentation notes that the latest Claude models natively execute independent tool calls—such as reading multiple files or performing speculative searches—in parallel. Prompt the model to batch independent r
-
Claude Extended Thinking Budget: How Many Tokens to Set
Developer documentation for Claude's Extended Thinking notes that thinking tokens have a minimum budget of 1024 tokens, and recommends starting with the minimum budget and increasing incrementally. For workloads where th
-
Claude default_to_action Tag: Control Agent Autonomy
By default, conversational models may suggest code changes rather than executing them. Wrapping an explicit proactive directive in <defaulttoaction> tags inside the system prompt instructs Claude to implement edits by de
-
Stop Claude Markdown Output by Removing It From Prompts
Negative constraints like "Do not use markdown" often underperform because Claude's response style is influenced by the formatting style used in your prompt. To obtain plain prose paragraphs, remove markdown from your pr
-
Stop Claude Preambles With Positive Instructions
Because Claude tends to be chatty at the beginning of responses, and assistant prefills like "Here is the requested summary:\\n" are deprecated in newer models, use direct system prompt instructions paired with XML outpu
-
Claude Prompt Improver: A 4-Step Refinement Workflow
Replicate the 4-stage refinement process of Anthropic's Prompt Improver—Example identification, Initial draft with XML tags, Chain of thought refinement, and Example enhancement—to upgrade rough prompt templates. …
-
Claude Prompt Chaining With XML Handoffs
Breaking a complex task into smaller, single-objective subtasks via prompt chaining improves accuracy, simplifies troubleshooting, and provides cleaner traces than one opaque model call. Use XML tags to pass structured o
-
Claude Task Contract: The 6-Part Prompt Specification
PromptLayer's production guide observes that the best Claude prompts look like engineering specs rather than clever prose, starting with a 6-part Task Contract covering Input, Output, Rules, Context, Failure behavior, an
-
Claude Long-Context Prompts: Put Documents First
When prompting Claude with 20,000+ tokens of context, placing your instructions above the documents degrades retrieval accuracy. Official Anthropic documentation notes that placing long documents and inputs near the top