Contract Testing with Pact

Contract Testing with Pact is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 29 tokens per session (5,177 once invoked), scanned A, original, MIT.

A guide for consumer-driven contract testing with Pact, where the application using an API records its expectations and the API provider verifies them.

In plain words
What is it for?
Use it to create consumer and provider tests, share Pact files through Pact Broker, track verification, and check deployment compatibility.
Why use it?
It helps teams deploy services independently while checking that provider changes will not break consumers.

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/contract-testing-pact
Any agent
npx skills add PramodDutta/qaskills --skill contract-testing-pact
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 Contract Testing with Pact

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/contract-testing-pact.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/contract-testing-pact)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/contract-testing-pact"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/contract-testing-pact.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,177 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.00029 $0.05177
Opus 5 $0.00015 $0.02589
Sonnet 5 $0.00006 $0.01035
Haiku 4.5 $0.00003 $0.00518

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

Security

Grade A, and why

Contract Testing with Pact 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 yesterday.

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.

this.http = axios.create({ baseUrl });
seed-skills/contract-testing-pact/SKILL.md · 703 lines

How it starts

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

Contract Testing with Pact Skill

You are an expert QA engineer specializing in consumer-driven contract testing with Pact. When the user asks you to write, review, or debug Pact contract tests, follow these detailed instructions.

Core Principles

  1. Consumer-driven -- The consumer defines the contract; the provider must honor it.
  2. Pact as contract -- Pact files are the single source of truth for API compatibility.
  3. Independent deployability -- Contract tests ensure services can be deployed independently.
  4. Broker as hub -- The Pact Broker mediates contract sharing and verification tracking.
  5. Can-i-deploy -- Always verify deployment compatibility before deploying to production.

How Pact Works

Consumer Side                    Provider Side
┌─────────────┐                  ┌─────────────┐
│  Consumer    │                  │  Provider   │
│  Test        │                  │  Test       │
│             │                  │             │
│  1. Define   │    Pact File    │  3. Verify   │
│     expected │  ─────────────> │     against  │
│     behavior │                  │     running  │
│             │                  │     service  │
│  2. Generate │                  │             │
│     Pact     │                  │  4. Publish  │
│     file     │                  │     results  │
└─────────────┘                  └─────────────┘
        │                               │
        │       ┌───────────────┐       │
        └──────>│  Pact Broker  │<──────┘
                │               │
                │  Stores pacts │
                │  Tracks       │
                │  verification │
                │  can-i-deploy │
                └───────────────┘

Project Structure (TypeScript Consumer)

consumer-service/
  src/
    clients/
      user-api-client.ts
      product-api-client.ts
    models/
      user.model.ts
  tests/
    contract/
      user-api.consumer.pact.spec.ts
      product-api.consumer.pact.spec.ts
    pacts/           <-- Generated Pact files
      consumer-user-service.json
  jest.config.ts
  package.json

Read the full file on GitHub · 703 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. yesterday First seen · 703 lines · 29 tokens per session scan A 1d95e7f4001c

Subscribe to this mod's changes

Contract Testing with Pact is a skill published in the GitHub repository PramodDutta/qaskills (217 stars, last pushed 5d ago), licensed MIT. It adds 29 tokens to every session and 5,177 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

api-testing-patterns

Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.

summarybotng/summarybot-ng · 34 tokens

contract-testing

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Use when testing API contracts or coordinating distributed teams.

summarybotng/summarybot-ng · 35 tokens

stripe-payment-webhooks

Stripe checkout sessions, webhook cryptographic signature verification, idempotency, and refund flows.

Blazkojj/skillhub · 23 tokens

api-contract-tester

Implement consumer-driven contract testing with Pact to ensure API compatibility.

AtulPurohit/Antigravity-Awesome-Skills · 17 tokens

backend-contract-testing

Use this skill when the user says 'contract testing', 'Pact', 'consumer-driven contracts', 'CDC', 'provider verification', 'pact test', 'pactflow', 'contract test', 'consumer test', 'provider test'. This skill implements consumer-driven contract testing using Pact to ensure microservices communicate correctly without…

j4flmao/agent-skills · 100 tokens

tray-cupons

API completa de cupons de desconto da Tray (recurso discountcoupons). Cobre criar, editar, listar, consultar e excluir cupons (CRUD) e gerenciar os relacionamentos do cupom com clientes, produtos, categorias, marcas, fretes e cupom-presente, além da geração de cupom de troca a partir de um pedido. Total de 21…

tray-tecnologia/tray-api-ai-plugin · 156 tokens