bdct-tester

bdct-tester is an agent for Claude Code from pactflow/pactflow-agent-skills. It costs 117 tokens per session (2,274 once invoked), scanned A, original, MIT.

An automated workflow for bi-directional contract testing, which checks that an API provider and its users agree on how the API behaves. It creates consumer tests and a provider OpenAPI contract, then publishes and verifies them through PactFlow.

In plain words
What is it for?
Use it to set up and complete contract testing across separate consumer and provider codebases, including PactFlow publication and verification.
Why use it?
It finds mismatches between an API and the software that uses it before deployment. When verification fails, it investigates and fixes the problems through repeated checks.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the swagger-contract-testing plugin — 6 skills, 6 agents, 2 hooks, 1 MCP server shipped together

Good fit Use it to set up and complete contract testing across separate consumer and provider codebases, including PactFlow publication and verification.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pactflow/pactflow-agent-skills/bdct-tester
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/pactflow/pactflow-agent-skills

Made for: Claude Code.

Or install swagger-contract-testing, the plugin that ships this one along with the rest of its 6 skills, 6 agents, 2 hooks, 1 MCP server.

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 bdct-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/pactflow/pactflow-agent-skills/bdct-tester/github.svg)](https://agentmods.dev/agents/pactflow/pactflow-agent-skills/bdct-tester)
Your own site
<a href="https://agentmods.dev/agents/pactflow/pactflow-agent-skills/bdct-tester"><img src="https://agentmods.dev/badge/agents/pactflow/pactflow-agent-skills/bdct-tester/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 bdct-tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/pactflow/pactflow-agent-skills/bdct-tester"><img src="https://agentmods.dev/badge/agents/pactflow/pactflow-agent-skills/bdct-tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,274 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00117 $0.02274
Opus 5.5 $0.00047 $0.00910
Sonnet 5.5 $0.00023 $0.00455
Haiku 4.5 $0.00012 $0.00227

Measured 1mo ago against content hash eed3547fe01a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

selfVerificationResults = { success, verifier = "curl", verifierVersion = "8.0", content (base64 of results text), contentType = "text/plain", format = "text" }
plugins/swagger-contract-testing/agents/bdct-tester.md · 213 lines

How it starts

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

You are a Bi-Directional Contract Testing (BDCT) automation expert. Your job is to implement a complete BDCT flow — consumer tests, provider contract, publication, and verification — and loop until PactFlow's cross-contract verification passes.

MAX_ITERATIONS

Run at most 5 fix-and-republish loops. If BDCT still fails after 5 iterations, stop and report the remaining failures with a diagnosis.


Workflow

Phase 1 — Discovery

  1. Locate the provider and consumer codebases

    • Ask the user where the provider codebase lives and where the consumer codebase lives — they may be in separate folders or separate repositories
    • Do not assume both are under the current working directory
  2. Understand the API surface (provider codebase)

    • Working inside the provider codebase, look for an existing OpenAPI spec (openapi.yaml, openapi.json, swagger.yaml, api/*.yaml, etc.)
    • If no spec is found, stop immediately. BDCT requires a provider OpenAPI spec — without one there is nothing to publish or verify against. Inform the user that they need to create an OpenAPI spec first, then exit.
    • Note every status code the provider can return per endpoint
  3. Understand the consumer

    • Working inside the consumer codebase, read the consumer source code (API client layer, HTTP calls) to understand which endpoints and fields it actually uses
    • If there is no consumer yet, generate tests covering the full API surface
  4. Determine pacticipant names

    • Inspect the consumer and provider codebases for any existing Pact configuration (e.g. consumer/provider fields in test setup, pact.json, CI scripts, or pact-broker CLI invocations) to discover the names already in use
    • If no names are found in the code, ask the user for the consumer name and provider name before proceeding
  5. Check PactFlow state

    • Call contract-testing_list_pacticipants using the names discovered above to see if these participants already exist
    • If consumer pacts already exist, fetch them with contract-testing_get_pacts_for_verification
    • Use the git SHA as the version and the git branch name as the branch — do not default these values. Use --auto-detect-version-properties (or -r) to let the CLI detect them automatically from git

Read the full file on GitHub · 213 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 · 213 lines · 117 tokens per session scan A eed3547fe01a

Subscribe to this mod's changes

bdct-tester is an agent published in the GitHub repository pactflow/pactflow-agent-skills (7 stars, last pushed today), licensed MIT. It adds 117 tokens to every session and 2,274 once invoked, about $0.0005 per session on Opus 5.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-08-31.

Related

Other agents, from other repositories

mock

Designs mock servers and consumer-driven contract tests (Pact/Prism/WireMock/msw) so teams can build without depending on the live API. Use when parallelizing frontend and backend development or establishing contract testing in CI. Trigger with "set up API mocks", "design contract tests".

jeremylongshore/tons-of-skills-marketplace · 62 tokens

coverage-analyst

Test coverage analysis expert. Comprehensively evaluates Unit / Integration / E2E three-layer test coverage, identifies gaps, and provides remediation suggestions.

sd0xdev/sd0x-harness · 34 tokens

nestjs-testing-expert

NestJS testing specialist that provides unit tests, integration tests, end-to-end tests, test database setup, mocking strategies, and testing best practices. Use proactively when writing tests for NestJS applications, setting up testing infrastructure, creating test fixtures, mocking dependencies, or implementing…

giuseppe-trisciuoglio/developer-kit · 65 tokens

nestjs-unit-testing-expert

Expert in unit testing with NestJS, Jest, and testing utilities that provides comprehensive test strategies, test architecture, and testing best practices for TypeScript applications. Use PROACTIVELY for writing unit tests, improving test coverage, or reviewing testing strategies in NestJS applications.

giuseppe-trisciuoglio/developer-kit · 60 tokens

verify-app

Verification expert. Proactively runs tests after code changes, analyzes failures, and suggests fixes.

sd0xdev/sd0x-harness · 21 tokens

nestjs-backend-development-expert

Expert NestJS backend developer that provides feature implementation, architecture, and best practices. Use PROACTIVELY for NestJS development tasks, REST API implementation, and backend architecture decisions.

giuseppe-trisciuoglio/developer-kit · 43 tokens