Contract Test Generator

Contract Test Generator is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 24 tokens per session (7,728 once invoked), scanned A, original, MIT.

A guide for writing consumer-driven contract tests with Pact, a tool that checks whether an API service meets the expectations of the software using it.

In plain words
What is it for?
Use it to create consumer tests, verify provider behavior, and check API compatibility in a delivery pipeline.
Why use it?
It catches breaking changes between API providers and consumers without requiring every service to run together.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: positional $N argument; mentions Codex; built for aider.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { UserApiClient } from '../../src/api-client';.

Good fit Use it to create consumer tests, verify provider behavior, and check API compatibility in a delivery pipeline.

Compare 6 skills 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/PramodDutta/qaskills
agentmods
npx agentmods add skills/pramoddutta/qaskills/contract-test-generator

Made for: Claude Code, Codex.

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 Contract Test Generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/contract-test-generator/github.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/contract-test-generator)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/contract-test-generator"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/contract-test-generator/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 Contract Test Generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/contract-test-generator"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/contract-test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 546
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 486
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 514
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
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.00024 $0.07728
Opus 5.5 $0.00010 $0.03091
Sonnet 5.5 $0.00005 $0.01546
Haiku 4.5 $0.00002 $0.00773

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

Security

Grade A, and why

Contract Test Generator scanned grade A with 2 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.

Makes network callslowCapability

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

await axios.post(

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { execSync } from 'child_process';
seed-skills/contract-test-generator/SKILL.md · 922 lines

How it starts

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

Contract Test Generator

Contract testing bridges the gap between unit tests and full integration tests by verifying that services can communicate correctly without requiring all services to be running simultaneously. Consumer-driven contract testing, pioneered by the Pact framework, inverts the traditional approach: consumers define what they expect from providers, and providers verify they can satisfy those expectations. This skill guides AI coding agents through generating robust contract tests that catch integration breaking changes before they reach production.

Core Principles

  1. Consumer-Driven Design: Consumers define the contract based on what they actually use, not what the provider offers. This ensures contracts are minimal, focused, and reflect real usage patterns rather than hypothetical API surfaces.

  2. Provider Verification Independence: Provider tests verify contracts independently without needing the consumer running. This decouples deployment schedules and enables teams to work autonomously while maintaining integration guarantees.

  3. Contract as Shared Artifact: The contract (pact file) serves as a living specification between consumer and provider. It is versioned, stored centrally, and referenced by both sides during their respective CI pipelines.

  4. Minimal Assertion Surface: Contracts should assert only what the consumer needs, not the full provider response. Testing for specific fields rather than entire response bodies prevents brittle contracts that break on harmless provider changes.

  5. Versioning Alignment with Deployability: Every contract must be associated with a specific consumer version and verified against a specific provider version. The combination of these versions determines whether a deployment is safe.

  6. Fail-Fast in CI: Contract verification failures must block deployments. The can-i-deploy tool provides a definitive answer about deployment safety based on the latest verification matrix.

  7. Incremental Adoption: Contract tests can be introduced for the most critical interactions first, then expanded. There is no requirement to cover every endpoint immediately; focus on high-risk integration points.

Read the full file on GitHub · 922 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 · 922 lines · 24 tokens per session scan A b5753d339812

Subscribe to this mod's changes

Contract Test Generator is a skill published in the GitHub repository PramodDutta/qaskills (238 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 7,728 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

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.

proffesor-for-testing/agentic-qe · 34 tokens

contract-testing

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Use when testing API contracts or coordinating distributed teams.

proffesor-for-testing/agentic-qe · 35 tokens

backend-contract-testing

Use this skill when the user says 'contract testing', 'Pact', 'consumer-driven contracts', 'CDC', 'provider verification', 'pact test', 'pactflow', 'contract test', 'consumer test', 'provider test'. This skill implements consumer-driven contract testing using Pact to ensure microservices communicate correctly without…

j4flmao/agent-skills · 100 tokens

contract-testing

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Use when testing API contracts or coordinating distributed teams.

summarybotng/summarybot-ng · 35 tokens

api-contract-tester

Implement consumer-driven contract testing with Pact to ensure API compatibility.

AtulPurohit/Antigravity-Awesome-Skills · 17 tokens

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.

summarybotng/summarybot-ng · 34 tokens