contract-testing

contract-testing is a skill for Claude Code from proffesor-for-testing/agentic-qe. It costs 35 tokens per session (1,615 once invoked), scanned A, original, MIT.

A method for testing the agreements between services that communicate through APIs. An API is an interface that lets software exchange requests and responses; this method checks that a service still meets what its users expect.

In plain words
What is it for?
Use it with microservices, third-party integrations, and distributed teams to define consumer expectations, verify providers with Pact, and check API changes in CI/CD.
Why use it?
It helps detect breaking API changes before deployment, especially when separate teams maintain connected services. It also supports backward compatibility for supported API versions.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the agentic-qe plugin — 41 skills, 143 commands, 10 agents, 10 hooks, 1 plugin shipped together

Good fit Use it with microservices, third-party integrations, and distributed teams to define consumer expectations, verify providers with Pact, and check API changes in CI/CD.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/proffesor-for-testing/agentic-qe/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 proffesor-for-testing/agentic-qe --skill contract-testing
Clone the repo
git clone --depth 1 https://github.com/proffesor-for-testing/agentic-qe

Made for: Claude Code.

Or install agentic-qe, the plugin that ships this one along with the rest of its 41 skills, 143 commands, 10 agents, 10 hooks, 1 plugin.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/proffesor-for-testing/agentic-qe/contract-testing/github.svg)](https://agentmods.dev/skills/proffesor-for-testing/agentic-qe/contract-testing)
Your own site
<a href="https://agentmods.dev/skills/proffesor-for-testing/agentic-qe/contract-testing"><img src="https://agentmods.dev/badge/skills/proffesor-for-testing/agentic-qe/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 contract-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/proffesor-for-testing/agentic-qe/contract-testing"><img src="https://agentmods.dev/badge/skills/proffesor-for-testing/agentic-qe/contract-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,615 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.
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.00035 $0.01615
Opus 5.5 $0.00014 $0.00646
Sonnet 5.5 $0.00007 $0.00323
Haiku 4.5 $0.00003 $0.00161

Measured 5d ago against content hash 8eac567304b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

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.

.claude/skills/contract-testing/SKILL.md · 240 lines

How it starts

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

Contract Testing

<default_to_action> When testing API contracts or microservices:

  1. DEFINE consumer expectations (what consumers actually need)
  2. VERIFY provider fulfills contracts (Pact verification)
  3. DETECT breaking changes before deployment (CI/CD integration)
  4. VERSION APIs semantically (breaking = major bump)
  5. MAINTAIN backward compatibility for supported versions

Quick Contract Testing Steps:

  • Consumer: Define expected request/response pairs
  • Provider: Verify against all consumer contracts
  • CI/CD: Block deploys that break contracts
  • Versioning: Document supported versions and deprecation

Critical Success Factors:

  • Consumers own the contract (they define what they need)
  • Provider must pass all consumer contracts before deploy
  • Breaking changes require coordination, not surprise </default_to_action>

Quick Reference Card

When to Use

  • Microservices communication
  • Third-party API integrations
  • Distributed team coordination
  • Preventing breaking changes

Consumer-Driven Contract Flow

Consumer → Defines Expectations → Contract
                    ↓
Provider → Verifies Contract → Pass/Fail
                    ↓
CI/CD → Blocks Breaking Changes

Breaking vs Non-Breaking Changes

Change Type Breaking? Semver
Remove field ✅ Yes Major
Rename field ✅ Yes Major
Change type ✅ Yes Major
Add optional field ❌ No Minor
Add new endpoint ❌ No Minor
Bug fix ❌ No Patch

Tools

Tool Best For
Pact Consumer-driven contracts
OpenAPI/Swagger API-first design
JSON Schema Schema validation
GraphQL Schema-first contracts

Consumer Contract (Pact)

// Consumer defines what it needs
const { Pact } = require('@pact-foundation/pact');

describe('Order API Consumer', () => {
  const provider = new Pact({
    consumer: 'CheckoutUI',
    provider: 'OrderService'
  });

  beforeAll(() => provider.setup());
  afterAll(() => provider.finalize());

  it('creates an order', async () => {
    await provider.addInteraction({
      state: 'products exist',
      uponReceiving: 'a create order request',
      withRequest: {
        method: 'POST',
        path: '/orders',
        body: { productId: 'abc', quantity: 2 }
      },
      willRespondWith: {
        status: 201,
        body: {
          orderId: like('order-123'),  // Any string matching pattern
          total: like(19.99)           // Any number
        }
      }
    });

    const response = await orderClient.create({ productId: 'abc', quantity: 2 });
    expect(response.orderId).toBeDefined();
  });
});

Read the full file on GitHub · 240 lines

Files

What ships with it

6 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. 5d ago First seen · 240 lines · 35 tokens per session scan A 8eac567304b6

Subscribe to this mod's changes

contract-testing is a skill published in the GitHub repository proffesor-for-testing/agentic-qe (504 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,615 once invoked, about $0.0001 per session on Opus 5.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-10-11.