api-contract-testing

api-contract-testing is a skill for Claude Code from Intense-Visions/harness-engineering. It costs 0 tokens per session (2,873 once invoked), scanned A, original, MIT.

A guide to testing the agreement between an API provider and the programs that consume it. Each consumer records the response shape it expects, and the provider checks those expectations in continuous integration.

In plain words
What is it for?
Use it for frontend, mobile, partner, or service-to-service APIs and for automated checks on OpenAPI changes.
Why use it?
It catches changes that would break existing consumers before deployment, without requiring a live environment or slow end-to-end tests.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the harness-claude plugin — 85 skills, 89 commands, 16 agents, 4 hooks, 4 MCP servers shipped together

Good fit Use it for frontend, mobile, partner, or service-to-service APIs and for automated checks on OpenAPI changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/intense-visions/harness-engineering/api-contract-testing
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.

Any agent
npx skills add Intense-Visions/harness-engineering --skill api-contract-testing
Clone the repo
git clone --depth 1 https://github.com/Intense-Visions/harness-engineering

Made for: Claude Code.

Or install harness-claude, the plugin that ships this one along with the rest of its 85 skills, 89 commands, 16 agents, 4 hooks, 4 MCP servers.

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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/intense-visions/harness-engineering/api-contract-testing/github.svg)](https://agentmods.dev/skills/intense-visions/harness-engineering/api-contract-testing)
Your own site
<a href="https://agentmods.dev/skills/intense-visions/harness-engineering/api-contract-testing"><img src="https://agentmods.dev/badge/skills/intense-visions/harness-engineering/api-contract-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-contract-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/intense-visions/harness-engineering/api-contract-testing"><img src="https://agentmods.dev/badge/skills/intense-visions/harness-engineering/api-contract-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,873 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00000 $0.02873
Opus 5 $0.00000 $0.01437
Sonnet 5 $0.00000 $0.00575
Haiku 4.5 $0.00000 $0.00287

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

Security

Grade A, and why

api-contract-testing 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 8d 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.

agents/skills/claude-code/api-contract-testing/SKILL.md · 223 lines

How it starts

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

API Contract Testing

CONSUMER-DRIVEN CONTRACT TESTING INVERTS THE TRADITIONAL INTEGRATION TEST — EACH CONSUMER PUBLISHES THE EXACT SHAPE IT EXPECTS, THE PROVIDER VERIFIES AGAINST EVERY CONSUMER'S CONTRACT IN CI, AND A BREAKING CHANGE IS CAUGHT THE MOMENT IT IS INTRODUCED INTO THE PROVIDER CODEBASE RATHER THAN DISCOVERED AT DEPLOYMENT TIME WHEN ROLLING BACK COSTS HOURS.

When to Use

  • Adding a new API consumer (frontend, mobile, partner service) and formalizing what shape it expects from the provider
  • Running a provider code change through CI and needing proof that no existing consumer contract is broken before merging
  • Integrating spectral or vacuum schema linting into a CI pipeline for an OpenAPI spec that has no automated quality gate today
  • Evaluating oasdiff or openapi-diff for automated breaking-change detection between two versions of a spec
  • Replacing a brittle end-to-end integration test suite with faster, isolated contract tests that do not require a live environment
  • Writing the API governance checklist for a platform team that ships multiple versioned services
  • Onboarding a new team to consumer-driven contract practices before they begin building their first provider

Instructions

Key Concepts

  1. Consumer-driven contracts — A consumer-driven contract captures the exact subset of the provider API that a specific consumer uses: the request shape it sends and the minimum response fields it requires. The consumer publishes this contract as a Pact file (JSON); the provider runs the Pact file against its real implementation in CI. If the provider's response no longer satisfies the consumer's contract, the provider build fails — before any deployment. This is the inverse of provider-driven testing, where the provider defines what it thinks consumers need and consumers adapt. Consumer-driven contracts give each consumer a voice in breaking-change detection.

  2. Pact fundamentals — A Pact file is a JSON document that encodes one or more interactions: { "description": "a request for payment intent pi_xxx", "request": { "method": "GET", "path": "/payment_intents/pi_xxx" }, "response": { "status": 200, "body": { "id": "pi_xxx", "status": "succeeded" } } }. The consumer writes the test using the Pact DSL (available in JavaScript, Python, Go, Java, Ruby, .NET); the DSL generates the Pact file and runs a mock provider during the consumer test. The provider test replays each interaction from the Pact file against the real provider, verifying response status, headers, and body match the consumer's expectations.

Read the full file on GitHub · 223 lines

Files

What ships with it

1 file 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. 8d ago First seen · 223 lines · 0 tokens per session scan A 4c4d5ee5a805

Subscribe to this mod's changes

api-contract-testing is a skill published in the GitHub repository Intense-Visions/harness-engineering (20 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,873 tokens. 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.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

backend/testing-guide

A guide for writing backend tests: small unit tests, tests that check connected parts such as an API and database, and end-to-end tests that follow a complete user flow.

echoVic/boss-skill · 30 tokens

endpoint-probe

Probes each major Agent Monitor API route — /api/stats, /api/analytics, /api/sessions, /api/pricing/cost, /api/workflows/runs, /api/cc-config/overview — and reports each one's HTTP status, latency, and response shape, flagging which are reachable. Use to verify a dashboard install is wired up correctly.

hoangsonww/Claude-Code-Agent-Monitor · 80 tokens

emulate-seed

Generate emulate seed configs for stateful API emulation. Wraps Vercel's emulate tool for GitHub, Vercel, Google OAuth, Slack, Apple Auth, Microsoft Entra, AWS, Okta, Clerk, Resend, Stripe, and MongoDB Atlas APIs — full state machines, not mocks. Use when setting up test environments, CI pipelines, integration tests…

yonatangross/orchestkit · 86 tokens

api-smoke-testing

Start the dev server, discover API routes from the codebase, hit every endpoint, and report which ones return errors.

spencerpauly/awesome-cursor-skills · 29 tokens

Kafka Event-Driven Testing

Test Kafka-based event-driven systems, producer and consumer integration tests with Testcontainers, schema compatibility gates, idempotency and ordering verification, dead-letter handling, and end-to-end event flow assertions.

PramodDutta/qaskills · 45 tokens