06 — Variables
Reusable prompts with dynamic values
Type {{customer_name}}in any field — it's auto-detected, highlighted, and autocompleted. Define defaults, add descriptions, or import Global Variables shared across all your prompts.
Two scopes
Prompt variables
Per-promptDefined within a single prompt. Use for values that change per invocation — customer names, product IDs, dates, input text. Each variable gets a name, optional default, and description.
Example
{{customer_name}} — "The customer's full name. Default: 'valued customer'"
Global variables
All promptsShared across your entire prompt library. Use for values that stay consistent — company name, brand voice guidelines, product descriptions, API endpoints. Change once, update everywhere.
Example
{{company_name}} — Shared across 47 prompts. Change it once.
How it works
Auto-detection
Type {{ and the editor detects a variable. No manual setup, no configuration. Just type the double braces and start naming.
Syntax highlighting
Variables are visually highlighted in every field. You can see at a glance where dynamic values exist and which fields use them.
Autocomplete
After defining a variable once, it appears in the autocomplete dropdown. Reuse the same variable across fields without retyping.
Defaults & descriptions
Each variable can have a default value and a description. Defaults fill in when no value is provided. Descriptions help your team understand what to pass.
Compilation preservation
Variables survive compilation. {{customer_name}} in the editor stays {{customer_name}} in the Claude XML, GPT-4 Markdown, and Gemini output.
Global scope
Promote any variable to global scope. It becomes available in every prompt. Update the global value and all prompts reflect the change.
Common patterns
- {{customer_name}} — Personalize responses per customer
- {{product}} — Reuse one prompt across your product catalog
- {{tone}} — Switch between formal and casual with a variable
- {{date}} — Inject current date without editing the prompt
- {{company_name}} — Global variable, consistent across all prompts
Works with
Write once. Reuse everywhere.
Variables turn static prompts into reusable templates. Type {{ and go.
Start free.
prompt-x