validating-api-contracts
About
This skill validates API contracts through Pact-based consumer-driven testing and OpenAPI specification validation. It helps ensure API providers meet consumer expectations and maintain backward compatibility by identifying breaking changes. Use it when generating contract tests, validating API responses, or checking compliance using terms like Pact, OpenAPI validation, or contract-test.
Documentation
Overview
This skill enables Claude to generate and validate API contracts, ensuring compatibility between API providers and consumers. It uses Pact for consumer-driven contract testing and OpenAPI validation for specification compliance.
How It Works
- Generating Contract Tests: Claude creates Pact consumer tests based on API usage, generating provider verification tests and building OpenAPI contract validators.
- Validating Contracts: The skill verifies if API responses match the defined contracts.
- Checking Compatibility: It checks for backward compatibility to identify breaking changes in the API.
When to Use This Skill
This skill activates when you need to:
- Generate contract tests for an API.
- Validate API responses against existing contracts.
- Identify breaking changes in an API.
Examples
Example 1: Generating Pact Contracts
User request: "Generate contract tests for my API using Pact."
The skill will:
- Analyze the API and generate Pact consumer contracts.
- Create provider verification tests based on the contracts.
Example 2: Validating an OpenAPI Specification
User request: "Validate my API against the OpenAPI specification."
The skill will:
- Validate the API against the provided OpenAPI specification.
- Report any discrepancies or violations of the specification.
Best Practices
- Clarity: Be specific when requesting contract generation or validation, providing relevant API details.
- Completeness: Ensure that your OpenAPI specifications are up-to-date for accurate validation.
- Context: Provide context about the consumer and provider roles when using Pact.
Integration
This skill can be integrated with other testing and deployment tools in the Claude Code ecosystem to automate contract verification as part of a CI/CD pipeline.
Quick Install
/plugin add https://github.com/jeremylongshore/claude-code-plugins-plus/tree/main/contract-test-validatorCopy and paste this command in Claude Code to install this skill
GitHub 仓库
Related Skills
sglang
MetaSGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.
llamaguard
OtherLlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.
evaluating-llms-harness
TestingThis Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.
langchain
MetaLangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.
