Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Prompt Variable Validator

ai.prompt_variable_validate

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

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

Note
Compares the placeholders in a prompt template against a supplied set of variables and reports what is missing, unused, empty or not a plain placeholder at all.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
promptTemplatestringYesTemplate text whose placeholders are compared against the supplied variables. The skill refuses more than 1,000,000 characters with PROMPT_TEMPLATE_TOO_LARGE.
variablesobjectYesPurpose-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.
syntaxstringNoPlaceholder syntax; omit it for MUSTACHE. Published values: MUSTACHE, BRACE, DOLLAR_BRACE, PERCENT. An unrecognised syntax is PROMPT_SYNTAX_UNSUPPORTED.
requiredVariablesarrayNoBounded array of 0 through 2000 names required even when the template never mentions them; omit it for template-only coverage.
treatBlankAsMissingbooleanNoWhether empty values count as missing; omit it for false.
caseSensitivebooleanNoWhether names match case-sensitively; omit it for true.
maxIssuesintegerNoPer-list cap; omit it for 1000.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether the template can be rendered completely from the supplied variables.
missingarrayYesBounded array of 0 through 10000 names in first-seen or supplied order.
unusedarrayYesBounded array of 0 through 10000 names in first-seen or supplied order.
blankarrayYesBounded array of 0 through 10000 names in first-seen or supplied order.
unsupportedFormsarrayYesBounded array of 0 through 10000 unsupported placeholder forms with reason and span.
placeholdersarrayYesBounded array of 0 through 2000 distinct placeholders in first-seen order.
summaryobjectYesClosed coverage summary with untruncated counts, resolved syntax, and truncation flag.

API contract

POST /v1/execute
curl
curl -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"}}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
PROMPT_TEMPLATE_INVALID400NoThe request payload failed this skill's input validation.
PROMPT_TEMPLATE_TOO_LARGE429NoA size, quota, rate, or time limit was exceeded.
PROMPT_VARIABLES_INVALID400NoThe request payload failed this skill's input validation.
PROMPT_PLACEHOLDER_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
PROMPT_SYNTAX_UNSUPPORTED400NoThe skill does not support the requested variant.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "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"
  }
}
Expected outputjson
{
  "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": []
}
Tip
The company placeholder appears twice and is reported once with occurrences two. Nothing is missing, so valid is true and you can render.

A missing name, a blank value, a spare variable and a control tag

Inputjson
{
  "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
}
Expected outputjson
{
  "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
      }
    }
  ]
}
Tip
due_date is never supplied and tenant_id was demanded through requiredVariables, so both land in missing. invoice_id is present but holds only spaces, and treatBlankAsMissing turns that into a blank entry. locale is spare, which is only a warning. The {{#if overdue}} and {{/if}} pair is reported as a control tag rather than silently dropped, which is the difference between an honest verdict and a false all-clear.
  • 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

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.

Tags

promptanalysisaivalidationmetadata