configure-api-tests
БесплатноБез исполняемых скриптовНе проверенAPI contract testing: Pact, OpenAPI validation, JSON Schema/Zod. Use when adding consumer/provider contract tests or detecting breaking API changes in CI.
от laurigates★ 61 звезда на GitHubОб этом скилле
/configure:api-tests
Check and configure API contract testing infrastructure for validating API contracts, schemas, and consumer-provider agreements.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Setting up Pact consumer/provider contract tests | Writing individual unit tests (/configure:tests) |
| Configuring OpenAPI request/response validation | Validating a single API endpoint manually |
| Adding JSON Schema or Zod schema testing | Checking general test coverage (/configure:coverage) |
| Detecting breaking API changes in CI | Reviewing API design decisions (code-review agent) |
| Auditing API testing compliance across a project | Configuring general CI/CD workflows (/configure:workflows) |
Context
- Project root: !
pwd - Package files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' \) - Pact deps: !
find . -maxdepth 1 \( -name package.json -o -name pyproject.toml \) -exec grep -l 'pact' {} + - OpenAPI spec: !
find . -maxdepth 1 \( -name 'openapi.yaml' -o -name 'openapi.json' -o -name 'swagger.json' \) - Pact dir: !
find . -maxdepth 1 -type d -name 'pacts' - Contract tests: !
find . -path '*/tests/*' -maxdepth 3 -type d -name 'contract' - Project standards: !
find . -maxdepth 1 -name '.project-standards.yaml'
Parameters
Parse from command arguments:
--check-only: Report compliance status without modifications (CI/CD mode)--fix: Apply fixes automatically without prompting--type <pact|openapi|schema>: Focus on specific type
API Testing Types:
| Type | Use Case |
|---|---|
| Pact | Microservices, multiple consumers, breaking change detection |
| OpenAPI | API-first development, documentation-driven testing |
| Schema | Simple validation, GraphQL APIs, single service |
Execution
Execute this API testing compliance check:
Step 1: Detect existing API testing infrastructure
Check for these indicators:
| Indicator | Component | Status |
|---|---|---|
pact in dependencies |
Pact contract testing | Installed |
openapi.yaml or swagger.json |
OpenAPI specification | Present |
@apidevtools/swagger-parser |
OpenAPI validation | Configured |
ajv in dependencies |
JSON Schema validation | Configured |
pacts/ directory |
Pact contracts | Present |
Step 2: Analyze current state
For each detected component, check completeness:
Contract Testing (Pact):
-
@pact-foundation/pactinstalled (JS) orpact-python(Python) - Consumer tests defined
- Provider verification configured
- Pact Broker or PactFlow configured (optional)
- CI/CD pipeline integration
OpenAPI Validation:
- OpenAPI specification file exists
- Request validation middleware configured
- Response validation in tests
- Schema auto-generation configured
- Breaking change detection
Schema Testing:
- JSON Schema definitions exist
-
ajvor similar validator installed - Response validation helpers
- Schema versioning strategy
Step 3: Generate compliance report
Print a formatted compliance report:
API Testing Compliance Report
==============================
Project: [name]
API Type: [REST | GraphQL | gRPC]
Contract Testing (Pact):
@pact-foundation/pact package.json [INSTALLED | MISSING]
Consumer tests tests/contract/consumer/ [FOUND | NONE]
Provider tests tests/contract/provider/ [FOUND | NONE]
Pact Broker CI configuration [CONFIGURED | OPTIONAL]
can-i-deploy CI gate [CONFIGURED | OPTIONAL]
OpenAPI Validation:
OpenAPI spec openapi.yaml [EXISTS | MISSING]
Spec version OpenAPI 3.1 [CURRENT | OUTDATED]
Request validation middleware [CONFIGURED | MISSING]
Response validation test helpers [CONFIGURED | MISSING]
Breaking change CI oasdiff [CONFIGURED | OPTIONAL]
Schema Testing:
JSON Schemas schemas/ [EXISTS | N/A]
Schema validator ajv/zod [INSTALLED | MISSING]
Response validation test helpers [CONFIGURED | MISSING]
Overall: [X issues found]
Recommendations:
- Add Pact consumer tests for service dependencies
- Configure OpenAPI response validation in tests
- Add breaking change detection to CI
If --check-only, stop here.
Step 4: Configure API testing (if --fix or user confirms)
Apply fixes based on detected project type. Use templates from REFERENCE.md for:
- Pact Contract Testing - Install dependencies and create consumer/provider test files
- OpenAPI Validation - Install validator and create test helpers
- Schema Testing with Zod - Install Zod and create schema definitions
- **Breaking C
Установить configure-api-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
GlobGrepReadWriteEditBash(find *)Bash(bun add *)Bash(uv add *)AskUserQuestionTodoWriteВложенные файлы
FAQ
Что делает скилл configure-api-tests?
API contract testing: Pact, OpenAPI validation, JSON Schema/Zod. Use when adding consumer/provider contract tests or detecting breaking API changes in CI.
Как установить скилл configure-api-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл configure-api-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic