pact-coverage

pact-coverage is an agent for Claude Code from pactflow/pactflow-agent-skills. It costs 103 tokens per session (2,159 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; built for aider.

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 103 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,159 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.00103 $0.02159
Opus 5.5 $0.00041 $0.00864
Sonnet 5.5 $0.00021 $0.00432
Haiku 4.5 $0.00010 $0.00216

Measured 1mo ago against content hash 1029a8f41b99, 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 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.

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

How it starts

The opening of the file, as written. The whole thing — 176 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 whichever code-intelligence tool is available 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 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.

Code-intelligence tool selection

The agent is tool-agnostic. It needs four generic capabilities, which any knowledge-graph / repo-map tool provides in some form:

Capability ripwire Other tools (examples) Fallback
Task search — rank code relevant to a natural-language query mcp__ripwire__for graph/semantic query tools (codebase-memory-mcp, repowise, graphify query, Aider repo-map) Grep / Glob
Symbol lookup — find a function/type by name mcp__ripwire__find_symbol symbol/node search Grep
Body fetch — read a symbol's source mcp__ripwire__fetch_body node/snippet retrieval Read
Callers — who references a symbol mcp__ripwire__find_referencing_symbols call-graph / neighbours queries Grep

Selection order:

  1. Inspect the tools available in this session. Prefer ripwire (mcp__ripwire__*) when present; otherwise use any other connected code-graph MCP server whose tools cover the capabilities above, or an existing graph output in consumer_root (e.g. graphify-out/).
  2. If no graph tool is available, continue with Grep/Glob/Read — do not stop. State in the report which tool was used and that routes came from text search (lower confidence).
  3. Treat tool output as hints: verify each route by reading the call site before including it.

Read the full file on GitHub · 176 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 · +5 lines · +36 tokens per session 1029a8f41b99
  2. 1mo ago Changed · +2 lines a780cf1e8225
  3. 2mo 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 103 tokens to every session and 2,159 once invoked, about $0.0004 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

pact-coverage compared with agents from other repositories

pact-coverage next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pact-coveragepactflow/pactflow-agent-skillsAgent7todayMITA103Claude Code
webapi-integrationmicrosoft/power-platform-skillsAgent1.2ktodayMITA182Claude Code
otp-advisoroliver-kriska/claude-elixir-phoenixAgent579yesterdayMITA35Claude Code
contract-neutral-reviewersd0xdev/sd0x-harnessAgent1966d agoMITA42Claude Code
schematonone-ai/tononeAgent85yesterdayMITA20Claude Code
backendrestarter/lets-workflowAgent17todayMITA39Claude Code
explore-agentSofttor/nestjs-hexagonalAgent516d agoMITA105Claude Code