一键导入
api-contract-tester
Generate and execute API contract tests from OpenAPI/Swagger specs. Use when the user wants contract tests or schema validation for an API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate and execute API contract tests from OpenAPI/Swagger specs. Use when the user wants contract tests or schema validation for an API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Full QA audit orchestrator. Use when the user asks to "test my app", "run a full QA audit", "test everything", or invokes /qa-audit. Discovers what kind of application this is, selects the relevant QA agents (ui-inspector, api-sentinel, security-scout, perf-guardian, data-validator, regression-watcher), runs them, and merges their reports into one master QA report.
Onboard the QA toolkit onto any project. Use on first contact with a new codebase, when the user says "set up QA", "qa init", "/qa-init", or when any QA agent finds no qa-profile.md. Studies the project deeply and writes the persistent QA profile that every other agent reads first — the toolkit's long-term memory for this project.
Wire the QA suite into CI. Use when the user wants tests running automatically on every PR or on a schedule: "add this to CI", "run tests on every push", "/qa-ci". Generates GitHub Actions workflows for the generated Playwright suite and (optionally) scheduled full audits.
Self-healing for the generated test suite. Use when previously-green Playwright tests are failing, the user says "my tests broke", "fix the tests", "/qa-heal", or after a UI refactor breaks selectors. Classifies each failure (real bug vs test drift) and repairs the drift — never papers over real bugs.
Compare two QA audit runs and report what improved, what regressed, and what persists. Use when the user asks "did it improve since last time?", "compare audits", "QA trend", or invokes /qa-trend. Requires at least two timestamped runs under qa-reports/runs/.
Audit web pages for WCAG 2.1 compliance. Use when the user asks about accessibility, a11y, WCAG, screen readers, or contrast issues.
| name | api-contract-tester |
| description | Generate and execute API contract tests from OpenAPI/Swagger specs. Use when the user wants contract tests or schema validation for an API. |
Generate and execute API contract tests from OpenAPI/Swagger specifications.
This skill reads OpenAPI/Swagger specifications (YAML or JSON) and generates comprehensive contract test scripts. It validates that API implementations match their documented contracts, detecting breaking changes and schema violations.
When the user provides an API specification or endpoint details:
curl + jq (default, zero dependencies)requests + jsonschemafetch or axios#!/bin/bash
# Contract Tests for [API Name]
# Generated by Claude QA Toolkit
BASE_URL="${BASE_URL:-https://api.example.com}"
PASS=0
FAIL=0
# Test: GET /endpoint returns correct schema
test_get_endpoint() {
response=$(curl -s -w "\n%{http_code}" "$BASE_URL/endpoint")
status=$(echo "$response" | tail -1)
body=$(echo "$response" | sed '$d')
# Assert status code
if [ "$status" -eq 200 ]; then
echo "PASS: GET /endpoint returns 200"
((PASS++))
else
echo "FAIL: GET /endpoint expected 200, got $status"
((FAIL++))
fi
# Assert required fields exist
if echo "$body" | jq -e '.id, .name, .email' > /dev/null 2>&1; then
echo "PASS: Response contains required fields"
((PASS++))
else
echo "FAIL: Response missing required fields"
((FAIL++))
fi
}
# Run all tests
test_get_endpoint
echo "Results: $PASS passed, $FAIL failed"
Generate contract tests for this OpenAPI spec: [paste spec]
Use curl/bash scripts so the team doesn't need extra dependencies.
Compare these two API versions and generate tests that catch breaking changes:
V1: [spec] V2: [spec]