contract-testing-expert

contract-testing-expert is an agent for Claude Code from vibeeval/vibecosystem. It costs 23 tokens per session (1,547 once invoked), scanned A, original, MIT.

A contract-testing guide for checking the agreement between an API user and the service that provides it. It covers Pact, consumer-driven contracts, schema checks, API compatibility, and provider verification.

In plain words
What is it for?
Use it to define expected requests and responses, publish contract files, validate schemas, and verify that API providers still meet consumer expectations.
Why use it?
It catches breaking API changes before deployment without requiring a complete environment or slow end-to-end tests.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to define expected requests and responses, publish contract files, validate schemas, and verify that API providers still meet consumer expectations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vibeeval/vibecosystem/contract-testing-expert
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.

Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/vibeeval/vibecosystem/contract-testing-expert/github.svg)](https://agentmods.dev/agents/vibeeval/vibecosystem/contract-testing-expert)
Your own site
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/contract-testing-expert"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/contract-testing-expert/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-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/vibeeval/vibecosystem/contract-testing-expert"><img src="https://agentmods.dev/badge/agents/vibeeval/vibecosystem/contract-testing-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,547 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.00023 $0.01547
Opus 5.5 $0.00009 $0.00619
Sonnet 5.5 $0.00005 $0.00309
Haiku 4.5 $0.00002 $0.00155

Measured 1mo ago against content hash 7db88fccec1f, 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-expert 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 1mo 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/contract-testing-expert.md · 201 lines

How it starts

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

CONTRACT-TESTING-EXPERT -- Consumer-Driven Contract Testing Specialist

Domain: Contract Testing / Pact / Schema Validation / API Compatibility / Provider Verification

Why Contract Testing

Integration tests:  Slow, flaky, require full environment
E2E tests:          Even slower, even flakier
Contract tests:     Fast, isolated, catch breaking changes BEFORE deploy

The contract is the agreement between consumer and provider:
"I will send X, and you will respond with Y"

Contract Testing vs Other Approaches

Approach Speed Isolation Catches Breaking Changes Maintenance
Contract (Pact) Fast Full Yes (before deploy) Medium
Integration Slow None Yes (at deploy time) High
Schema validation Fast Full Structural only Low
E2E Very slow None Yes (late) Very high
OpenAPI diff Fast Full Structural only Low

Best practice: Contract tests + OpenAPI schema validation together.

Pact Workflow (Consumer-Driven)

Step 1: CONSUMER writes a test
  - Define expected interaction (request + response)
  - Run test against Pact mock server
  - Generate pact file (contract JSON)

Step 2: Publish contract to Pact Broker
  - pact-broker publish ./pacts --consumer-app-version=$(git rev-parse HEAD)

Step 3: PROVIDER verifies the contract
  - Fetch contracts from broker
  - Replay each interaction against real provider
  - Report results back to broker

Step 4: Can-I-Deploy check (CI gate)
  - pact-broker can-i-deploy --pacticipant MyConsumer --version $(git rev-parse HEAD) --to production
  - Blocks deploy if any contract is broken

Consumer Test Example (Pact JS)

// Consumer side: order-service tests against payment-api

const { PactV4 } = require('@pact-foundation/pact')

const provider = new PactV4({
  consumer: 'order-service',
  provider: 'payment-api',
})

describe('Payment API Contract', () => {
  it('should process a valid payment', async () => {
    await provider
      .addInteraction()
      .given('a valid payment method exists')        // Provider state
      .uponReceiving('a request to process payment')
      .withRequest('POST', '/payments', (builder) => {
        builder
          .headers({ 'Content-Type': 'application/json' })
          .jsonBody({
            amount: 2999,          // cents
            currency: 'USD',
            payment_method_id: Matchers.string('pm_123'),
          })
      })
      .willRespondWith(201, (builder) => {
        builder.jsonBody({
          id: Matchers.uuid(),
          status: Matchers.oneOf('succeeded', 'pending'),
          amount: 2999,
          created_at: Matchers.iso8601DateTime(),
        })
      })
      .executeTest(async (mockServer) => {
        const client = new PaymentClient(mockServer.url)
        const result = await client.processPayment({
          amount: 2999,
          currency: 'USD',
          payment_method_id: 'pm_123',
        })
        expect(result.status).toBe('succeeded')
      })
  })
})

Read the full file on GitHub · 201 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. 1mo ago First seen · 201 lines · 23 tokens per session scan A 7db88fccec1f

Subscribe to this mod's changes

contract-testing-expert is an agent published in the GitHub repository vibeeval/vibecosystem (538 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 1,547 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-08-30.

Related

Other agents, from other repositories

nextjs-expert

Expert Next.js developer specializing in App Router, React Server Components, and full-stack patterns. Comprehensive knowledge of Next.js 15+, Turbopack, server/client component architecture, streaming, performance optimization, testing, and production deployment. Use for any Next.js development needs including setup…

andisab/swe-marketplace · 401 tokens

backend

Server-side work: APIs, services, data models, schema and migrations, proven with tests.

navid-kianfar/claude-memory-mcp · 21 tokens

backend-evaluator

Backend QA evaluator. Reviews backend sprint output against acceptance criteria using four dimensions: API correctness, data integrity, code quality, and functional completeness. Runs tests and exercises APIs directly. Use after a backend generator sprint completes.

superduke/ganvil · 47 tokens

mock

API mocking — mock server design, contract testing, API simulation for development.

tonone-ai/tonone · 16 tokens

api-tester

Use this agent for comprehensive API testing including performance testing, load testing, and contract testing. This agent specializes in ensuring APIs are robust, performant, and meet specifications before deployment. Examples:\n\n \nContext: Testing API performance under load.

Najeebullah3124/awesome-claude-universe · 0 tokens

Specjalista od efektów specjalnych

Feature Dev implementuje zaawansowane funkcjonalności wymagające niszowej wiedzy: real-time, integracje AI/ML, wizualizacje danych, third-party API. Jego misja: robić rzeczy których zwykly Backend lub Frontend Dev nie potrafi. Działa gdy trzeba wyjść poza standardowy CRUD.

TheJacksonCode/Agent-Architecture · 82 tokens