api-plugin/skills/api-tests/SKILL.md
API contract testing with Pact, OpenAPI validation, and Zod/AJV schemas. Use when setting up contract tests, validating OpenAPI compliance, or adding breaking-change CI checks.
npx skillsauth add laurigates/claude-plugins api-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Check and configure API contract testing infrastructure for validating API contracts, schemas, and consumer-provider agreements.
| Use this skill when... | Use another approach when... |
|------------------------|------------------------------|
| Setting up API contract testing (Pact, OpenAPI, schema) | Running existing API tests (use bun test or test runner directly) |
| Validating OpenAPI specification compliance | Editing OpenAPI spec content (use editor directly) |
| Adding breaking change detection to CI | General CI workflow setup (use /configure:workflows) |
| Checking API testing infrastructure status | Unit or integration test setup (use /configure:tests or /configure:integration-tests) |
| Configuring Pact consumer/provider workflows | Debugging specific API endpoint failures (use test runner with verbose output) |
find . -maxdepth 1 \( -name 'bun.lockb' -o -name 'bun.lock' -o -name 'package-lock.json' -o -name 'yarn.lock' \)find . -maxdepth 1 \( -name 'tsconfig.json' -o -name 'pyproject.toml' -o -name 'package.json' \)find . -maxdepth 1 \( -name package.json -o -name 'requirements*.txt' -o -name pyproject.toml \) -exec grep -l "pact-foundation/pact\|pact-python" {} +find . -maxdepth 2 \( -name 'openapi.yaml' -o -name 'openapi.yml' -o -name 'openapi.json' -o -name 'swagger.json' -o -name 'swagger.yaml' \)grep -l '"ajv"\|"zod"' package.jsongrep -l "swagger-parser\|@apidevtools" package.jsonfind . -maxdepth 1 -type d -name \'pacts\'find . -maxdepth 3 -type d -name 'contract'find . -maxdepth 4 \( -name '*.pact.*' -o -name '*.openapi.*' -o -name '*.contract.*' \)find .github/workflows -maxdepth 1 \( -name '*api*' -o -name '*contract*' -o -name '*pact*' \)Parse $ARGUMENTS for these flags:
| Flag | Description | Default |
|------|-------------|---------|
| --check-only | Report status without making changes | Off |
| --fix | Apply all fixes automatically without prompting | Off |
| --type <type> | Focus on specific type: pact, openapi, or schema | All types |
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 |
Execute this API testing compliance check:
Scan the project for existing API testing indicators:
| Indicator | Component | Check |
|-----------|-----------|-------|
| pact in dependencies | Pact contract testing | package.json or pyproject.toml |
| openapi.yaml or swagger.json | OpenAPI specification | Root or docs/ directory |
| @apidevtools/swagger-parser | OpenAPI validation | package.json devDependencies |
| ajv or zod in dependencies | Schema validation | package.json dependencies |
| pacts/ directory | Pact contracts | Project root |
If --type is specified, only check the relevant component.
Check completeness of each API testing component:
Contract Testing (Pact):
@pact-foundation/pact (JS/TS) or pact-python (Python) is installedtests/contract/consumer/tests/contract/provider/can-i-deploy CI gateOpenAPI Validation:
Schema Testing:
ajv or zod)Print a formatted compliance report:
API Testing Compliance Report
==============================
Project: [name]
API Type: [REST | GraphQL | gRPC]
Contract Testing (Pact):
Package: [INSTALLED | MISSING]
Consumer tests: [FOUND | NONE]
Provider tests: [FOUND | NONE]
Pact Broker: [CONFIGURED | OPTIONAL]
OpenAPI Validation:
OpenAPI spec: [EXISTS | MISSING]
Spec version: [CURRENT | OUTDATED]
Request validation: [CONFIGURED | MISSING]
Response validation: [CONFIGURED | MISSING]
Breaking change CI: [CONFIGURED | OPTIONAL]
Schema Testing:
JSON Schemas: [EXISTS | N/A]
Schema validator: [INSTALLED | MISSING]
Response validation: [CONFIGURED | MISSING]
Overall: [X issues found]
Recommendations: [list specific actions]
If --check-only is set, stop here.
If --fix is set or user confirms, apply fixes for missing components. Use the project language detected in Context to select TypeScript or Python templates.
For each missing component, create the appropriate files using templates from REFERENCE.md:
Create or update .github/workflows/api-tests.yml with jobs for:
Add test scripts to package.json. Use CI workflow template from REFERENCE.md.
Update .project-standards.yaml with API testing configuration:
components:
api_tests: "2025.1"
api_tests_contract: "[pact|none]"
api_tests_openapi: true
api_tests_schema: "[zod|ajv|none]"
api_tests_breaking_change_ci: true
Print a summary of all changes applied including:
bun run / npm run commands)| Context | Command |
|---------|---------|
| Quick status check | /configure:api-tests --check-only |
| Auto-fix all issues | /configure:api-tests --fix |
| Pact-only setup | /configure:api-tests --fix --type pact |
| OpenAPI-only setup | /configure:api-tests --fix --type openapi |
| Check for OpenAPI spec | find . -maxdepth 2 \( -name 'openapi.yaml' -o -name 'swagger.json' \) 2>/dev/null |
| Check Pact installed | grep -l "pact-foundation" package.json 2>/dev/null |
# Check compliance and offer fixes
/configure:api-tests
# Check only, no modifications
/configure:api-tests --check-only
# Auto-fix all issues
/configure:api-tests --fix
# Configure Pact only
/configure:api-tests --fix --type pact
# Configure OpenAPI validation only
/configure:api-tests --fix --type openapi
| Error | Resolution | |-------|------------| | No OpenAPI spec found | Offer to create template | | Pact version mismatch | Suggest upgrade path | | Schema validation fails | Report specific errors | | Pact Broker not configured | Provide setup instructions |
/configure:tests - Unit testing configuration/configure:integration-tests - Integration testing/configure:all - Run all compliance checkstools
Scaffold a new ComfyUI custom-node repo (pyproject, CI, release-please, vitest+pytest, JS extension skeleton) in the picker/gesture vein. Use when bootstrapping or init-ing a comfyui node pack.
tools
Orchestrate a ComfyUI node pack from idea to registry: scaffold, create + seed the repo, open the gitops adoption PR. Use when releasing or spinning up a new comfyui node pack.
testing
macOS EndpointSecurity/EDR high CPU & battery drain. Use when Kandji ESF / XProtect pegs a core; trace the exec storm via powermetrics + eslogger.
development
odiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.