Variables & Templates
Variables turn static prompts into reusable workflow templates. They are useful when the task structure is stable but the input changes.
Syntax
You are a {{role}} expert.
Please produce {{format}} from the following material:
{{content}}
When copying or testing, PromptHub asks for role, format, and content, then renders the final prompt.
Naming
- Use clear names such as
role,audience, orsourceText. - Avoid vague names such as
a,b, ortext1. - Keep naming consistent across similar templates.
Patterns
Goal: {{goal}}
Constraints:
- {{constraint1}}
- {{constraint2}}
Output as {{format}}.
Keep frequently changing values as variables and stable instructions in the prompt body.