Prompt Variables
Feed app data into prompts through declared, typed variables rather than string assembly.
What it adds
A typed variable layer for prompt templates, with declarations, validation, escaping, and a preview of the rendered prompt.
What your agent is told to do
5
What your agent is told to do
5-
1
Give every template an explicit declaration of the values it takes, each with a name, a type, and whether it is required, optional, secret, or a list. A template that silently accepts anything cannot be validated or previewed.
-
2
Validate every value against its declaration before rendering: type, length ceiling, and list size. Reject rather than truncate, since a value cut in half changes the meaning of the instruction that contains it.
-
3
Wrap substituted values in clear delimiters and neutralise anything that looks like an instruction, so text drawn from a record cannot redirect the model. Treat every value sourced from user input, uploaded files, or third-party records as hostile.
-
4
Give authors a preview of the rendered prompt with the task content and substituted values visible and the system portion withheld. Storage, scoping, and ownership of the templates themselves belong to Prompt Template Library; this feature owns declaration, substitution, and validation only.
-
5
Do not let a missing optional value collapse into an empty string inside a sentence. Define what the template says when a value is absent, or the model reads a truncated instruction as a complete one.
Edge cases it handles
8
Edge cases it handles
8- Values coming from records, uploads, or third-party data must be delimited and escaped before substitution. Text that reads as a new instruction will be followed, and this is the most common way an app's own data attacks its prompts.
- The declaration must distinguish required, optional, secret, and list variables, because each needs different handling at validation, preview, and logging time.
- Type and length must be checked before rendering, so an oversized value fails loudly instead of consuming the context window and pushing the real instructions out of scope.
- The preview must show what will actually be substituted while withholding hidden system instructions, so an author can debug a template without being handed the safety rules to edit around.
- A missing value must never render as an empty gap in a sentence. Either block the run or substitute an explicit statement that the value is unavailable.
- Secret values must be excluded from previews, logs, error messages, and stored request records, and must never be placed in client-visible code or a template body a user can read back.
- A list variable of unbounded length must be capped, with the truncation stated in the prompt itself rather than performed silently.
- Values containing the delimiter characters must be handled so they cannot close the wrapper early and escape into the instruction body.
Definition of done
8
Definition of done
8- Every template declares its variables with a name, a type, and required, optional, secret, or list status.
- Values are validated for type, length, and list size before any request is made, and invalid input is rejected rather than truncated.
- Substituted values are delimited and neutralised so embedded instructions are not followed.
- Authors can preview the rendered prompt without seeing or editing system instructions.
- Missing values block the run or render an explicit unavailable statement, never a silent gap.
- Secret values never appear in previews, logs, error output, or stored requests.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
AI Cost Budgets
AI Cost Budgets
Cap what AI features are allowed to spend before the bill arrives.
What it does
Monetary spending limits on AI work, scoped by workspace, feature, and time period, enforced before a run starts.
How it works
- 1 Find every place the app calls a model and route all of them through one accounting point that records estimated and actual spend against a scope. A budget that only covers the chat feature is not a budget.
- 2 Estimate the cost of a run from the size of its input before dispatching it, and refuse anything that would exceed the remaining budget on its own.
- 3 Reserve the estimate against the budget when the run starts, then reconcile to the real usage figures when it finishes, releasing whatever was over-reserved.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-cost-budgets
Prompt Versioning
Prompt Versioning
Tie every AI output to the exact prompt version that produced it.
What it does
Immutable, numbered versions of each prompt, with the run configuration recorded and every output stamped with the version used.
How it works
- 1 Make every publish create a new immutable version rather than overwriting the previous text. Editing history in place destroys the only record of what produced last month's outputs.
- 2 Capture the whole run configuration with each version, not just the wording: which model tier and parameters were used, which tools were available, and the expected output shape. A prompt that behaves differently under different settings is not one prompt.
- 3 Stamp every generated output with the version identifier that produced it, and keep that stamp with the record so an output found later can be traced back to its exact instructions.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/prompt-versioning
Retrieval Debugger
Retrieval Debugger
Show exactly which sources, chunks, and scores produced a given AI answer.
What it does
A per-answer inspector showing the query as issued, the filters applied, the candidate chunks with their scores, and what reached the model.
How it works
- 1 Capture for each answer the query as it was issued, the filters applied, the candidates returned with their scores, and which of those actually made it into the request after the context ceiling was applied.
- 2 Show results after permission filtering, with a count of how many candidates were excluded and why. Displaying the pre-filter set turns the debugger into a way to read content the viewer cannot open.
- 3 Present each scoring stage separately — keyword, semantic, and any reranking — because a chunk that ends up first overall may have been rescued by one stage after being buried by another, and a single blended number hides that.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/retrieval-debugger
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
3
It inspects, then implements
Your agent reads your existing app first, then adds the feature to fit it.
Works with your stack
These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.
Need it tighter than that? Customize the feature and tell it exactly what you're running.