schema-guard

schema-guard is a skill for Claude Code, Codex from runxhq/runx. It costs 39 tokens per session (418 once invoked), scanned A, original, Apache-2.0.

A contract-checking tool for proposed JSON API or data-schema changes. It compares the old and new schemas, tests supplied sample payloads, applies compatibility rules, and produces a publish proposal only when the change passes.

In plain words
What is it for?
Use it to review API or data-contract changes and gate publication with a verdict tied to the exact schemas and samples.
Why use it?
It catches breaking changes such as removed fields, changed types, newly required fields, or narrowed allowed values before callers are affected. It also reports parts of the proposed contract that no sample tests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/runxhq/runx/schema-guard
Any agent
npx skills add runxhq/runx --skill schema-guard
Clone the repo
git clone --depth 1 https://github.com/runxhq/runx

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for schema-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/runxhq/runx/schema-guard.svg)](https://agentmods.dev/skills/runxhq/runx/schema-guard)
Your own site
<a href="https://agentmods.dev/skills/runxhq/runx/schema-guard"><img src="https://agentmods.dev/badge/skills/runxhq/runx/schema-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 418 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00418
Opus 5 $0.00019 $0.00209
Sonnet 5 $0.00008 $0.00084
Haiku 4.5 $0.00004 $0.00042

Measured 2d ago against content hash 8cf85c86e819, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

schema-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (schema-guard.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/schema-guard/SKILL.md · 43 lines

What it actually says

Schema Guard

Schema Guard decides whether a proposed contract change can move forward without silently breaking callers. It compares the current and proposed JSON Schema contracts field by field, validates every supplied sample payload against the proposed contract, applies the caller's compatibility policy, and either refuses or emits a gated publish proposal. It never publishes anything itself.

Procedure

  1. Native data.digest binds the exact current schema, proposed schema, and sample set before any judgment, so the verdict is tied to specific bytes.
  2. Deterministic comparison walks both contracts: removed fields, type changes, fields that became required, new required fields, and narrowed enums are breaking; additive optional fields and expanded enums are notes.
  3. Every sample payload is validated against the proposed contract. Coverage is reported honestly: paths no sample exercises are flagged, not assumed covered.
  4. The policy decides the verdict. Breaking changes are refused unless breaking_allowed is explicitly true, and policy required_fields must exist in the proposed contract.
  5. A compatible verdict emits a proposal with the three digests and changed paths, gated on a schema publisher or human approver. A refused verdict emits no proposal. live_write_performed is always false.

Invalid requests refuse with policy_result: invalid_input and findings rather than guessing. Missing required inputs fail at admission.

Output

schema_check (runx.schema_check.v1) carries decision, policy_result, breaking_changes, per-sample validation_results, migration_notes including coverage, the gated proposal or null, and validation.

Inputs are current_schema, proposed_schema, sample_payloads, and compatibility_policy.

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 43 lines · 39 tokens per session scan A 8cf85c86e819

Subscribe to this mod's changes

schema-guard is a skill published in the GitHub repository runxhq/runx (85 stars, last pushed 2d ago), licensed Apache-2.0. It adds 39 tokens to every session and 418 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.