Skip to content
Back to skills

Contract Testing

ASecurity

Contract testing — consumer-driven contracts (Pact), provider verification, schema-based contract tests from OpenAPI/proto/AsyncAPI, broker and can-i-deploy checks, event contract tests. Use to prevent integration breakages between services (contract testing, Pact, consumer-driven contracts, provider verification).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgotestingapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill contract-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contract Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contract Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-contract-testing/badge)](https://www.skillsdirectory.com/skills/vectora-os-contract-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contract-testing
description: Contract testing — consumer-driven contracts (Pact), provider verification, schema-based contract tests from OpenAPI/proto/AsyncAPI, broker and can-i-deploy checks, event contract tests. Use to prevent integration breakages between services (contract testing, Pact, consumer-driven contracts, provider verification).
metadata:
  category: quality
---

# Contract testing

## Purpose

Catch breaking integration changes before deployment without full end-to-end environments.

**Use when:** services or clients integrate over APIs or events.

**Not for:** testing internal logic.

## Inputs

- Consumer expectations, provider specs.

## Outputs

- Contract tests and CI verification gates.

## Read first

- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "contract testing"` for prior decisions, patterns and anti-patterns.
- [Testing standard](../../../standards/testing.md)

## Steps

1. **Consumers.** Consumers write contracts for what they actually use.
   Done when contracts are minimal.
2. **Verify.** Providers verify all consumer contracts in CI.
   Done when verification is a gate.
3. **Deploy check.** Gate deployment on compatibility (can-i-deploy).
   Done when incompatible versions cannot deploy.
4. **Events.** Apply the same to message schemas.
   Done when event contracts verified.

## Best practices

- Contracts describe needs, not the whole API.
- Version contracts with the code.

## Common mistakes

- Over-specified contracts breaking on harmless changes.
- Not running provider verification.

## Example

Web client Pact for `GET /orders` verified by the orders service in CI; deploy blocked when a field was removed.

## Reusable prompt

```text
Apply the Contract testing skill (.agents/skills/contract-testing/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Set up consumer contracts and provider verification with a deployment gate for the integration.
Return: Contract tests and CI verification gates..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.