Skip to content

Prompts

Prompt variables: write the template once, use it a thousand times

How to turn a prompt you repeat into a template with variables such as {{language}}, how to name variables and give them defaults, and how to fill them in Talqeen and Claude Code.

Talqeen wrote this article and no editor has reviewed it yet. Search engines do not see this page until it is reviewed.

If you keep copying the same prompt and changing two words, you need a template: a fixed prompt with blanks called variables that you fill on each use.

The shape of a variable

In Talqeen a variable is written in double curly braces:

Review this function written in {{language}}.
Focus on {{focus}} and name the line of every problem.

{{code}}

Open such a prompt in the library and you get one field per variable to fill before copying. Prompts imported from prompts.chat write ${language}; the import converts them to the same form.

Name variables by meaning

{{language}} beats {{x}}. Use lowercase Latin letters and underscores ({{target_audience}}), and never one name for two meanings.

Defaults

Write common values in the template's description ("language: TypeScript if not given") so nobody is stuck on an empty field.

Keep long variables apart

Put long inputs at the end between clear markers:

<code>
{{code}}
</code>

That separates your instructions from pasted input, and is a first line of defence against prompt injection.

Do not forget a variable

The most common mistake is sending {{focus}} as is. Talqeen's prompt pages warn you about any empty field before you copy.

Templates in Claude Code

A slash command is Claude Code's template: a file in .claude/commands/ whose text is a prompt, with $ARGUMENTS for what you type after the command. Connect Talqeen's library server with your personal token and your saved prompts appear as commands that ask for their variables.

Start with something you repeated three times this week and turn it into one template.