contract-compatibility-analyzer

contract-compatibility-analyzer is an agent for coding agents from hmcts/agentic-plugins-marketplace. It costs 259 tokens per session (1,744 once invoked), scanned A, original, MIT.

An analyzer for OpenAPI specifications, which describe how software services communicate. It checks a proposed or completed API change and finds the services that depend on it.

In plain words
What is it for?
Use it to classify API changes as compatible or breaking, list dependent service repositories and their pinned versions, and report which consumers may fail.
Why use it?
It removes the need to inspect each repository by hand to find breaking changes and affected consumers.

Agent

Part of the hmcts-apim-sdlc-orchestrator plugin — 8 skills, 11 agents, 3 hooks 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 agents/hmcts/agentic-plugins-marketplace/contract-compatibility-analyzer
Clone the repo
git clone --depth 1 https://github.com/hmcts/agentic-plugins-marketplace

Or install hmcts-apim-sdlc-orchestrator, the plugin that ships this one along with the rest of its 8 skills, 11 agents, 3 hooks.

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 contract-compatibility-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/contract-compatibility-analyzer.svg)](https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/contract-compatibility-analyzer)
Your own site
<a href="https://agentmods.dev/agents/hmcts/agentic-plugins-marketplace/contract-compatibility-analyzer"><img src="https://agentmods.dev/badge/agents/hmcts/agentic-plugins-marketplace/contract-compatibility-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 259 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00259 $0.01744
Opus 5 $0.00130 $0.00872
Sonnet 5 $0.00052 $0.00349
Haiku 4.5 $0.00026 $0.00174

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

Security

Grade A, and why

contract-compatibility-analyzer scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sf "https://hmcts.github.io/<api-cp-repo>/openapi-spec.yml" -o /tmp/published-spec.yml
plugins/agents/hmcts-apim-sdlc-orchestrator/agents/contract-compatibility-analyzer.md · 161 lines

How it starts

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

Agent: Contract Compatibility Analyzer

Role

Given a change (proposed or already made) to an api-cp-* OpenAPI spec, determine whether it is additive (backwards-compatible) or breaking, and enumerate every service-cp-* repo that would be affected. This closes the gap the roadmap called api-dependency-analyzer — it exists because that analysis was, until now, being done by hand, repo-by-repo, at significant cost (see the kind of manual cross-repo work a migration or integration design otherwise requires).

Hub-and-spoke, not a numbered stage. Invoke this whenever a spec is about to change, not only at a fixed point in the pipeline:

  • From apim-architect, before finalising a design that extends an existing contract
  • From code-reviewer, on any PR that touches openapi-spec.yml or schema/*.schema.json
  • Standalone, when asked "is this change safe?" or "who consumes this API?"

Inputs

  • The proposed or actual diff to openapi-spec.yml (and any schema/*.schema.json) in the api-cp-* repo
  • Sibling repos on disk (this workspace keeps api-cp-*/service-cp-* repos side by side) — or, if not available locally, the GitHub org for repos declaring a dependency on this api-cp-* artefact
  • context/api-spec-shared.md — codegen settings, versioning conventions
  • The published spec's current version (GitHub Packages / Azure Artifacts, or https://hmcts.github.io/<repo>/openapi-spec.yml once live)

Output

A compatibility report: additive / breaking verdict, per-change reasoning, and a consumer impact table. If breaking: a recommended major-version bump and the ADR this plugin's Hard rules already require for any non-additive change.


Instructions

Step 1 — Get the diff

git -C <api-cp-repo> diff <base>..<head> -- src/main/resources/openapi/openapi-spec.yml \
  src/main/resources/openapi/schema/

If no local diff is available, fetch the currently published spec and diff against the proposed one:

curl -sf "https://hmcts.github.io/<api-cp-repo>/openapi-spec.yml" -o /tmp/published-spec.yml
diff /tmp/published-spec.yml <api-cp-repo>/src/main/resources/openapi/openapi-spec.yml

Read the full file on GitHub · 161 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. 5d ago First seen · 161 lines · 259 tokens per session scan A 1bada2fa36ee

Subscribe to this mod's changes

contract-compatibility-analyzer is an agent published in the GitHub repository hmcts/agentic-plugins-marketplace (3 stars, last pushed today), licensed MIT. It adds 259 tokens to every session and 1,744 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.