Skip to main content

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

MicroSkills Reference

Validate Protobuf Schema

schema.validate_protobuf_schema

ProductionBounded custom (Class B)Deterministicstrictmoderatev1.0.0
No network

Overview

You send one to one hundred virtual .proto files. Squillify materializes them in a temporary directory and runs a disposable protoc child with a fixed argument vector: proto_path, descriptor_set_out and include_imports. Path traversal is rejected. This does not run plugins, fetch remote imports or emit generated source. A successful call costs 2 execution credits.

Protobuf validation must stay off the API classloader and must not run plugins.

Reliability

PROTOBUF_SCHEMA_LIMIT_EXCEEDED — trigger: more than 100 files or 2 MiB; retryable: no; next: split the set. PROTOBUF_PATH_TRAVERSAL — trigger: absolute or .. virtual path; retryable: no; next: send a relative path. PROTOBUF_CHILD_BUSY — trigger: child capacity exhausted; retryable: yes; next: retry. PROTOBUF_CHILD_TIMEOUT — trigger: protoc exceeded 5 seconds; retryable: no; next: reduce the source set. PROTOBUF_PROTOC_UNAVAILABLE — trigger: protoc binary missing; retryable: no; next: provision the pinned compiler.

Context footprint

Sources are virtual files only. A successful call costs 2 execution credits.

When to use it

When the caller already holds a bounded virtual proto source set.

When generated stubs, Buf checks or remote imports are required.

Powered by a disposable protoc child that writes a descriptor set. No plugins.

Scope

Note
Compiles virtual proto files with a disposable protoc child and returns descriptor-set identity.

Non-goals

  • Does not generate language source
  • Does not run protoc plugins
  • Does not fetch remote imports

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input2.1 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
filesarrayYesVirtual proto files, 1 through 101 closed {path, source} objects; runtime accepts at most 100.
entryFilesarrayNoRelative entry paths, 0 through 101 strings; omit it to compile the first file.
editionPolicystringNoPROTO2_PROTO3 or ALLOW_SUPPORTED_EDITIONS; omit it for PROTO2_PROTO3.

Output schema

FieldTypeRequiredDescription
validbooleanYesTrue when protoc wrote a descriptor set for the virtual source set.
fileCountintegerYesHow many virtual files were materialized.
messageCountintegerYesHow many message keywords were counted in the supplied sources.
enumCountintegerYesHow many enum keywords were counted in the supplied sources.
serviceCountintegerYesHow many service keywords were counted in the supplied sources.
diagnosticsarrayYesDeterministically ordered closed {code, severity, message, path} diagnostics, empty when valid.
descriptorSetDigeststringNoSHA-256 hex of the descriptor set; omit it when compilation failed.
enginestringYesPinned child compiler identity, always protoc.

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_protobuf_schema","input":{"files":[{"path":"ping.proto","source":"syntax = \"proto3\"; message Ping { string id = 1; }"}]}}'
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_protobuf_schema", {"files":[{"source":"syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; }\n","path":"ping.proto"}]});

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.
PROTOBUF_SCHEMA_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
PROTOBUF_PATH_TRAVERSAL400NoThe request payload failed this skill's input validation.
PROTOBUF_CHILD_BUSY429NoA size, quota, rate, or time limit was exceeded.
PROTOBUF_CHILD_TIMEOUT429NoA size, quota, rate, or time limit was exceeded.
PROTOBUF_PROTOC_UNAVAILABLE400NoThe skill does not support the requested variant.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not generate language source
  • Does not run protoc plugins
  • Does not fetch remote imports
  • Code generation
  • Buf lint or breaking-change checks

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "schema.validate_protobuf_schema",
  "input": {
    "files": [
      {
        "source": "syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; }\n",
        "path": "ping.proto"
      }
    ]
  }
}

Examples

A proto3 Ping message compiles

Inputjson
{
  "files": [
    {
      "source": "syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; }\n",
      "path": "ping.proto"
    }
  ]
}
Expected outputjson
{
  "messageCount": 1,
  "serviceCount": 0,
  "valid": true,
  "diagnostics": [],
  "enumCount": 0,
  "engine": "protoc",
  "fileCount": 1,
  "descriptorSetDigest": "2293dc9ef72c5f8c0192ac4db443462b2214d036923c1eed305be60e73ef1a18"
}
Tip
A one-message proto3 file produces valid true and a descriptor digest.

A duplicated field name is invalid

Inputjson
{
  "files": [
    {
      "source": "syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; string id = 2; }\n",
      "path": "ping.proto"
    }
  ]
}
Expected outputjson
{
  "fileCount": 1,
  "enumCount": 0,
  "valid": false,
  "messageCount": 0,
  "serviceCount": 0,
  "diagnostics": [
    {
      "code": "PROTOBUF_COMPILE",
      "severity": "ERROR",
      "message": "protoc rejected the virtual source set.",
      "path": "/files"
    }
  ],
  "engine": "protoc"
}
Tip
protoc rejection becomes valid false without a digest.
  • Lint a proto source set before a producer publishes it
  • Reject path-traversal virtual files before compile

Avoid for

  • Code generation
  • Buf lint or breaking-change checks

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

schemavalidationprotobuf