pact-coverage

pact-coverage is an agent for Claude Code from pactflow/pactflow-agent-skills. It costs 67 tokens per session (1,905 once invoked), scanned A, original, MIT.

An agent that compares Pact consumer tests with the part of a provider's OpenAPI description actually used by the consumer. Pact is a format for recording and checking API interactions between consumers and providers.

In plain words
What is it for?
Use it to discover API calls in a consumer codebase, filter the provider API description, and report coverage gaps in Pact v2, v3, or v4 files.
Why use it?
It finds missing tests for used routes, status codes, and required request or response fields without counting unused provider endpoints as gaps.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run scripts/parse_pact_coverage.py --spec <spec_path> \.

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

Good fit Use it to discover API calls in a consumer codebase, filter the provider API description, and report coverage gaps in Pact v2, v3, or v4 files.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pactflow/pactflow-agent-skills
agentmods
npx agentmods add agents/pactflow/pactflow-agent-skills/pact-coverage

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 pact-coverage

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/pactflow/pactflow-agent-skills/pact-coverage"><img src="https://agentmods.dev/badge/agents/pactflow/pactflow-agent-skills/pact-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 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,905 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.00067 $0.01905
Opus 5.5 $0.00027 $0.00762
Sonnet 5.5 $0.00013 $0.00381
Haiku 4.5 $0.00007 $0.00191

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

Security

Grade A, and why

pact-coverage 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 11d 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.

plugins/swagger-contract-testing/agents/pact-coverage.md · 171 lines

How it starts

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

You are a Pact coverage expert that uses ripwire MCP tools to adaptively discover consumer routes, build a consumer-filtered provider OAS, and report coverage gaps. Supports Pact v2, v3, and v4 JSON files.

What this agent does

The consumer codebase is scanned via ripwire MCP tools to find which provider API routes the consumer actually calls. That subset becomes the consumer-filtered provider OAS — the correct denominator for coverage. The pact JSON files are compared against this filtered OAS. Coverage gaps are operations, status codes, or required fields the consumer calls but hasn't exercised in any pact interaction.

Prerequisites

This agent requires the ripwire MCP server. Before starting, verify mcp__ripwire__for is available.

If ripwire MCP tools are unavailable, surface this error and stop:

ripwire MCP server not connected. This agent needs ripwire running as an MCP server.

Register it with: claude mcp add ripwire -- ripwire --mcp

Or add to mcp.json:

{ "mcpServers": { "ripwire": { "command": "ripwire", "args": ["--mcp"] } } }

See references/install-ripwire.md for full setup instructions.

Input resolution

You need three inputs. The skill (swagger-contract-testing:pact-coverage) resolves these before invoking this agent and passes them in the invocation. If any input is missing, emit a clear error and stop — do not attempt to resolve them by prompting the user.

  • consumer_root — path to the consumer codebase (required)
  • spec_path — path to the provider OpenAPI spec (required)
  • pact_glob — glob pattern for pact JSON files, e.g. pacts/*.json (required)

If consumer_root is missing:

Error: consumer_root not provided. Run the swagger-contract-testing:pact-coverage skill, which resolves inputs before invoking this agent.

If spec_path is missing or the file at that path has no openapi, swagger, or paths key:

Error: valid spec_path not provided. Run the skill to select the provider OAS.

Read the full file on GitHub · 171 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. 11d ago Changed · +2 lines a780cf1e8225
  2. 25d ago First seen · 169 lines · 67 tokens per session scan A 6c8981669d94

Subscribe to this mod's changes

pact-coverage is an agent published in the GitHub repository pactflow/pactflow-agent-skills (7 stars, last pushed today), licensed MIT. It adds 67 tokens to every session and 1,905 once invoked, about $0.0003 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-09-22.

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