Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Contract Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-contract-testing)
---
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.
```