version-guard

version-guard is a command for coding agents from sigistry/marketplace. It costs 17 tokens per session (923 once invoked), scanned A, original, MIT.

A command that compares two versions of an API's public contract and labels changes as breaking or non-breaking. Semver is a versioning convention where breaking changes usually require a major-version increase.

In plain words
What is it for?
It is for comparing OpenAPI, Swagger, or GraphQL changes from a Git range or against the previous committed version.
Why use it?
It makes compatibility risks visible before an API release and recommends the corresponding semver bump.

Command

Part of the api-contract-keeper plugin — 4 skills, 3 commands, 2 agents shipped together

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 commands/sigistry/marketplace/version-guard
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Or install api-contract-keeper, the plugin that ships this one along with the rest of its 4 skills, 3 commands, 2 agents.

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 version-guard

README.md
[![agentmods](https://agentmods.dev/badge/commands/sigistry/marketplace/version-guard.svg)](https://agentmods.dev/commands/sigistry/marketplace/version-guard)
Your own site
<a href="https://agentmods.dev/commands/sigistry/marketplace/version-guard"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/version-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 923 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 $0.00017 $0.00923
Opus 5 $0.00009 $0.00462
Sonnet 5 $0.00003 $0.00185
Haiku 4.5 $0.00002 $0.00092

Measured 4d ago against content hash 77887d67c793, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

version-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 4d ago.

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.

plugins/api-contract-keeper/commands/version-guard.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Classify changes to the API surface as breaking or non-breaking using oasdiff-style semantics, then recommend a semver bump. $ARGUMENTS is either a git range (from-ref..to-ref, e.g. v1.4.0..HEAD) to diff two versions of the spec, or a single spec file to compare against its previous committed version. This is a static analysis of the contract, no server or live traffic. Load the openapi-drift skill for the breaking-change rules.

Process

Step 1: Resolve the two versions of the surface

  • Git range: check out (or git show) the spec file at each ref; if the spec is code-first, diff the extracted surface (routes, DTOs, GraphQL SDL) at each ref.
  • Single file: diff the working copy against HEAD (or the last tag) via git. Handle both OpenAPI/Swagger and GraphQL SDL. For GraphQL, GraphQL's own rules apply (adding a nullable field is safe; making an output field non-null is safe; making an input field required or non-null is breaking).

Step 2: Classify every change

Walk the diff and label each change using references/breaking-change-rules.md. Summary of the rules:

Change Verdict Why
Remove or rename an endpoint/field/enum value Breaking Existing clients call/read it
Add a new required request field/param Breaking Old clients omit it → rejected
Narrow a type / tighten validation (smaller max, new pattern, intenum) Breaking Previously-valid requests now fail
Make a response field nullable / remove a response field Breaking Clients depend on presence/non-null
Change a status code or the error shape Breaking Client branching/handling breaks
Make an optional request field required Breaking Same as adding a required field
Add a new optional request field/param Non-breaking Old clients omit it safely
Add a new endpoint / new enum value in a response Non-breaking* *response enum growth can surprise strict clients, flag
Add a response field / widen a type / loosen validation Non-breaking Superset accepts old inputs/outputs
Make a required response field... it stays required Non-breaking No client impact

Read the full file on GitHub · 52 lines

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. 4d ago First seen · 52 lines · 17 tokens per session scan A 77887d67c793

Subscribe to this mod's changes

version-guard is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 923 once invoked, about $0.0001 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-08-31.