Prompt Variable Scope Checker

Verify all {{variables}} in a template are defined and used consistently

Ad placeholder (leaderboard)

Prompt variable scope checker

Templated prompts are powerful and fragile. Misspell a placeholder name or forget to supply a value, and the variable renders as raw text or an empty string — the model gets a broken prompt and you get mysterious bad outputs. This checker treats a prompt template like code: it cross-references every {{variable}} against the values you supply and flags anything that does not line up.

How it works

You paste a template using double-brace placeholders and a list of the variables you actually provide, written as key = value lines. The tool extracts every placeholder from the template and every key from your definitions, then computes two sets: variables used in the template but never defined (reported as errors, because they will render empty), and variables defined but never used (reported as warnings, usually a typo or leftover). It also warns about stray braces that do not form a valid placeholder.

Tips and notes

  • Run it before every prompt change. The most common production bug is a renamed variable that one side forgot to update.
  • Unused warnings catch typos. If {{audience}} is flagged unused but you expected it, check whether the template says {{audiance}}.
  • Empty is silent. An undefined variable rarely throws — it just degrades output quality, which is why catching it statically matters.
  • Everything is local. No upload, so it is safe to paste proprietary templates.
Ad placeholder (rectangle)