pact-coverage

pact-coverage is a skill for Claude Code from pactflow/pactflow-agent-skills. It costs 220 tokens per session (4,613 once invoked), scanned A, original, MIT.

A test-coverage checker for Pact files, which describe consumer–provider API interactions, compared with an OpenAPI description of the provider API.

In plain words
What is it for?
Use it to find missing Pact tests and optionally identify untested status-code branches in consumer code. It reports gaps without changing files.
Why use it?
It shows which API operations, response codes, and required request or response fields used by the consumer have no matching Pact test. It filters out provider endpoints the consumer never calls, avoiding misleading gaps.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool.

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

Good fit Use it to find missing Pact tests and optionally identify untested status-code branches in consumer code. It reports gaps without changing files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pactflow/pactflow-agent-skills/pact-coverage
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.

Any agent
npx skills add pactflow/pactflow-agent-skills --skill pact-coverage
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 pact-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/pact-coverage/github.svg)](https://agentmods.dev/skills/pactflow/pactflow-agent-skills/pact-coverage)
Your own site
<a href="https://agentmods.dev/skills/pactflow/pactflow-agent-skills/pact-coverage"><img src="https://agentmods.dev/badge/skills/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/skills/pactflow/pactflow-agent-skills/pact-coverage"><img src="https://agentmods.dev/badge/skills/pactflow/pactflow-agent-skills/pact-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 220 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,613 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.00220 $0.04613
Opus 5.5 $0.00088 $0.01845
Sonnet 5.5 $0.00044 $0.00923
Haiku 4.5 $0.00022 $0.00461

Measured 11d ago against content hash 591c78627b7a, 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.

The scan reads SKILL.md. This mod also ships 10 executable files (scripts/async_coverage.py, scripts/build_filtered_oas.py, scripts/parse_pact_coverage.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/pact-coverage/SKILL.md · 380 lines

How it starts

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

Pact Coverage

Analyses Pact v2/v3/v4 interactions against an OpenAPI spec and reports gaps across four core dimensions: path/method, status codes, request body required fields, and response body required fields. An optional fifth dimension — consumer code status branch analysis — surfaces status codes the consumer handles in code but hasn't tested in any pact. Never modifies files.

When the spec is an AsyncAPI 3.x document the same skill measures Pact message pacts instead; see AsyncAPI mode.

Prerequisites: ripwire is required — as an MCP server for interactive use (see ripwire MCP setup above), or as a CLI binary for CI scripts (see Scripts (CI / advanced) below). Run command -v ripwire to check; see references/install-ripwire.md for install instructions.


What this measures

Pact coverage answers one question: do the consumer's pact files exercise everything the consumer actually uses from the provider?

The provider's OAS describes its full surface — but the consumer only calls a subset of it. Measuring coverage against the full OAS produces false gaps (unused provider endpoints appearing as uncovered). The correct denominator is the consumer-filtered provider OAS: the slice of the provider's OAS that the consumer actually calls.

Flow:

  1. ripwire scans the consumer codebase → discovers which provider paths/methods the consumer calls
  2. The provider OAS is filtered to only those routes (removing unused endpoints)
  3. Pact files are compared against the filtered OAS → gaps = operations/codes/fields the consumer calls but hasn't exercised in any pact interaction

ripwire MCP setup

The swagger-contract-testing:pact-coverage agent uses ripwire via MCP tools for adaptive route discovery. The ripwire MCP server must be connected before running coverage interactively.

Register in one command:

ripwire wrap claude   # prints the command to run
# → claude mcp add ripwire -- ripwire --mcp

Read the full file on GitHub · 380 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 · +43 lines · +47 tokens per session 591c78627b7a
  2. 25d ago First seen · 337 lines · 173 tokens per session scan A 84622c719983

Subscribe to this mod's changes

pact-coverage is a skill published in the GitHub repository pactflow/pactflow-agent-skills (7 stars, last pushed yesterday), licensed MIT. It adds 220 tokens to every session and 4,613 once invoked, about $0.0009 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 skills, from other repositories