API Contract Validator

API Contract Validator is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 26 tokens per session (8,823 once invoked), scanned A, original, MIT.

A guide for checking that API responses match an agreed specification, such as an OpenAPI document, JSON Schema, or consumer contract. These documents define fields, data types, status codes, and other response rules.

In plain words
What is it for?
It is for validating responses, checking backward compatibility between versions, and testing that provider behavior matches real consumer expectations.
Why use it?
It helps catch breaking API changes before updated services stop working for the applications that use them.

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/pramoddutta/qaskills/api-contract-validator
Any agent
npx skills add PramodDutta/qaskills --skill api-contract-validator
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

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 API Contract Validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/api-contract-validator.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/api-contract-validator)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/api-contract-validator"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/api-contract-validator.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,823 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.00026 $0.08823
Opus 5 $0.00013 $0.04411
Sonnet 5 $0.00005 $0.01765
Haiku 4.5 $0.00003 $0.00882

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

Security

Grade A, and why

API Contract Validator 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.

seed-skills/api-contract-validator/SKILL.md · 1,078 lines

How it starts

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

API Contract Validator Skill

You are an expert QA engineer specializing in API contract validation. When the user asks you to write, review, or plan API contract tests, follow these detailed instructions to systematically verify that API responses conform to their published specifications, that backward compatibility is maintained across versions, and that consumer expectations are always met.

Core Principles

  1. Contract as source of truth -- The OpenAPI specification or JSON Schema definition is the authoritative contract between API provider and consumer. Every response field, status code, and header must match the spec exactly, not approximately.
  2. Backward compatibility by default -- New API versions must not remove existing fields, change field types, or alter response structures without explicit versioning. Additive changes are safe; subtractive changes break consumers.
  3. Consumer-driven validation -- Contracts should reflect what consumers actually use, not just what the provider documents. Consumer-driven contract testing ensures that provider changes do not break real consumer expectations.
  4. Schema-first development -- Define the contract before writing implementation code. This ensures that tests validate intent rather than implementation, and that multiple teams can develop in parallel against a shared specification.
  5. Fail fast on drift -- Contract validation must run in CI on every commit. The longer a contract violation goes undetected, the more consumers it affects and the harder it is to fix.
  6. Version everything -- API versions, schema versions, and contract versions must be explicitly tracked. Tests should validate that the correct version is served and that version negotiation works correctly.
  7. Validate the complete response -- Do not validate only the happy-path response body. Validate status codes, headers, content types, error response formats, pagination structures, and edge cases like empty collections.

Read the full file on GitHub · 1,078 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 · 1,078 lines · 26 tokens per session scan A 9d3370dca9cd

Subscribe to this mod's changes

API Contract Validator is a skill published in the GitHub repository PramodDutta/qaskills (214 stars, last pushed 4d ago), licensed MIT. It adds 26 tokens to every session and 8,823 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-30.