← ContentsClaude API · intermediate

System prompts

A system prompt is a special instruction block that you send to Claude at the start of an API call to establish persistent behavioral guidelines, role, tone, and constraints for the entire conversation. Unlike user messages, which represent the back-and-forth dialogue, the system prompt acts as a foundational ruleset that shapes how Claude responds throughout a session — defining things like persona, output format, topic restrictions, and task-specific context. System prompts are passed via the `system` parameter in the Anthropic Messages API (or as a top-level string in the request payload). They are processed before any user turn and take precedence over conversational context. Because the API is stateless, the system prompt must be included on every API call to maintain consistent behavior across multiple requests. Importantly, system prompts used in Claude's web interface (claude.ai) are separate and distinct from API system prompts. Anthropic periodically updates claude.ai's built-in system prompt, but those changes do not affect API calls — API developers retain full control over what system prompt (if any) their application sends.

When you’d use it

  • Customer Support Bot PersonaA company wants Claude to act as a friendly, brand-consistent support agent across all customer interactions, always offering solutions and avoiding off-topic discussion.
  • Structured Data Extraction PipelineA data engineering team needs Claude to output only valid JSON from unstructured text, with no conversational filler, so the output can be directly inserted into a database.
  • Domain Expert with Enforced Output FormatA fintech application needs Claude to analyze financial data as a senior analyst and always return responses structured as: Key Metrics, Risk Factors, and Recommendation — ensuring downstream systems can parse results reliably.
  • Autonomous Code Review AgentA DevOps platform uses Claude to review pull requests, check for security vulnerabilities, verify style guide compliance, and flag deprecated dependencies — only approving PRs when all checks pass.
  • Legal Document Risk AnalyzerA legal tech company uses Claude as a contract review assistant that identifies risks in agreements, categorizing each issue by severity (Critical/High/Medium) and providing specific remediation recommendations.

What changed recently

  • 2025-01Anthropic clarified in official documentation that system prompt updates made to the claude.ai web interface do not apply to API calls. API developers are fully responsible for defining their own system prompts and are unaffected by Anthropic's claude.ai system prompt updates.
  • 2025-06Prompt caching support for system prompts became more widely documented, allowing long system prompts to be cached and re-used across calls at reduced input token rates, lowering costs for high-volume applications with static system prompts.
This is the short version

The full chapter has three worked examples, the common pitfalls, and the workflow that makes it pay — plus the other 84 features, kept current.

Get Claude Master — $97
CLAUDEMASTER
An independent publication.
Independent product. Not affiliated with or endorsed by Anthropic. “Claude” is a trademark of Anthropic, used here only to describe the subject of this manual.
© 2026 Claude Master — All rights reserved.