Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

Prompts

System prompt examples for real developer use cases

20 original, free system prompts for the jobs developers actually build: support bots, coding helpers, RAG, JSON extraction, SQL, agents and classifiers. Each one explains why every section is there, how it fails, and what it costs to send with every request.

20 system prompts

Steps

How to use the system prompt library

  1. Search or filter the library for the job your assistant does.
  2. Open a prompt and read the design notes, so you know which parts matter for your case.
  3. Replace the {{variables}} with your values, or open it in the prompt builder to fill them and get the exact API request.
  4. Check the failure modes against your own test messages before you ship it.
  5. Price it at your traffic with the prompt caching calculator.

Method

How it works

A system prompt is the part of an AI feature you write once and send every time. It sets the assistant’s role, what it may and may not do, and the shape of its answers, while the user’s message changes with each request. The prompts in this library were written for this site, not copied from any product, and each comes with notes on why it is built the way it is.

What the prompts have in common

Most share a structure that follows the providers’ own guidance. A one-sentence role comes first; Anthropic’s guide says even a single sentence of role focuses the model’s behaviour. Next comes the goal and the reason behind it, because explaining why a rule exists helps the model apply it to cases you didn’t list. Rules are concrete and observable (“escalate after two unsuccessful answers”, not “escalate when appropriate”), which is Google’s advice to give clear, specific instructions and constraints. The output format is shown rather than described. OpenAI suggests the same order for a developer message: identity, instructions, examples, context.

Two habits run through every prompt. They give the model an honest way out (“say the documents don’t cover it”, “write owner unclear”), which Anthropic lists first among ways to reduce hallucinations. And they treat anything the model reads, whether documents, tickets, emails or logs, as data rather than instructions.

Variables are per deployment, not per request

Placeholders such as {{company}} are filled once when you set the assistant up. Anything that changes per request, such as the user’s name, today’s date or retrieved documents, belongs in the user turn. That keeps the system prompt byte-for-byte identical across requests, which is what prompt caching needs: Anthropic’s cache only hits on a 100% identical prefix, and OpenAI recommends putting repeated content at the start of the prompt.

What a system prompt costs

The prompts here run from 258 to 522 tokens, 337 in the middle, counted with OpenAI’s o200k_base tokenizer. Sent with 10,000 requests a day, even a short prompt adds up, so each page prices it for a month on current models, with and without caching. Caching only applies above a minimum length: 512 tokens on Claude Sonnet 5.5, 512 tokens on Claude Haiku 5.5, 1,024 tokens on GPT-6.1 Sol and 4,096 tokens on Gemini 3.8 Flash. Below that, the prompt is billed in full every time; together with tool definitions, which sit in front of it in the cached prefix, it may cross the line.

Where it goes in each API

The text stays the same across providers; the field it goes in doesn’t.

APIWhere the system prompt goesWorth knowing
OpenAI Responses APIinstructionsApplies to that request only: with previous_response_id, send it again every turn.
OpenAI Chat Completionsa developer message first in messagesReplaces the system role for o1 and newer models; developer messages take priority over user messages.
Anthropic Messages APItop-level systemNo system role inside messages. Pass it as a text block with cache_control to cache it.
Gemini generateContentsystemInstructionText only. Still supported; Google recommends the Interactions API for new work.
Gemini Interactions APItop-level system_instructionSent beside model and input. Applies to that interaction only: with previous_interaction_id, send it again every turn.
Placement in Python
# The same system prompt in each API (Python SDKs).
SYSTEM_PROMPT = open("support-agent.txt").read()  # fixed per deployment

# OpenAI Responses API
openai_client.responses.create(model=MODEL, instructions=SYSTEM_PROMPT, input=user_message)

# Anthropic Messages API (cached once it passes the model's minimum length)
anthropic_client.messages.create(
    model=MODEL, max_tokens=1024,
    system=[{"type": "text", "text": SYSTEM_PROMPT, "cache_control": {"type": "ephemeral"}}],
    messages=[{"role": "user", "content": user_message}],
)

# Gemini generateContent (google-genai SDK)
genai_client.models.generate_content(
    model=MODEL, contents=user_message,
    config=types.GenerateContentConfig(system_instruction=SYSTEM_PROMPT),
)

Every claim in the design notes was checked against the providers’ documentation on 2026-10-14. For a prompt you are writing from scratch, the prompt builder lays out the sections and shows the exact request; for one you are changing, the prompt diff shows what changed and what it costs.

Examples

Worked examples

Each prompt’s size and what sending it with 10,000 requests a day for a month costs on Claude Sonnet 5.5, with and without caching. Prices updated 2026-10-15; other models are on each prompt’s page.
System promptTokensUncachedCached
Customer support agent with escalation522$317.55$15.92
Voice assistant for spoken replies298$181.28below minimum
Tutor that guides instead of answering373$226.91below minimum
Coding assistant for TypeScript and React371$225.69below minimum
Code reviewer359$218.39below minimum
Unit test writer299$181.89below minimum
Pull request description writer284$172.77below minimum
RAG assistant that cites sources340$206.83below minimum
Search query rewriter for RAG277$168.51below minimum
JSON-only extraction service258$156.95below minimum
SQL analyst with read-only safety371$225.69below minimum
Tool-using agent that confirms risky actions390$237.25below minimum
Inbox assistant that treats email as untrusted382$232.38below minimum
Incident triage assistant for logs and alerts331$201.36below minimum
Content moderation classifier262$159.38below minimum
Support ticket triage and routing365$222.04below minimum
LLM-as-judge evaluator285$173.38below minimum
Meeting summariser294$178.85below minimum
Technical writer for developer docs326$198.32below minimum
Translator that keeps your glossary and code337$205.01below minimum

FAQ

Frequently asked questions

What is a system prompt?

A system prompt is the set of standing instructions a developer sends with every request: the assistant’s role, its rules, the tools it may use and the format of its answers. It is kept apart from what the user types, and the model gives it more weight. Each API has its own field for it: instructions or a developer message at OpenAI, system at Anthropic and systemInstruction at Gemini. The glossary entry has more.

Are these real system prompts from ChatGPT, Claude or other products?

No. Every prompt here was written for this site and is free to copy and adapt. We don’t publish leaked or reconstructed system prompts from commercial products: they may be inaccurate, they belong to someone else, and they’re written for a different product than yours. The design notes explain the reasoning instead, so you can write your own.

How long should a system prompt be?

As long as the job needs and no longer. The prompts here run from 258 to 522 tokens. Every token is billed on every request, and rules that rarely matter compete with the ones that do. Put reference material in retrieval or tools instead of the prompt, and measure what’s left with the token counter.

Should I write system prompts with XML tags or Markdown?

Either works if you use it consistently. Anthropic recommends XML tags to separate instructions, context and examples, and OpenAI says Markdown headings and lists help mark sections while XML tags mark where a document starts and ends. Most prompts here use XML tags; the voice assistant uses Markdown headings, partly because Anthropic notes the prompt’s style can influence the reply’s style.

Can a system prompt stop prompt injection or jailbreaks?

It can make them less likely, not impossible. Users can ask the model to ignore its rules, and documents, emails or tool results can carry instructions of their own. Treat the system prompt as guidance and put the real controls in code: limited permissions, output validation, and human approval before actions that can’t be undone.

Does prompt caching make a long system prompt free?

Cheaper, not free, and only above a minimum length. Cached reads cost a fraction of the input price, but a prompt shorter than the provider’s minimum isn’t cached at all, and the cache only holds while requests keep arriving. Anything that changes per request, such as the date or the user’s name, should go after the fixed part. The prompt caching calculator works it out for your traffic.

Where do the token counts come from?

Each prompt was counted with OpenAI o200k_base (gpt-tokenizer 4.0.0), with its variables left as placeholders, and a test recounts them on every build. That is the exact count for GPT-5-family models. Claude’s and Gemini’s tokenizers aren’t public, so for them the count is an estimate and the real number may differ.