A prompt template and the code that fills it drift apart quietly. Somebody renames a field and the placeholder renders as empty text; somebody adds a placeholder and nothing declares what may go in it; somebody moves an interpolation inside a fenced code block and the escaping that was right in prose is now wrong. None of that raises an error at run time — it produces a prompt that is subtly not the prompt anybody wrote, and the model does something reasonable with it.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.
Run the checked-in example
# A template whose variables all line up and whose values are all safe. Exits 0.
node bin/prompt-variable-auditor.mjs \
--template examples/clean/template.md \
--schema examples/clean/variables.json \
--values examples/clean/values.json
# A required variable with no value, an undeclared placeholder, an unused
# declaration, and three values that break out of their context. Exits 1.
node bin/prompt-variable-auditor.mjs \
--template examples/unsafe/template.md \
--schema examples/unsafe/variables.json \
--values examples/unsafe/values.json --jsonRead the result
Exit 2 has two shapes on purpose. A usage error means the run never had a subject, so there is nothing to report about. An unreadable input means the run had a subject and failed to obtain evidence about it — which is what incomplete exists to say, and a consumer needs that report to know which input was not read. A consumer piping stdout must handle an empty stdout on exit 2.
Where this check stops
Every limit is enforced and overridable. Exceeding one is an incomplete result naming the limit, never a silent truncation and never a pass.
Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.
Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.