api-tests
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.
What this skill does
# /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 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) |
## Context
- Lock files: !`find . -maxdepth 1 \( -name 'bun.lockb' -o -name 'bun.lock' -o -name 'package-lock.json' -o -name 'yarn.lock' \)`
- Project files: !`find . -maxdepth 1 \( -name 'tsconfig.json' -o -name 'pyproject.toml' -o -name 'package.json' \)`
- Pact installed: !`find . -maxdepth 1 \( -name package.json -o -name 'requirements*.txt' -o -name pyproject.toml \) -exec grep -l "pact-foundation/pact\|pact-python" {} +`
- OpenAPI spec: !`find . -maxdepth 2 \( -name 'openapi.yaml' -o -name 'openapi.yml' -o -name 'openapi.json' -o -name 'swagger.json' -o -name 'swagger.yaml' \)`
- Schema validator: !`grep -l '"ajv"\|"zod"' package.json`
- OpenAPI validation lib: !`grep -l "swagger-parser\|@apidevtools" package.json`
- Pact contracts dir: !`find . -maxdepth 1 -type d -name \'pacts\'`
- Contract tests: !`find . -maxdepth 3 -type d -name 'contract'`
- API test files: !`find . -maxdepth 4 \( -name '*.pact.*' -o -name '*.openapi.*' -o -name '*.contract.*' \)`
- CI workflows: !`find .github/workflows -maxdepth 1 \( -name '*api*' -o -name '*contract*' -o -name '*pact*' \)`
## Parameters
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 |
## Execution
Execute this API testing compliance check:
### Step 1: Detect project infrastructure
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.
### Step 2: Analyze current state
Check completeness of each API testing component:
**Contract Testing (Pact):**
1. Check if `@pact-foundation/pact` (JS/TS) or `pact-python` (Python) is installed
2. Look for consumer tests in `tests/contract/consumer/`
3. Look for provider verification in `tests/contract/provider/`
4. Check for Pact Broker configuration in CI files
5. Check for `can-i-deploy` CI gate
**OpenAPI Validation:**
1. Verify OpenAPI specification file exists and is valid
2. Check for request validation middleware
3. Check for response validation in tests
4. Look for breaking change detection (oasdiff)
**Schema Testing:**
1. Check for JSON Schema or Zod definitions
2. Verify validator is installed (`ajv` or `zod`)
3. Look for response validation test helpers
### Step 3: Generate compliance report
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.
### Step 4: Apply configuration
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](REFERENCE.md):
1. **Pact Contract Testing**: Install dependencies, create consumer test template, create provider verification template
2. **OpenAPI Validation**: Install validation libraries, create OpenAPI validator helper, create compliance tests
3. **Schema Testing (Zod)**: Install Zod, create schema definitions, create schema validation tests
4. **OpenAPI Breaking Change Detection**: Install oasdiff, add CI step
### Step 5: Configure CI/CD integration
Create or update `.github/workflows/api-tests.yml` with jobs for:
1. Consumer contract tests
2. Provider verification (with database service if needed)
3. OpenAPI spec validation and breaking change detection
4. Pact artifact publishing (main branch only)
Add test scripts to `package.json`. Use CI workflow template from [REFERENCE.md](REFERENCE.md).
### Step 6: Update standards tracking
Update `.project-standards.yaml` with API testing configuration:
```yaml
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
```
### Step 7: Generate final report
Print a summary of all changes applied including:
- Configuration files created
- Dependencies installed
- Test commands available (with exact `bun run` / `npm run` commands)
- CI/CD jobs configured
- Recommended next steps for verification
## Agentic Optimizations
| 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` |
## Examples
```bash
# 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 Handling
| 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 |
## See Also
- `/configure:tests` - Unit testing configuration
- `/configure:integration-tests` - Integration testing
- `/configure:all` - Run all compliance checks
- [PaRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.