Skip to main content

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

MicroSkills Reference

YAML Schema Validator

schema.validate_yaml_schema

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You send YAML text and a JSON Schema, and we read the YAML with a parser that will not build arbitrary objects, will not follow custom tags, and gives up on the alias and nesting tricks that turn a small file into a memory bomb. What comes out is checked against your schema, and every problem is reported with the path inside the document, the rule that rejected it, and a readable message. We check structure and values, not indentation style or comment placement.

Most of what runs your infrastructure is a YAML file, and the usual way to find a mistake in one is to apply it. Checking it against a schema first is cheaper, and doing so with a parser that refuses to instantiate objects keeps an untrusted file from becoming an execution path.

Reliability

Deterministic: the same text, schema, and options always produce the same verdict and the same errors. The dialect comes from schemaDialect rather than from your schema's own $schema keyword. Parsing is deliberately restrictive — no custom tags, no recursive keys, at most 50 aliases and 64 levels of nesting — so a file built to exhaust memory is refused instead of expanded. We reject the call, and an unchanged retry will not help, when yaml is missing or is not a string, when it exceeds 1000000 bytes or holds a line over 32768 characters, when the text is not valid YAML, when it holds several documents and you did not allow that, when schema is missing, is not an object, or cannot be compiled, when schemaDialect is not one we recognise, or when maxErrors falls outside 1 to 1000.

Context footprint

The text is capped at 1000000 bytes and is never echoed back; the response holds at most maxErrors short rows. A successful call costs 1 execution credit.

When to use it

Before applying or shipping YAML that has to match a schema you already have.

When you care about how the file is formatted rather than what it says, or when the schema is only complete once another document is loaded.

Scope

Note
We read your YAML with a hardened parser and check the result against a JSON Schema, reporting each problem with its path inside the document.

Non-goals

  • We never pull in another schema document, so send a self-contained schema
  • We never build custom objects from YAML tags; only plain data comes out
  • We never comment on style, indentation, or key ordering

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input976.6 KB

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
yamlstringYesYAML text to check, 1 to 1000000 characters, with no line longer than 32768.
schemaobjectYesJSON Schema applied to each YAML document, with local $ref only and at most 4096 properties. — unconstrained RFC 8259 JSON items.
schemaDialectstringNoDialect such as draft-2020-12, draft-2019-09 or draft-07; omit it for draft-2020-12. Punctuation is ignored.
allowMultipleDocumentsbooleanNoWhether a stream of several YAML documents is acceptable; omit it for false.
maxErrorsintegerNoHow many problems to list, 1 through 1000; omit it for 100.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when every document satisfied the schema.
errorsarrayYesProblems in validator order, 0 through 1000 closed {path, schemaPath, keyword, message} objects; empty when valid.
documentCountintegerYesHow many YAML documents the text held; 1 for an ordinary or empty file.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_yaml_schema","input":{"yaml":"name: Alice\nage: 30","schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("schema.validate_yaml_schema", {"yaml":"name: Alice\nage: 30\n","schema":{"required":["name"],"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}}}});

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.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • We never pull in another schema document, so send a self-contained schema
  • We never build custom objects from YAML tags; only plain data comes out
  • We never comment on style, indentation, or key ordering
  • Judging formatting or style rather than content
  • Schemas that only work if another document is fetched

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "schema.validate_yaml_schema",
  "input": {
    "yaml": "name: Alice\nage: 30\n",
    "schema": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "age": {
          "type": "integer"
        }
      }
    }
  }
}

Examples

Valid config YAML

Inputjson
{
  "yaml": "name: Alice\nage: 30\n",
  "schema": {
    "required": [
      "name"
    ],
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "age": {
        "type": "integer"
      }
    }
  }
}
Expected outputjson
{
  "errors": [],
  "valid": true,
  "documentCount": 1
}

Type mismatch on a field

Inputjson
{
  "yaml": "name: Alice\nage: not-an-int\n",
  "schema": {
    "type": "object",
    "properties": {
      "age": {
        "type": "integer"
      }
    }
  }
}
Expected outputjson
{
  "errors": [
    {
      "path": "/age",
      "schemaPath": "/properties/age/type",
      "message": "string found, integer expected",
      "keyword": "type"
    }
  ],
  "valid": false,
  "documentCount": 1
}
  • Check a config or manifest before you deploy it anywhere
  • Hold infrastructure-as-code to a schema in review or in CI
  • Verify generated YAML against the contract it is supposed to meet

Avoid for

  • Judging formatting or style rather than content
  • Schemas that only work if another document is fetched

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

schemayamlvalidation