Prompt templates: how to write reusable AI prompts with variables
Turn one-off ChatGPT, Claude or Gemini prompts into reusable prompt templates with variables. A step-by-step method, plus six templates you can copy.
On Monday you write a prompt that works. The product description is sharp, the tone is right, the length is perfect. On Thursday you need another one for a different product, so you scroll through your chat history, can’t find it, and rewrite it from memory. The result is fine, but not as good.
That gap between your best prompt and the one you actually use is what prompt templates close. You write the prompt carefully once, mark the parts that change, and reuse it. Every time, you start from your best version instead of from scratch.
This guide shows a simple, repeatable way to build templates, the mistakes that make them fail, and six templates you can copy today.
What is a prompt template?
A prompt template is a prompt you keep and reuse. The parts that change from one use to the next are written as placeholders, usually in double curly braces: variable. Everything else stays the same.
Template
Write a {{tone}} product description for {{product}}, aimed at {{audience}}.
Keep it under {{length}} words.
Filled in
Write a playful product description for a reusable coffee cup, aimed at students.
Keep it under 80 words.
Same structure, same instructions, different details. That is the whole idea, and it is why templates give you more consistent results than rewriting a prompt by hand: the parts that made the prompt good never get lost along the way.
From a one-off prompt to a template, step by step
The best templates are not designed from scratch. They come from prompts that already worked for you. Here is the process.
Step 1: Start with a prompt that worked
Pick a prompt you were happy with. It is usually full of specific details:
I'm launching a reusable coffee cup called LoopCup. Write a product description
for our online store. Our customers are mostly students. Make it fun but not silly.
Mention that it's dishwasher safe and keeps drinks hot for 4 hours.
Around 80 words. No emojis.
Step 2: Find what will change next time
Read it again and ask: if I did this for a different product tomorrow, which words would I change? Here, that is the product, the audience, the tone, the benefits and the length. The rest (it is a product description, for an online store, without emojis) stays the same.
Step 3: Replace those parts with variables
Write a product description for our online store.
Product: {{product}}
Audience: {{audience}}
Tone: {{tone}}
Key benefits: {{benefits}}
Around {{length}} words. No emojis.
Step 4: Strengthen the fixed parts
Now that the details are out of the way, the instructions are easy to improve. Add the things you found yourself asking for in follow-up messages: a role, a clear output format, and what to do when information is missing.
You are an experienced e-commerce copywriter.
Write a product description for our online store.
Product: {{product}}
Audience: {{audience}}
Tone: {{tone}}
Key benefits: {{benefits}}
Rules:
- Around {{length}} words. No emojis.
- Lead with the benefit that matters most to this audience.
- If a benefit is unclear, leave it out rather than inventing details.
Format: a headline, then two short paragraphs.
This is a template you will actually reuse. It takes ten seconds to fill in, and every description it produces starts from the same well-tested instructions.
Tip: Writing each variable on its own labeled line (
Product: product) makes the template easier to fill in and gives the model clear context, even when a value is long.
The five building blocks of a good template
Most reusable templates are built from the same five parts. You don’t need all five every time, but strong templates usually cover most of them.
| Part | What it does | Example |
|---|---|---|
| Role | Sets the expertise and point of view | ”You are an experienced copywriter.” |
| Task | States the one job to be done | ”Write a product description.” |
| Context | The details that change each time | product, audience |
| Rules | Limits, must-haves and must-nots | ”Around length words. No emojis.” |
| Format | What the answer should look like | ”A headline, then two short paragraphs.” |
The rule of thumb: only the context should be variable. If you find yourself turning the task or the rules into variables, you are building a form, not a template, and the consistency you wanted disappears.
Six templates you can copy
Each template below follows the same structure. Copy one, replace the variable names with whatever reads naturally to you, and adjust the rules to match your style.
1. Product description
You are an experienced e-commerce copywriter.
Write a product description for {{product}}.
Audience: {{audience}}
Tone: {{tone}}
Key benefits: {{benefits}}
Around {{length}} words. Lead with the benefit that matters most to this audience.
Format: a headline, then two short paragraphs.
2. Email reply
Write a reply to the email below.
My goal: {{goal}}
Tone: {{tone}}
Sign as: {{name}}
Keep it under 120 words and end with one clear next step.
If the email asks something I haven't covered in my goal, add a placeholder like [ANSWER] instead of guessing.
Email:
{{email}}
3. Code review
You are a senior {{language}} developer doing a code review.
Review the code below for bugs, readability and performance.
For each issue, give:
- Severity: high, medium or low
- Where: the function or line
- Problem: one sentence
- Fix: a short code example
Order issues from most to least severe. If the code looks good, say so briefly.
{{code}}
4. Meeting summary
Summarize the meeting notes below for {{audience}}, who did not attend.
1. A one-sentence summary of the outcome.
2. Key decisions, as bullet points.
3. Action items, as "Owner: task (due date)". Write "no date" if none was given.
Use only what is in the notes. Do not add assumptions.
Notes:
{{notes}}
5. Social media post
Write a {{platform}} post about {{topic}} for {{audience}}.
Tone: {{tone}}
Length: under {{length}} words
Goal: {{goal}}
Give me three versions with different opening lines, and mark the one you would pick and why.
6. Explain a concept
Explain {{concept}} to {{audience}}.
Start with a one-sentence definition, then give one everyday analogy and one practical example.
Avoid jargon; if you must use a technical term, explain it.
End with one question I can answer to check that I understood.
How to name your variables
Variable names are the only “user interface” a template has. Good names make it easy to fill in, even months later.
- Describe the content, not the position. audience tells you what to type; x or field2 doesn’t.
- Keep names short and lowercase. One or two words is enough: tone, due_date.
- Use the same name for the same thing. If the product appears twice, call it product both times so it is obvious they hold the same value.
- Hint at the format when it matters. length_in_words or deadline_date saves a guess.
- Use variables for long inputs, too. Pasting an email into email keeps the template short and readable. Put long inputs at the end, under a clear label.
Make your templates hold up
A template is used in situations you didn’t predict when you wrote it. A few lines of instruction make it far more reliable.
Say what to do when information is missing. “If anything is unclear, ask me up to three questions before you start” or “leave a placeholder instead of guessing” prevents confident, made-up details.
Show an example when the format matters. If the output needs a specific shape, a short example (“Like this: Owner: task (due date)”) works better than a long description.
Ask for options when you’ll choose anyway. For headlines, subject lines or posts, ask for three versions. Picking is faster than rewriting.
Test with different values before you rely on it. Fill the template in two or three very different ways: a short and a long input, a formal and a casual tone. If one combination produces a weak result, adjust the rules.
Common mistakes
Too many variables. If a template needs eight fields, it is doing too much. Split it into two templates with three or four variables each.
Making the instructions variable. A instructions variable defeats the purpose. The instructions are exactly what you want to keep stable.
No output format. Without one, each run comes back in a different shape. One line such as “Return a table with two columns: issue and fix” makes the results much easier to use.
Vague variable names. text and info force you to remember what you meant. Name the thing: customer_email, meeting_notes.
Never revisiting a template. When an answer misses the mark, the fix belongs in the template, not only in a follow-up message. Every future use gets better.
Keep your template library organized
Templates only save time if you can find them in seconds. Once you have more than a handful:
- Give each template a title that says what it produces, like “Product description” or “Meeting summary”, not “Prompt 7”.
- Group them into a few categories, such as Writing, Coding and Work, or by client or project.
- Keep one version of each template. When you improve it, update the original instead of saving a copy.
This is the workflow PromptDeck is built around. You save prompts with variables, PromptDeck detects them and gives you a small form to fill in, and you copy the finished prompt with one tap. Your library is organized in categories, searchable, and stored on your device, so it works offline on macOS and Android.
Your next step
Open your chat history and find one prompt you have written more than once this month. Mark the three or four parts that change, add an output format, and save it as your first template. The next time you need it, it will take seconds instead of minutes, and the result will be as good as your best attempt.
Frequently asked questions
What is the difference between a prompt and a prompt template?
A prompt is written for one situation. A prompt template is written to be reused: the instructions are fixed, and the details that change each time are left as variables for you to fill in.
Do prompt templates work with ChatGPT, Claude and Gemini?
Yes. A filled-in template is plain text, so it works in any chat-based AI tool. Different models may respond a little differently, so test an important template in the tool you actually use.
How many variables should a template have?
Usually three to five. Fewer than two and you may not need a template; more than six and the template is often trying to do two jobs at once.
Why use double curly braces for variables?
variable is easy to spot, rarely appears in normal text, and is a convention many tools already understand. PromptDeck detects it automatically and turns each one into a field.