System prompts
A system prompt is the standing instruction a model reads before your message: who it is, who it serves and how to answer. Here is how it differs from a user prompt, where each product lets you set one, and what Anthropic and OpenAI publish about their own.
A system prompt is a set of instructions that sits above the conversation and shapes every reply. Apps use one to give the model the date, a role and house rules before you type anything. You can write your own in the APIs. The chat apps offer close equivalents under names such as custom instructions and project instructions, and coding agents read them from project files such as CLAUDE.md and AGENTS.md. This page explains the idea, shows where to set one in each product, and gives a template to start from.
What a system prompt is
Each vendor describes the same mechanism in its own words.
- Anthropic exposes a
systemparameter in its Messages API. Its prompting guide says setting a role in the system prompt "focuses Claude's behavior and tone for your use case", and that even a single sentence makes a difference. - OpenAI uses message roles. In its API guide,
developermessages are "instructions provided by the application developer, prioritized ahead ofusermessages". Theinstructionsparameter gives "high-level instructions on how it should behave", and these "take priority over a prompt in theinputparameter". - Google calls them system instructions. The Gemini API takes a
system_instructionparameter (systemInstructionin some SDKs) to guide the model's behavior.
OpenAI's Model Spec formalizes the ordering as a chain of command with authority levels, from the highest down: root, system, developer, user and guideline. Higher levels supersede lower ones. In plain terms, a system or developer instruction beats a conflicting user request.
System prompt vs user prompt
| System prompt | User prompt | |
|---|---|---|
| Who writes it | The app builder, or you in settings | You, in the chat box |
| When it applies | Every turn of the conversation | The current request |
| Priority on conflict | Higher | Lower |
| Typical content | Role, audience, tone, rules, format, background facts | The task and its input |
A good split: anything you would repeat in every message goes in the system prompt; the specific job goes in the user prompt. Context engineering covers this split in depth, and prompt engineering covers the user-prompt side.
Where to set one, product by product
| Product | Feature | Where | Applies to |
|---|---|---|---|
| ChatGPT | Custom instructions | Settings, Personalization | All chats |
| ChatGPT | Project instructions | Project menu, Project settings | Chats in that project; overrides custom instructions |
| ChatGPT | GPT instructions | Create a GPT, Configure tab, Instructions | Every chat with that GPT |
| Claude app | Instructions for Claude | Your initials, Settings | All conversations |
| Claude app | Project instructions | Inside a project, "Set project instructions" | Chats in that project |
| Gemini app | Your instructions for Gemini | Settings & help, Personal context | All chats |
| Gemini app | Gems | Explore Gems, New Gem | Chats with that Gem |
| Claude Code | CLAUDE.md, --append-system-prompt, --system-prompt | Project files and CLI flags | Sessions in that project, or one run |
| Codex | AGENTS.md | ~/.codex/AGENTS.md (global), plus AGENTS.md files from the repository root down to the current folder | Every run; files closer to the current folder take precedence |
| Cursor | Rules | Project Rules in .cursor/rules, User Rules in settings, or AGENTS.md in the project root | Added at the start of the model context when a rule applies |
| Anthropic API | system | Messages API request | That request |
| OpenAI API | instructions or a developer message | API request | That request |
| Gemini API | system_instruction | API request | That request |
Two notes. ChatGPT custom instructions are capped at 1,500 characters on Free and Go and 5,000 on Plus, Pro, Business, Enterprise and Edu. In Claude Code, --system-prompt replaces the default prompt entirely, while --append-system-prompt adds your text to the end of it and keeps the built-in instructions. The ChatGPT cheat sheet and Claude Code cheat sheet list the related settings.
A system prompt template
The structure below follows Google's advice for Gem instructions (persona, task, context, format) and OpenAI's advice for GPT instructions: explicit steps, positive instructions over long lists of prohibitions, and brief examples when the GPT must apply a definition.
Role: You are [role, for example a support agent for an accounting app]. Audience: You are talking to [who, and what they already know]. Goal: Help them [main outcome] so that [why it matters]. How to answer: 1. [first step, for example confirm which plan they are on] 2. [second step] 3. [what to do when you are unsure, for example say so and point to the help page] Format: [length, structure, reading level]. Tone: [two or three adjectives]. Facts you can rely on: [paste product facts, policies or definitions] Example of a good answer: [one short sample reply]
If you would rather start from a draft, the AI prompt generator builds a structured prompt from a short description.
How to write one that works
- Explain the reason behind a rule. Anthropic's guide shows that "your response will be read aloud by a text-to-speech engine, so never use ellipses" works better than "NEVER use ellipses", because the model generalizes from the reason.
- Drop the shouting. Anthropic notes that Claude Opus 4.5 and Opus 4.6 respond more strongly to the system prompt than earlier models, and that prompts written with "CRITICAL: You MUST" can now cause overtriggering. Plain wording such as "Use this tool when..." is its suggested fix.
- Put steps in order. OpenAI's GPT guidance favors "When X happens, do Y" structure for multi-step workflows, with headings and lists so priorities stand out.
- Show one example. A sample answer fixes format faster than a paragraph describing it. See few-shot prompting.
- Paste the facts in. Include the policy, price list or definitions the assistant must use, so it does not rely on what it remembers from training.
What vendors publish about their own system prompts
Anthropic publishes the system prompts used by claude.ai and the Claude mobile apps in its release notes, with a page per model. The list runs from Claude Haiku 3 to Claude Sonnet 5.5 and Claude Opus 5.5 as of October 2026. Anthropic says the prompt gives Claude up-to-date information such as the current date at the start of every conversation, and encourages behaviors such as providing code snippets in Markdown. It is updated periodically, and these updates do not apply to the Claude API. From the Claude 4.6 generation on, each model ID is a single fixed snapshot, so those models have one entry each.
OpenAI publishes the Model Spec, which sets out how its models weigh instructions from different roles. It describes the rules for system, developer and user messages; it is not a copy of the ChatGPT system prompt.
xAI keeps a public GitHub repository with the system prompts it uses for the Grok chat assistant and the @grok bot on X, and says it updates it regularly. If you are looking for the Grok system prompt, that repository is the primary source.
We do not reprint "leaked" system prompts. A copy posted by a third party cannot be checked against the vendor's own text, while the prompts Anthropic and xAI publish are available at the sources linked below.
FAQ
What is a system prompt in an LLM?
Instructions given to a model before the conversation that apply to every reply: its role, rules and format. Anthropic's API takes them in the system parameter, OpenAI's in instructions or developer messages, and Gemini's in system_instruction.
Are custom instructions the same as a system prompt?
They play a similar role. ChatGPT applies custom instructions to all chats, and Claude applies "Instructions for Claude" to all conversations. The apps also keep their own system prompts, which you do not edit.
Does Claude's published system prompt apply to the API?
No. Anthropic states that the system prompt updates in its release notes do not apply to the Claude API.
Can a user override a system prompt?
Not by design. OpenAI's Model Spec ranks system and developer instructions above user instructions, and OpenAI's API guide says developer messages are prioritized ahead of user messages.
Sources
- System prompts (release notes) — Anthropic, accessed October 2026
- Prompting best practices — Anthropic, accessed October 2026
- Prompt engineering — OpenAI API docs, accessed October 2026
- OpenAI Model Spec (2026-08-18) — OpenAI, accessed October 2026
- Text generation — Google AI for Developers, accessed October 2026
- ChatGPT Custom Instructions — OpenAI Help Center, accessed October 2026
- Projects in ChatGPT — OpenAI Help Center, accessed October 2026
- Creating and editing GPTs — OpenAI Help Center, accessed October 2026
- Understanding Claude's personalization features — Claude Help Center, accessed October 2026
- How can I create and manage projects? — Claude Help Center, accessed October 2026
- Customize Gemini's responses with your instructions — Gemini Apps Help, accessed October 2026
- Tips for creating custom Gems — Gemini Apps Help, accessed October 2026
- CLI reference — Claude Code Docs, accessed October 2026
- Custom instructions with AGENTS.md — OpenAI Codex docs, accessed October 2026
- Rules — Cursor Docs, accessed October 2026
- grok-prompts — xAI on GitHub, accessed October 2026