Skip to content
Agentmart
Submit a tool

api-contract-testing

Verify API contracts between services to ensure compatibility and prevent breaking changes.

Skill by Mr-Wolv

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mr-wolv-api-contract-testing

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Verify API contracts between services to ensure compatibility and prevent breaking changes. Use for contract testing, Pact, API contract validation, schema validation, and consumer-driven contracts.

Use cases: documents, backend, testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/api-contract-testing

What's inside

Skill name
api-contract-testing
Description
Verify API contracts between services to ensure compatibility and prevent breaking changes. Use for contract testing, Pact, API contract validation, schema validation, and consumer-driven contracts.
License
MIT
Instructions
96 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (9)

  • SKILL.md
  • contract-testing-with-postman.md · references/
  • json-schema-validation.md · references/
  • openapi-schema-validation.md · references/
  • pact-broker-integration.md · references/
  • pact-for-consumer-driven-contracts.md · references/
  • rest-assured-for-java.md · references/
  • scaffold-tests.sh · scripts/
  • test-template.js · templates/

SKILL.md (first lines)

# API Contract Testing

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Contract testing verifies that APIs honor their contracts between consumers and providers. It ensures that service changes don't break dependent consumers without requiring full integration tests. Contract tests validate request/response formats, data types, and API behavior independently.

## When to Use

- Testing microservices communication
- Preventing breaking API changes
- Validating API versioning
- Testing consumer-provider contracts
- Ensuring backward compatibility
- Validating OpenAPI/Swagger specifications
- Testing third-party API integrations
- Catching contract violations in CI

## Quick Start

Minimal working example:

```typescript
// tests/pact/user-service.pact.test.ts
import { PactV3, MatchersV3 } from "@pact-foundation/pact";
import { UserService } from "../../src/services/UserService";

const { like, eachLike, iso8601DateTimeWithMillis } = MatchersV3;

const provider = new PactV3({
  consumer: "OrderService",
  provider: "UserService",
  port: 1234,
  dir: "./pacts",
});

describe("User Service Contract", () => {
  const userService = new UserService("http://localhost:1234");

  describe("GET /users/:id", () => {
    test("returns user when found", async () => {
      await provider
        .given("user with ID 123 exists")
        .uponReceiving("a request for user 123")
        .withRequest({
          method: "GET",
          path: "/users/123",
          headers: {
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Pact for Consumer-Driven Contracts](references/pact-for-consumer-driven-contracts.md) | Pact for Consumer-Driven Contracts |
| [OpenAPI Schema Validation](references/openapi-schema-validation.md) | OpenAPI Schema Validation |
| [JSON Schema Validation](references/json-schema-validation.md) | JSON Schema Validation |
| [REST Assured for Java](references/rest-assured-for-java.md) | REST Assured for Java |
| [Contract Testing with Postman](references/contract-testing-with-postman.md) | Contract Testing with Postman |
| [Pact Broker Integration](references/pact-broker-integration.md) | Pact Broker Integration |

## Best Practices

### ✅ DO

- Test contracts from consumer perspective
- Use matchers for flexible matching
- Validate schema structure, not specific values
- Version your contracts
- Test error responses
- Use Pact broker for contract sharing
- Run contract tests in CI
- Test backward compatibility

### ❌ DON'T

- Test business logic in contract tests
- Hard-code specific values in contracts
- Skip error scenarios
- Test UI in contract tests
- Ignore contract versioning
- Deploy without contract verification
- Test implementation details
- Mock contract tests

From Mr-Wolv/Skill_Playground_Bakr101_2026, MIT.

More from Mr-Wolv/Skill_Playground_Bakr101_2026

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 7, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Mr-Wolv

Cite this page

api-contract-testing skill. Agent Mart. https://agentmart.dev/skills/mr-wolv-api-contract-testing (last updated 2026-10-24)