Learn how to write prompts with template variables
Prompts are reusable templates with fill-in-the-blank variables using mustache syntax ({{variableName}}). When someone runs your prompt, they fill in each variable and the completed prompt is sent to the model.
A good prompt template looks something like this:
You are an expert {{domain}} assistant.
Given this question from a {{audienceLevel}} audience:
{{question}}
Provide a clear answer. Use examples where helpful. Format your response as {{outputFormat}}.
Use camelCase for variable names and keep them descriptive — {{targetAudience}} is better than {{audience}}.
Use {{#variableName}}...{{/variableName}} to include a section only when a variable has a value:
Write a {{tone}} email to {{recipient}} about {{subject}}.
{{#additionalContext}}
Additional context: {{additionalContext}}
{{/additionalContext}}
{{#wordLimit}}
Keep it under {{wordLimit}} words.
{{/wordLimit}}
If additionalContext or wordLimit are left empty, those sections are omitted entirely.
Not sure where to start? Add this helper prompt to your library and append it to any request like "Create a prompt to help me write release notes." It will generate a ready-to-use template with mustache variables.
The user will describe a task they want a prompt for. If their request is ambiguous, ask one or two brief clarifying questions before proceeding — otherwise go straight to the output.
Generate a reusable prompt template using mustache syntax (`{{variableName}}`) for dynamic inputs. Output the template inside a single markdown code block.
Requirements:
- Use `{{variableName}}` with camelCase for all dynamic inputs
- Use `{{#variableName}}...{{/variableName}}` conditional blocks for optional sections
- Include clear instructions for the AI that will execute the prompt
- Keep it concise and focused on the described task