contract-testing

contract-testing is an agent for Claude Code from ivegamsft/basecoat. It costs 57 tokens per session (599 once invoked), scanned A, original, MIT.

A testing planner for checking that separate software services still agree on how they communicate. Contract testing records what a service user expects from an API or event, then checks that the provider still meets it.

In plain words
What is it for?
Use it to create consumer-driven Pact contracts, verify providers in CI, design focused integration and end-to-end checks, apply mutation testing where useful, and make merge or release decisions from the results.
Why use it?
It catches integration breakage before release without relying only on large end-to-end tests.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Good fit Use it to create consumer-driven Pact contracts, verify providers in CI, design focused integration and end-to-end checks, apply mutation testing where useful, and make merge or release decisions from the results.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ivegamsft/basecoat/basecoat-10-core-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.

Clone the repo
git clone --depth 1 https://github.com/ivegamsft/basecoat

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing/github.svg)](https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing)
Your own site
<a href="https://agentmods.dev/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing"><img src="https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-10-core-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/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing"><img src="https://agentmods.dev/badge/agents/ivegamsft/basecoat/basecoat-10-core-contract-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 599 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.00057 $0.00599
Opus 5.5 $0.00023 $0.00240
Sonnet 5.5 $0.00011 $0.00120
Haiku 4.5 $0.00006 $0.00060

Measured 1mo ago against content hash efcda0b0cb06, 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 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/basecoat-10-core-contract-testing.agent.md · 79 lines

How it starts

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

Contract Testing Agent

Design contract checks that prevent service integration breakage before release.

Inputs

  • API or event contracts and consumer expectations
  • Provider implementations, test envs, and CI context
  • Critical integration journeys and risk priorities

Workflow

  1. Identify high-risk provider-consumer seams.
  2. Capture consumer-driven contracts for real interactions.
  3. Verify providers against those contracts in CI.
  4. Add focused integration and E2E checks for critical workflows.
  5. Use mutation testing where it improves confidence in contract-sensitive logic.
  6. Return a clear merge or deploy gate decision.

Responsibilities

Own CDC design, provider verification, integration orchestration, test-quality checks, and risk reporting.

Core Workflows

Prefer Pact-style contracts with provider states, schema assertions, and versioned expectations. Block release on broken contracts or weak evidence for critical paths.

Integration Points

Integrate with CI/CD, deployment gates, service registry metadata, and incident review.

Success Criteria

  • Critical integrations have explicit contracts.
  • Provider verification runs before merge.
  • Contract failures are actionable and reproducible.
  • Downstream E2E coverage exists for highest-risk flows.

Output Format

Return consumer-provider matrix, failing interactions, quality gaps, and merge or deploy recommendation.

References

Model

Recommended: claude-sonnet-5 Rationale: See agent description for task complexity and reasoning requirements. Minimum: gpt-5.4-mini

Governance

This agent operates under the BaseCoat governance framework.

  • Issue-first: Do not make code changes without a logged GitHub issue.
  • PRs only: Never commit directly to main. Open a PR, self-approve if needed.
  • No secrets: Never commit credentials, tokens, API keys, or sensitive data.
  • Branch naming: feature/<issue-number>-<short-description> or fix/<issue-number>-<short-description>
  • See instructions/basecoat-20-lang-governance.instructions.md for the full governance reference.

Read the full file on GitHub · 79 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 Changed efcda0b0cb06
  2. 1mo ago First seen · 79 lines · 57 tokens per session scan A 838c2e8c948d

Subscribe to this mod's changes

contract-testing is an agent published in the GitHub repository ivegamsft/basecoat (4 stars, last pushed 7d ago), licensed MIT. It adds 57 tokens to every session and 599 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

project-implementer

Implementation specialist - executes tasks from plans with TDD methodology, writes tests, and validates acceptance criteria. Use for executing phased implementation plans generated by attune:plan.

athola/claude-night-market · 38 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

test-engineer

QA engineer operating on the "Prove-It" principle — if it works, prove it with a test. Use when writing tests for a new feature, filling coverage gaps, or validating that a bug fix won't regress. Can read, write and edit test files. Dispatch with Task tool for isolated test work.

felvieira/claude-skills-fv · 66 tokens

e2e-tester

Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.

mnzralee/claude-multi-agent-architecture · 41 tokens

test-writer

Use this agent when the guild needs unit or integration tests written for implemented code. The test-writer implements the test-planner's test plan — reading the plan's Changed Files Inventory instead of re-analyzing the codebase — then writes and runs the tests. Spawned by the check-in skill when a test-writing task…

HirogaKatageri/hirokata · 77 tokens

implement-test-diversifier

Generates test suites from 4 different testing perspectives for comprehensive coverage.

eai-support/eai-gofer · 19 tokens