PrompTxts

Understanding the .txts Syntax: How to use Handlebars in your Prompts

February 1, 2026

Mastering the .txts Syntax

At PrompTxts, we believe prompts shouldn't be static. To make them truly powerful, they need to be dynamic. We use a familiar syntax called Handlebars to turn regular text into interactive forms.

What are Handlebars?

Handlebars are variables wrapped in double curly braces: {{variable_name}}.

When you save a prompt with this syntax, our Runner Mode automatically detects them and creates a custom input form for you.

Basic Usage

Imagine you are writing a prompt for a social media post. Instead of hardcoding the topic, write it like this:

"Write a 280-character tweet about {{topic}} in the style of {{personality}}."

How it works in Runner Mode:

  1. Detection: Our parser finds topic and personality.
  2. Form Generation: You get two input fields on the right side of the screen.
  3. Injection: As you type into those fields, the variables in the prompt update in real-time.

Pro Tips for .txts

  • Snake_Case: Use {{snake_case}} for variables to keep your code clean.
  • Contextual Naming: Instead of {{var1}}, use {{target_audience}}. It makes the runner form much easier to use.
  • Reuse: You can use the same variable multiple times in one prompt, and you'll only have to fill it out once in the form!

Why This Matters

By using .txts syntax, you can build a library of tools, not just notes. Instead of "A prompt for an email," you have an "Email Generator" that works for any subject, any recipient, and any tone.

Understanding the .txts Syntax: How to use Handlebars in your Prompts | PrompTxts Learn | PrompTxts