Validate Protobuf Schema
schema.validate_protobuf_schema
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
Non-goals
- Does not generate language source
- Does not run protoc plugins
- Does not fetch remote imports
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 |
|---|---|---|---|
| files | array | Yes | Virtual proto files, 1 through 101 closed {path, source} objects; runtime accepts at most 100. |
| entryFiles | array | No | Relative entry paths, 0 through 101 strings; omit it to compile the first file. |
| editionPolicy | string | No | PROTO2_PROTO3 or ALLOW_SUPPORTED_EDITIONS; omit it for PROTO2_PROTO3. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when protoc wrote a descriptor set for the virtual source set. |
| fileCount | integer | Yes | How many virtual files were materialized. |
| messageCount | integer | Yes | How many message keywords were counted in the supplied sources. |
| enumCount | integer | Yes | How many enum keywords were counted in the supplied sources. |
| serviceCount | integer | Yes | How many service keywords were counted in the supplied sources. |
| diagnostics | array | Yes | Deterministically ordered closed {code, severity, message, path} diagnostics, empty when valid. |
| descriptorSetDigest | string | No | SHA-256 hex of the descriptor set; omit it when compilation failed. |
| engine | string | Yes | Pinned child compiler identity, always protoc. |
API contract
POST /v1/executecurl -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; }"}]}}'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
| 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. |
| PROTOBUF_SCHEMA_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| PROTOBUF_PATH_TRAVERSAL | 400 | No | The request payload failed this skill's input validation. |
| PROTOBUF_CHILD_BUSY | 429 | No | A size, quota, rate, or time limit was exceeded. |
| PROTOBUF_CHILD_TIMEOUT | 429 | No | A size, quota, rate, or time limit was exceeded. |
| PROTOBUF_PROTOC_UNAVAILABLE | 400 | No | The skill does not support the requested variant. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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)
{
"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
{
"files": [
{
"source": "syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; }\n",
"path": "ping.proto"
}
]
}{
"messageCount": 1,
"serviceCount": 0,
"valid": true,
"diagnostics": [],
"enumCount": 0,
"engine": "protoc",
"fileCount": 1,
"descriptorSetDigest": "2293dc9ef72c5f8c0192ac4db443462b2214d036923c1eed305be60e73ef1a18"
}A duplicated field name is invalid
{
"files": [
{
"source": "syntax = \"proto3\";\npackage demo;\nmessage Ping { string id = 1; string id = 2; }\n",
"path": "ping.proto"
}
]
}{
"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"
}Recommended use cases
- 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
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.