Share
Key points
- A variable is a named gap in double curly braces; the text around it stays the same every time.
- Make a detail variable when it changes from one use to the next, and keep the parts that make the prompt good fixed.
- Every variable needs a default, and together the defaults should already produce a good result.
- Offer options where a few answers work well, name variables after their content, and test the edges before sharing.
What a variable is
A prompt variable is a named gap in a prompt, written in double curly braces: {{product}}, {{audience}}, {{tone}}. The text outside the braces stays the same every time the prompt is used. The variables are the parts you change for each new job.
Take Write a friendly onboarding email for {{product}} that helps {{audience}} finish setting up on their first day. The instructions about tone, purpose and timing are fixed, and they hold what makes the prompt work. The two variables hold the situation. Fill them with a project management app and new team admins, or with a budgeting app and students, and the same prompt does a different job without being rewritten.
Choosing what to make variable
Make something a variable when it changes from one use to the next, or when someone using the prompt would otherwise have to hunt through the text to find and replace it. Keep fixed the parts that make the prompt good: the structure, the quality rules, the output format and any wording that solved a real problem.
Resist turning every word into a choice. Each variable is a decision the user has to make, and a template with fifteen of them starts to feel like paperwork. A handful is usually enough. If you are unsure, leave a detail fixed and make it a variable later if you find yourself changing it by hand.
- Good candidates: the subject, the audience, the tone, the length, the setting and the format of the result.
- Usually fixed: the role, the steps the model should follow, quality rules such as
do not invent facts, and the structure of the answer.
Write defaults that already work
Every variable needs a default, and together the defaults should produce a good result. Someone who opens a template and copies it without touching anything should get something useful, not a prompt full of empty brackets.
Defaults also teach. A default of a matte black ceramic coffee dripper shows the level of detail a variable expects far better than product does. Write each default as the exact words that will sit in the sentence, then read the whole prompt with every default in place. If it reads like a prompt you would happily send as it is, the defaults are doing their job.
Options or free text
Some variables have a small set of good answers: a lighting setup, a tone of voice, an aspect ratio, a reading level. Offer those as options. Options show people what works, avoid typos that confuse the model and make a template quick to explore. Other variables are open by nature, such as the product, the topic or the person in a portrait, and those need free text.
Write each option as a complete phrase that drops into the sentence without breaking the grammar: soft window light from the left rather than window. A few options that are clearly different from each other are more useful than a long list of near-duplicates. Where it makes sense, allow free text alongside the options so people can type their own.
Naming variables
A variable’s name should say what goes in it. {{audience}}, {{word_limit}} and {{brand_voice}} explain themselves; {{x}}, {{input1}} and {{thing}} do not. Name the content, not its position, so the name still makes sense when the variable moves to another sentence.
Stick to lowercase letters, numbers and underscores, with no spaces, and reuse the same names across templates so that {{audience}} always means the same thing. The name is for the template; the people filling it in can see a friendlier label, such as “Word limit”. When you submit a prompt, the form lists the variables it finds as you type, which is a quick way to check that none has been missed or mistyped.
Test a template before you share it
Run the template with its defaults first, then try values at the edges: a one-word input, a long one, the least obvious option. Read each filled-in version as a sentence and check the grammar around every gap. A phrase such as an {{product}} breaks as soon as someone types a product that starts with a consonant.
Then check that no fixed instruction contradicts a possible value: a line saying keep it under 100 words will fight an option for a detailed report. If the template is meant for several models, try it in each one. Finally, run a few random combinations of options, because the people using it will choose pairings you never considered.
How the Promptshunt studio uses variables
Every prompt in the prompt library opens in a studio built around its variables. Each variable appears with its default already in place, so the prompt is ready to copy straight away. The preview updates as you type and highlights the filled-in parts, so you can see exactly where your words land. None of it needs an account.
- Fill in: type your own details, or tap a suggested option where a variable has them. Empty a text field and its label appears in square brackets, so the gap is easy to spot.
- Shuffle: picks a different option for every variable that has options, a quick way to see combinations you might not have tried. Free-text fields keep what you typed.
- Reset: puts every default back.
- Copy: copies the finished prompt in one click. Where a prompt has parameters, such as Midjourney’s
--ar, a tick box decides whether they come along. - Open in: sends the prompt to a tool such as ChatGPT, Claude or Perplexity. Some tools receive it through the link; for others, the button copies it first so you can paste it in.
Try it with these prompts
- Studio packshot on a styled setA clean studio product photo on a styled surface, with the surface, light and props you can swap in seconds.
- Socratic tutor for any subjectCustom instructions for a patient tutor who guides with questions and hints, not answers; change the subject, level, goal and language.
- Edit my draft without losing my voiceEdits your draft for clarity and flow while keeping your voice, then explains the main changes; set the edit depth, reader and spelling.
Found this useful? Pass it on.
Questions or a tip to add?
Prompts to try



Leave a Reply