Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing.

MITAuto-check passedBackend & APIs

Install Contract Testing

skills CLI
$ npx skills add proffesor-for-testing/agentic-qe --skill contract-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install proffesor-for-testing/agentic-qe contract-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/proffesor-for-testing/agentic-qe.git skills-src && mkdir -p .claude/skills && cp -r skills-src/assets/skills/contract-testing .claude/skills/contract-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
contract-testing
GitHub stars
494
Token cost
~1.8k tokens
SKILL.md length
368 words
Files
7 (incl. scripts, references)
Skills in repo
111
Repo updated
First seen
Licence
MIT

At a glance

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing.

  • Works in 5 steps: DEFINE consumer expectations (what… → VERIFY provider fulfills contracts (Pact… → DETECT breaking changes before… → …
  • Testing API contracts
  • SKILL.md covers Quick Reference Card, Consumer Contract (Pact), Provider Verification and Breaking Change Detection, plus 6 more sections
  • Coordinating distributed teams

What it does

Contract Testing is an agent skill from proffesor-for-testing/agentic-qe. 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.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `config.json`, `evals/contract-testing.yaml` and `references/agent-commands.md`).

It sits in Backend & APIs, covering Integration testing, Microservices and Forms and validation. The repository describes itself as: Agentic QE Fleet is an open-source AI-powered QA/QE platform designed for use with Coding Agents (works best with Claude Code) featuring specialized agents and skills to support… The licence is MIT.

When your agent uses it

  • Testing API contracts
  • Coordinating distributed teams

Example prompts

  • “/contract-testing”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  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

What it can do on your machine

Read from SKILL.md and the folder at commit 829d030. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Contract Testing loads about 1.8k tokens when it runs, and up to ~2.9k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 368 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from proffesor-for-testing/agentic-qe at commit 829d030, republished under its MIT licence (© proffesor-for-testing). 368 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/contract-testing/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
contract-testing
description
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.
category
testing-methodologies
priority
high
tokenEstimate
900
agents
qe-api-contract-validator, qe-test-generator, qe-security-scanner
implementation_status
optimized
optimization_version
1
last_optimized
2025-12-02
quick_reference_card
true
tags
contract, pact, consumer-driven, api, microservices, schema-validation
trust_tier
3

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 TypeBreaking?Semver
Remove field✅ YesMajor
Rename field✅ YesMajor
Change type✅ YesMajor
Add optional field❌ NoMinor
Add new endpoint❌ NoMinor
Bug fix❌ NoPatch
Tools
ToolBest For
PactConsumer-driven contracts
OpenAPI/SwaggerAPI-first design
JSON SchemaSchema validation
GraphQLSchema-first contracts

Consumer Contract (Pact)

javascript
// 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();
  });
});

Provider Verification

javascript
// Provider verifies it fulfills all consumer contracts
const { Verifier } = require('@pact-foundation/pact');

describe('Order Service Provider', () => {
  it('fulfills all consumer contracts', async () => {
    await new Verifier({
      provider: 'OrderService',
      providerBaseUrl: 'http://localhost:3000',
      pactUrls: ['./pacts/checkoutui-orderservice.json'],
      stateHandlers: {
        'products exist': async () => {
          await db.products.create({ id: 'abc', price: 9.99 });
        }
      }
    }).verifyProvider();
  });
});

Breaking Change Detection

typescript
// Agent detects breaking changes
await Task("Contract Validation", {
  currentContract: 'openapi-v2.yaml',
  previousContract: 'openapi-v1.yaml',
  detectBreaking: true,
  calculateSemver: true,
  generateMigrationGuide: true
}, "qe-api-contract-validator");

// Output:
// Breaking changes found: 2
// - Removed field: order.discount
// - Type change: order.total (number → string)
// Recommended version: 3.0.0 (major bump)

CI/CD Integration

yaml
name: Contract Tests
on: [push]

jobs:
  consumer-tests:
    steps:
      - run: npm run test:contract
      - name: Publish Pacts
        run: npx pact-broker publish ./pacts --broker-base-url $PACT_BROKER

  provider-verification:
    needs: consumer-tests
    steps:
      - name: Verify Provider
        run: npm run verify:contracts
      - name: Can I Deploy?
        run: npx pact-broker can-i-deploy --pacticipant OrderService --version $VERSION

Agent Coordination Hints

Memory Namespace
aqe/contract-testing/
├── contracts/*           - Current contracts
├── breaking-changes/*    - Detected breaking changes
├── versioning/*          - Version compatibility matrix
└── verification-results/* - Provider verification history
Fleet Coordination
typescript
const contractFleet = await FleetManager.coordinate({
  strategy: 'contract-testing',
  agents: [
    'qe-api-contract-validator',  // Validation, breaking detection
    'qe-test-generator',          // Generate contract tests
    'qe-security-scanner'         // API security
  ],
  topology: 'sequential'
});

Agent CLI & Advanced Patterns

For v3 agent-specific commands (aqe contract ...), GraphQL contracts, event contracts, and Pact Broker integration, see references/agent-commands.md.


Show full SKILL.md (147 more words)Show less

Remember

Consumers own the contract. They define what they need; providers must fulfill it. Breaking changes require major version bumps and coordination. CI/CD blocks deploys that break contracts. Use Pact for consumer-driven, OpenAPI for API-first.

With Agents: Agents validate contracts, detect breaking changes with semver recommendations, and generate migration guides. Use agents to maintain contract compliance at scale.

Gotchas

  • Pact broker URL must be configured before running — agent will generate tests that silently skip verification without it
  • Consumer tests pass locally but fail in CI when provider states aren't set up — always verify both sides
  • Adding a required field to a response is a BREAKING change even though provider tests pass — consumer didn't expect it
  • Agent may generate contracts from API docs instead of actual consumer usage — contracts must reflect real consumer needs
  • GraphQL contract testing requires schema stitching awareness — fragments may reference types from other services

© proffesor-for-testing, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in assets/skills/contract-testing of proffesor-for-testing/agentic-qe.

  • SKILL.md
  • config.json
  • evals/contract-testing.yaml
  • references/agent-commands.md
  • references/provider-states.md
  • schemas/output.json
  • scripts/validate-config.json

Open the folder on GitHubat commit 829d030

Compare with similar skills

Contract Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Contract Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Contract Testing this skillproffesor-for-testing/agentic-qe494—~1.8kAutomated safety check: PassMIT
API Contract Testingsecondsky/claude-skills227—~977Automated safety check: PassMIT
API Patternsvibeeval/vibecosystem531—~3.9kAutomated safety check: PassMIT
Hybrid Cloud Test Gengetsentry/sentry45k—~2.6kAutomated safety check: PassCustom licence
Nodejs Backend Patternsever-works/ever-works15817 repos~4kAutomated safety check: PassAGPL-3.0
Backend DevelopmentMoizIbnYousaf/ai-agent-skills1.1k—~853Automated safety check: PassMIT

Similar skills

  • API Contract Testing

    secondsky/claude-skills

    Verifies API contracts between services using consumer-driven contracts, schema validation, and tools like Pact.

    227 GitHub stars~977 tokensUpdated 9 days ago
    Backend & APIsAuto-check passed
  • API Patterns

    vibeeval/vibecosystem

    API design, versioning, testing, schema validation, and contract testing patterns for REST and GraphQL APIs.

    531 GitHub stars~3.9k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Hybrid Cloud Test Gen

    getsentry/sentry

    Official

    Generate hybrid cloud tests for the Sentry codebase. An agent skill from getsentry/sentry.

    45k GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 17 repos~4k tokens
    Backend & APIsAuto-check passed
  • Backend Development

    MoizIbnYousaf/ai-agent-skills

    Backend API design, database architecture, microservices patterns, and test-driven development.

    1.1k GitHub stars~853 tokensUpdated 16 days ago
    Backend & APIsAuto-check passed
  • Architecture Design

    shawnpang/startup-founder-skills

    When the user needs to design or evaluate system architecture — service boundaries, data models, API contracts, infrastructure topology, database selection, or dependency analysis.

    337 GitHub stars~2.1k tokensUpdated 6 mo ago
    Backend & APIsAuto-check passed

More from proffesor-for-testing/agentic-qe

All 111 skills in this repo
  • Mutation Testing

    proffesor-for-testing/agentic-qe

    Test quality validation through mutation testing, assessing test suite effectiveness by introducing code mutations and measuring kill rate.

    494 GitHub stars~1.7k tokensUpdated 3 days ago
    Auto-check passed
  • Performance Testing

    proffesor-for-testing/agentic-qe

    Profiles application performance under load using k6, Artillery, or JMeter to measure latency, throughput, and error rates.

    494 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Code Review Quality

    proffesor-for-testing/agentic-qe

    Conduct context-driven code reviews focusing on quality, testability, and maintainability.

    494 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Security Testing

    proffesor-for-testing/agentic-qe

    Scans for security vulnerabilities including XSS, SQL injection, CSRF, and auth flaws using OWASP Top 10 methodology.

    494 GitHub stars~2.7k tokensUpdated 3 days ago
    Auto-check: notes
  • Database Testing

    proffesor-for-testing/agentic-qe

    Database schema validation, data integrity testing, migration testing, transaction isolation, and query performance.

    494 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Accessibility Testing

    proffesor-for-testing/agentic-qe

    WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification.

    494 GitHub stars~2k tokensUpdated 3 days ago
    Auto-check passed

Questions about Contract Testing

What does Contract Testing do?

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Contract Testing is an agent skill from proffesor-for-testing/agentic-qe. Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing.

When should I use Contract Testing?

Contract Testing fits situations like: testing API contracts; coordinating distributed teams.

How do I install Contract Testing in Claude Code?

Run `npx skills add proffesor-for-testing/agentic-qe --skill contract-testing -a claude-code`. Or copy the skill folder (assets/skills/contract-testing in proffesor-for-testing/agentic-qe) into .claude/skills/contract-testing in your project. Claude Code loads it when a task matches its description.

How do I install Contract Testing in Codex?

Run `npx skills add proffesor-for-testing/agentic-qe --skill contract-testing -a codex`. Or copy the skill folder (assets/skills/contract-testing in proffesor-for-testing/agentic-qe) into .agents/skills/contract-testing in your project. Codex loads it when a task matches its description.

Can I use Contract Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add proffesor-for-testing/agentic-qe --skill contract-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/contract-testing, .gemini/skills/contract-testing, .github/skills/contract-testing and .opencode/skills/contract-testing in your project.

What does Contract Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Contract Testing is instructions for the agent only. Our summary lists: Node.js.

Does Contract Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Contract Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Contract Testing use?

Contract Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Contract Testing use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Contract Testing?

Skills that share tags, products or a category with Contract Testing: API Contract Testing (secondsky/claude-skills, 227 stars), API Patterns (vibeeval/vibecosystem, 531 stars), Hybrid Cloud Test Gen (getsentry/sentry, 45k stars) and Nodejs Backend Patterns (ever-works/ever-works, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Contract Testing?

proffesor-for-testing (a GitHub user) maintains it in proffesor-for-testing/agentic-qe, which has 494 GitHub stars. The repository holds 111 skills in this directory. The repository was last updated on October 4, 2026.

Source: proffesor-for-testing/agentic-qe on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.