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.
npx agentmods add skills/j4flmao/agent-skills/contract-testingnpx skills add j4flmao/agent-skills --skill contract-testinggit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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.
[](https://agentmods.dev/skills/j4flmao/agent-skills/contract-testing)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/contract-testing"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/contract-testing.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00100 | $0.04324 |
| Opus 5 | $0.00050 | $0.02162 |
| Sonnet 5 | $0.00020 | $0.00865 |
| Haiku 4.5 | $0.00010 | $0.00432 |
Grade A, and why
backend-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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 541 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Contract Testing
Purpose
Use consumer-driven contract (CDC) testing with Pact to verify that provider services satisfy consumer expectations, replacing brittle end-to-end integration tests with fast, deterministic contract tests.
Agent Protocol
Trigger
Exact user phrases: "contract testing", "Pact", "consumer-driven contracts", "CDC", "provider verification", "pact test", "pactflow", "contract test", "consumer test", "provider test".
Input Context
- Service architecture: list of consumers and providers.
- Existing test framework (Jest, JUnit, pytest, etc.).
- Pact broker or PactFlow URL if available.
Output Artifact
Pact test code snippets or Pactfile. No file unless requested.
Response Format
Consumer: {service}
Provider: {service}
Interactions: {N}
State: {provider state}
Completion Criteria
- Consumer test written for each consumer-provider interaction.
- Provider verification test written for each provider.
- Pact files published to Pact broker.
- Provider verification runs in CI against the deployed provider.
- No hardcoded URLs or real data in Pact tests.
Max Response Length
6 lines per interaction. 20 lines for full test.
Architecture Decision Tree
Should I Use Contract Testing?
Do consumer and provider belong to different teams?
├── Yes → Strongly consider contract testing
└── No → Is the provider used by multiple consumers?
├── Yes → Contract testing recommended
└── No → Would an E2E test be too slow/brittle?
├── Yes → Contract testing may help
└── No → Simple unit/integration tests may suffice
Which Approach?
Can the consumer change the contract independently?
├── Yes → Consumer-Driven Contract (CDC) with Pact
└── No → Is the provider owned by the same team as the consumer?
├── Yes → Bi-Directional Contracts (Spring Cloud Contract or Pact)
└── No → Provider-Driven Contracts (OpenAPI + Specmatic)
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/cdc-workflow.md 4.7 KB
- references/contract-testing-advanced.md 8.2 KB
- references/contract-testing-ci.md 7.4 KB
- references/contract-testing-fundamentals.md 4.7 KB
- references/contract-testing-tools.md 5.2 KB
- references/contract-testing-workflow.md 7.1 KB
- references/pact-setup.md 4.2 KB
- references/provider-verification-deep.md 6.2 KB
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.
- 2d ago First seen · 541 lines · 100 tokens per session scan A 271bf7bfb89d
backend-contract-testing is a skill published in the GitHub repository j4flmao/agent-skills (20 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 4,324 once invoked, about $0.0005 per session on Opus 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-03.
Other skills, from other repositories
Contract Test Generator
Generate consumer-driven contract tests using Pact framework to verify API provider-consumer compatibility and prevent integration breaking changes.
Contract Testing with Pact
Consumer-driven contract testing skill using Pact, covering consumer tests, provider verification, Pact Broker integration, and CI/CD workflows.
api-testing-patterns
Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…