Prompt Variable Validator
ai.prompt_variable_validate
Overview
You send a prompt template and the variables you plan to render it with, and we tell you whether the render will come out complete. We find every placeholder in one of four supported syntaxes, compare the names against your variables, and report what is missing, what you sent but never used, and what looks like a placeholder but is not one we will interpret — a section tag, a filter or an expression comes back named rather than quietly ignored, because pretending not to see it would tell you the template is fully covered when it is not. Nothing here calls a model, renders the template or reads your variable values beyond checking whether they are empty. Use it when you want the "you are missing customer_name" answer before the call, not a prompt with an unfilled hole in it afterwards.
A prompt with an unfilled hole in it does not fail loudly — it goes to the model, costs you a call, and comes back with an answer that quietly names a placeholder instead of a customer. Checking coverage first turns that into a cheap, local, list-shaped answer you can act on.
Reliability
Fully deterministic: the same template and variables always give the same verdict, and no clock, randomness or network is involved. Failures, all of them about the request rather than the template's contents: PROMPT_TEMPLATE_INVALID means promptTemplate was empty, so there is nothing to check — send the template text and retry; PROMPT_TEMPLATE_TOO_LARGE means it passed 1,000,000 characters, and retrying unchanged will fail again — split the template or shorten it; PROMPT_VARIABLES_INVALID means variables held more than 2,000 entries, used a name outside 1 to 256 characters, held two names differing only by case while caseSensitive is false, or maxIssues fell outside 1 to 10,000 — fix the field named in the error and retry; PROMPT_PLACEHOLDER_LIMIT_EXCEEDED means the template holds more than 2,000 placeholders and unsupported forms together — split it into sections and validate each; PROMPT_SYNTAX_UNSUPPORTED means syntax named something outside MUSTACHE, BRACE, DOLLAR_BRACE and PERCENT, and we refuse rather than guess at the default — send one of the four. A missing promptTemplate or variables, or either sent with the wrong type, is a broken request rather than a policy outcome and comes back as the platform's TOOL_INPUT_INVALID. None of these are retryable with the same request; every one of them is fixed by changing the request.
Context footprint
The answer holds names, counts and character offsets. The only text from your template that ever comes back is the unsupportedForms entries, each cut off at 64 characters, and nothing at all comes back from your variable values. Templates up to 1,000,000 characters and 2,000 placeholders are accepted, and each issue list stops at maxIssues so a badly broken template cannot produce a huge answer. A successful call costs 1 execution credit.
When to use it
Just before you render a prompt template, whenever the variables come from somewhere that can change — a form, a database row, another skill's output.
When you need the rendered text, when the question is whether a template is allowed to reference a field rather than able to, or when your templates genuinely use loops and conditionals that something downstream will evaluate.
Scope
Non-goals
- Does not render the template — you get a verdict, never filled-in text
- Does not call a model, an embedding endpoint or any inference API
- Does not decide whether a template is allowed to reference something — communication.template_validate answers that against an allowlist
- Does not interpret sections, conditionals, loops or filters; it names them instead
- Does not resolve dotted names into nested objects: customer.name looks for a variable literally called customer.name
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| promptTemplate | string | Yes | Template text whose placeholders are compared against the supplied variables. The skill refuses more than 1,000,000 characters with PROMPT_TEMPLATE_TOO_LARGE. |
| variables | object | Yes | Purpose-bound flat map of 0 through 2000 variables; values may be any JSON and extra keys are the variable names themselves — unconstrained RFC 8259 JSON items. |
| syntax | string | No | Placeholder syntax; omit it for MUSTACHE. Published values: MUSTACHE, BRACE, DOLLAR_BRACE, PERCENT. An unrecognised syntax is PROMPT_SYNTAX_UNSUPPORTED. |
| requiredVariables | array | No | Bounded array of 0 through 2000 names required even when the template never mentions them; omit it for template-only coverage. |
| treatBlankAsMissing | boolean | No | Whether empty values count as missing; omit it for false. |
| caseSensitive | boolean | No | Whether names match case-sensitively; omit it for true. |
| maxIssues | integer | No | Per-list cap; omit it for 1000. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | Whether the template can be rendered completely from the supplied variables. |
| missing | array | Yes | Bounded array of 0 through 10000 names in first-seen or supplied order. |
| unused | array | Yes | Bounded array of 0 through 10000 names in first-seen or supplied order. |
| blank | array | Yes | Bounded array of 0 through 10000 names in first-seen or supplied order. |
| unsupportedForms | array | Yes | Bounded array of 0 through 10000 unsupported placeholder forms with reason and span. |
| placeholders | array | Yes | Bounded array of 0 through 2000 distinct placeholders in first-seen order. |
| summary | object | Yes | Closed coverage summary with untruncated counts, resolved syntax, and truncation flag. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"ai.prompt_variable_validate","input":{"promptTemplate":"You are a support agent for {{company}}. Write a reply to {{customer_name}} about order {{order_id}}.","variables":{"company":"Northwind Supplies","customer_name":"Priya Raman","order_id":"NW-84120"}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("ai.prompt_variable_validate", {"promptTemplate":"You are a support agent for {{company}}. Write a reply to {{customer_name}} about order {{order_id}}, and sign it as {{company}}.","variables":{"company":"Northwind Supplies","customer_name":"Priya Raman","order_id":"NW-84120"}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| PROMPT_TEMPLATE_INVALID | 400 | No | The request payload failed this skill's input validation. |
| PROMPT_TEMPLATE_TOO_LARGE | 429 | No | A size, quota, rate, or time limit was exceeded. |
| PROMPT_VARIABLES_INVALID | 400 | No | The request payload failed this skill's input validation. |
| PROMPT_PLACEHOLDER_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| PROMPT_SYNTAX_UNSUPPORTED | 400 | No | The skill does not support the requested variant. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not render the template — you get a verdict, never filled-in text
- Does not call a model, an embedding endpoint or any inference API
- Does not decide whether a template is allowed to reference something — communication.template_validate answers that against an allowlist
- Does not interpret sections, conditionals, loops or filters; it names them instead
- Does not resolve dotted names into nested objects: customer.name looks for a variable literally called customer.name
- Rendering the finished prompt, which this never does
- Deciding whether a template is permitted to reference sensitive fields
- Templates written in a full template language with loops and conditionals you expect to be evaluated
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "ai.prompt_variable_validate",
"input": {
"promptTemplate": "You are a support agent for {{company}}. Write a reply to {{customer_name}} about order {{order_id}}, and sign it as {{company}}.",
"variables": {
"company": "Northwind Supplies",
"customer_name": "Priya Raman",
"order_id": "NW-84120"
}
}
}Examples
Every placeholder covered, so the prompt is safe to render
{
"promptTemplate": "You are a support agent for {{company}}. Write a reply to {{customer_name}} about order {{order_id}}, and sign it as {{company}}.",
"variables": {
"company": "Northwind Supplies",
"customer_name": "Priya Raman",
"order_id": "NW-84120"
}
}{
"placeholders": [
{
"name": "company",
"occurrences": 2,
"firstSpan": {
"start": 28,
"end": 39
}
},
{
"name": "customer_name",
"occurrences": 1,
"firstSpan": {
"start": 58,
"end": 75
}
},
{
"name": "order_id",
"occurrences": 1,
"firstSpan": {
"start": 88,
"end": 100
}
}
],
"valid": true,
"blank": [],
"summary": {
"placeholderCount": 4,
"distinctPlaceholderCount": 3,
"variableCount": 3,
"missingCount": 0,
"unusedCount": 0,
"syntax": "MUSTACHE",
"truncated": false
},
"missing": [],
"unused": [],
"unsupportedForms": []
}A missing name, a blank value, a spare variable and a control tag
{
"promptTemplate": "Dear {{customer_name}}, your invoice {{invoice_id}} is due on {{due_date}}.{{#if overdue}} It is overdue.{{/if}}",
"variables": {
"customer_name": "Priya Raman",
"invoice_id": " ",
"locale": "en-GB"
},
"requiredVariables": [
"tenant_id"
],
"treatBlankAsMissing": true
}{
"placeholders": [
{
"name": "customer_name",
"occurrences": 1,
"firstSpan": {
"start": 5,
"end": 22
}
},
{
"name": "invoice_id",
"occurrences": 1,
"firstSpan": {
"start": 37,
"end": 51
}
},
{
"name": "due_date",
"occurrences": 1,
"firstSpan": {
"start": 62,
"end": 74
}
}
],
"valid": false,
"blank": [
"invoice_id"
],
"summary": {
"placeholderCount": 3,
"distinctPlaceholderCount": 3,
"variableCount": 3,
"missingCount": 2,
"unusedCount": 1,
"syntax": "MUSTACHE",
"truncated": false
},
"missing": [
"due_date",
"tenant_id"
],
"unused": [
"locale"
],
"unsupportedForms": [
{
"form": "{{#if overdue}}",
"reason": "CONTROL_TAG",
"span": {
"start": 75,
"end": 90
}
},
{
"form": "{{/if}}",
"reason": "CONTROL_TAG",
"span": {
"start": 105,
"end": 112
}
}
]
}Recommended use cases
- Catch a missing variable before you spend a model call rendering a broken prompt
- Show an operator exactly which fields a prompt template still needs
- Fail a deployment when a template picked up a control tag your renderer cannot fill
Avoid for
- Rendering the finished prompt, which this never does
- Deciding whether a template is permitted to reference sensitive fields
- Templates written in a full template language with loops and conditionals you expect to be evaluated
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.