Back to list
chaserbreitenbach

api-contract-validator

by chaserbreitenbach

Custom skills and agents framework for Claude Code - testing, tooling, and workflow automation

0🍴 0📅 Jan 12, 2026

SKILL.md


name: api-contract-validator description: | Validates API contracts for correctness, compatibility, and compliance. Tests REST APIs against OpenAPI/Swagger specifications. Detects breaking changes between versions, validates runtime responses against schemas, and ensures backward compatibility before deployment. license: MIT allowed-tools:

  • Bash
  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • WebFetch compatibility: claude-code: ">=1.0.0" metadata: version: "1.0.0" author: "QuantQuiver AI R&D" category: "testing" tags:
    • api-testing
    • openapi
    • contract-testing
    • breaking-changes

API Contract Validator

Purpose

Validates API contracts for correctness, compatibility, and compliance. Tests REST APIs against OpenAPI/Swagger specifications. Detects breaking changes between versions and validates runtime responses against schemas.

Triggers

Use this skill when:

  • "validate API contract"
  • "test API endpoints"
  • "check for breaking changes"
  • "API compatibility test"
  • "contract testing"
  • "verify OpenAPI spec"

When to Use

  • New API version deployment
  • Consumer complaints about changes
  • Pre-release validation
  • Multi-service integration testing
  • Third-party API consumption validation

When NOT to Use

  • Unit testing internal functions (use unit-test-generator)
  • Load testing (use performance-benchmark)
  • Security testing (use security-test-suite)
  • Data quality validation (use data-validation)

Core Instructions

Validation Categories

CategoryDescriptionSeverity
Schema ComplianceResponse matches OpenAPI schemaCritical
Status CodesCorrect codes for scenariosCritical
Breaking ChangesBackward incompatible changesCritical
DeprecationsDeprecated fields/endpointsWarning
HeadersRequired headers presentMedium
Error FormatError responses follow standardLow

Breaking Change Detection

Change TypeSeverityExample
Removed endpointCriticalDELETE /api/v1/users removed
Removed fieldCriticaluser.legacy_id no longer returned
Type changeCriticalid changed from string to integer
Added required paramCriticalNew required tenant_id parameter
Changed authenticationCriticalAPI key to OAuth2
Removed enum valueHighStatus no longer accepts "pending"

Validation Procedure

  1. Specification Analysis Phase

    • Load OpenAPI/Swagger specification
    • Validate spec structure and completeness
    • Identify all endpoints and schemas
    • Parse security definitions
  2. Breaking Change Detection Phase

    • Compare current spec to previous version
    • Identify removed endpoints/methods
    • Detect schema changes (fields, types)
    • Flag new required parameters
  3. Runtime Validation Phase (if enabled)

    • Make HTTP requests to live API
    • Validate response status codes
    • Check response against schema
    • Measure response times

Templates

Validation Report

# API Contract Validation Report

**Generated:** {timestamp}
**Specification:** {spec_path}

## Summary

| Metric | Value |
| ------ | ----- |
| Total Endpoints | {count} |
| Passed | {passed} |
| Failed | {failed} |
| Breaking Changes | {breaking_count} |

## Breaking Changes

### {endpoint_path}

**Type:** {change_type}
**Description:** {description}
**Migration:** {migration_guide}

## Endpoint Tests

| Method | Path | Status | Response Time |
| ------ | ---- | ------ | ------------- |
| {method} | {path} | {status_icon} | {time}ms |

Example

Input: Compare two OpenAPI specs for breaking changes

Output:

## Breaking Changes

### /api/users/{id}

**Type:** removed_field
**Description:** Field 'legacy_id' was removed from response
**Migration:** Update consumers to use 'id' field instead

### /api/orders

**Type:** added_required
**Description:** Parameter 'tenant_id' became required
**Migration:** All consumers must now provide tenant_id header

Validation Checklist

  • OpenAPI specification is valid and complete
  • All endpoints have documented responses
  • Breaking changes have migration guidance
  • Runtime tests cover all documented endpoints
  • Error responses follow standard format
  • Authentication methods are properly tested

  • unit-test-generator - For internal function testing
  • security-test-suite - For API security testing
  • performance-benchmark - For API load testing

Score

Total Score

45/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon