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

Prompt templates for developers

29 prompt templates for everyday developer work, from code review and unit tests to SQL, RAG answers and LLM judges. Each one explains why it is built the way it is, shows a filled-in example and its token count, and opens in the prompt builder. Free, and it runs in your browser.

29 templates

Code (8)

Git and docs (6)

Design and security (3)

Data (6)

LLM apps and evals (6)

Steps

How to use the prompt template library

  1. Search for the job you have, such as “review” or “SQL”, or pick a category.
  2. Open a template to read when to use it, why it is structured that way and a filled-in example.
  3. Copy the plain-text version into a chat window and replace each {{variable}}, or select Open in prompt builder to fill them in a form.
  4. In the builder, choose your model to see the token count and cost, then copy the API request as JSON, Python, TypeScript or curl.
  5. Run it on a handful of real inputs, adjust it, and compare versions with the prompt diff.

Method

How it works

A prompt that works reliably is mostly structure. Each template here is written in the same five parts as our prompt builder: a role, the context the model should read, the task, the constraints and the output format, with optional few-shot examples. The parts that change on every call are {{variables}}, and every variable has a note saying what to put in it.

What the templates have in common

They follow the advice that OpenAI’s, Anthropic’s and Google’s prompting guides agree on, checked on 2026-10-14. The material the model reads (a diff, a schema, retrieved documents, a log) goes in the context, above the instruction: Anthropic says queries at the end can improve response quality by up to 30% in its tests with complex inputs, and Google gives the same order for Gemini. Constraints say why where it matters, because Anthropic’s guide notes that Claude generalises from the explanation behind an instruction. And the output format is always explicit, since a program or a busy person reads the result.

Most templates also give the model an honest way out: “say what data is missing”, “use null rather than guess”, “an empty review is a valid result”. Models tend to fill every gap they are given, and these escape hatches are the simplest way to cut invented answers. They are written into the prompt rather than promised by us; check them on your own inputs.

Why few of them use examples

Only 2 of the 29 templates include few-shot examples, where the output format is easier to show than describe (commit messages, classification labels). The providers disagree here. Google recommends examples in every Gemini prompt; OpenAI suggests trying reasoning models without them first; Anthropic recommends three to five when you use them. Each template page says when adding your own examples is likely to help, and the few-shot prompting entry explains the trade-off in tokens.

Token counts

Every template shows its size with OpenAI’s o200k_base tokenizer, as the prompt builder lays it out by default (XML section tags, with a system prompt). Unfilled, the median template is 235 tokens, and the range is 183 to 415; what you paste into the variables usually dominates. The numbers are recomputed by a test from the template text, so they can’t drift. Claude and Gemini count differently, so use the token counter for your model, and the prompt caching calculator if the fixed part of a prompt is long and repeated.

How to adapt a template

Treat each one as a starting point. Change the role to your domain, replace the constraints with your team’s rules, and add an example from your own data once you see where the output misses. Keep the version that works in your codebase, next to the code that fills it, and compare edits with the prompt diff before you ship them. The system prompt, chain of thought and structured outputs entries in the glossary cover the techniques the templates rely on.

Examples

Worked examples

Where the three providers’ prompting guides differ, as of 2026-10-14:

Prompting advice that differs between Claude, OpenAI GPT and Gemini
TopicClaudeOpenAI GPTGemini
Marking sectionsXML tags such as <context>Markdown headings or XML tagsOne delimiter style, used consistently
Where long input goesAbove the question; queries at the endNear the end of the promptAll context first, question last
Few-shot examples3 to 5, in <example> tagsZero-shot first on reasoning modelsRecommended in every prompt
Asking for step-by-step reasoningUse thinking; written-out reasoning may be declined on the newest modelsAvoid on reasoning modelsNot needed on Gemini 2.5 and 3 models, which think internally
Starting the reply for the modelPrefill not supported from Claude 4.6 models (400 error)Not covered in the guidesA response prefix in the prompt text

From the Anthropic, OpenAI and Google guides listed under sources. Each template page applies these to its own task.

FAQ

Frequently asked questions

What is a prompt template?

A prompt template is a reusable prompt with named placeholders, such as {{diff}} or {{question}}, for the parts that change on every call. The fixed parts (role, rules, output format) stay the same, so results are consistent and the prompt can be reviewed and versioned like code.

What is the difference between a prompt template and a system prompt?

A prompt template is one message you fill in for each task: paste a diff, a schema or a question into its variables and send it. A system prompt is the fixed set of instructions an app sends with every request, such as a support bot’s rules. Use a template for one-off work or a chat window; for an assistant you are building, start from the system prompt library.

Do these prompts work with ChatGPT, Claude and Gemini?

Yes. The text follows advice that OpenAI’s, Anthropic’s and Google’s prompting guides share: clear role, context before the question, explicit constraints and output format. Each template page lists tips where the model families genuinely differ, such as Markdown defaults on OpenAI reasoning models or prefill on Claude.

Can I use them in ChatGPT or Claude.ai, or only through the API?

Both. Each page has a plain-text version to paste into a chat window, with the variables to replace by hand. Open a template in the prompt builder to fill the variables in a form and copy the exact OpenAI, Claude or Gemini API request.

How are the token counts measured?

With OpenAI’s o200k_base tokenizer, the encoding used by GPT-4o and later GPT models, run on each template as the prompt builder lays it out. Claude and Gemini use their own tokenizers, which aren’t published, so their counts will differ. The token counter shows the count for the model you use.

Are these prompts proven to work better?

We don’t claim that. Each template is structured the way the providers’ own guides recommend, and each page explains why. Whether it works for your task is something to measure: run it on 20 to 50 real inputs, check the outputs, and compare versions with the prompt diff.

Is anything I type sent to a server?

No. The search runs in your browser, and opening a template in the prompt builder passes only the template’s name in the address, never your text. The builder itself runs entirely in your browser.