About api-contract-testing
A skill for reviewing and designing provider-consumer API contract tests across schemas, semantics, compatibility, and evolution. It emphasizes evidence-based, risk-ranked findings and actionable, verifiable criteria, including when input is incomplete.
Key features
- 01Schema and semantic coverage
- 02Compatibility and evolution review
- 03Evidence-linked findings
- 04Risk-ranked recommendations
- 05Machine-readable output checks
Use cases
- 01Reviewing an API contract test plan
- 02Assessing a proposed API change
- 03Improving contract test evidence
- 04Preparing structured review output
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ naodeng/ awesome-qa-skills --skill api-contract-testingAfter installing, type/api-contract-testingin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlevals/eval.yamlevals/cases/basic-success.yamledge-incomplete-input.yamledge-risk-priority.yamlreview-compatible-additive-control.yamlreview-schema-versus-semantics.yamlprompts/api-contract-testing.mdDetails
From the project READMEAPI Contract Testing
When to Use
- Use this skill when you need to verify provider-consumer API contracts across schemas, semantics, compatibility, and evolution.
- Use it to review an existing plan, result, or evidence set and produce actionable improvements.
- Use it when context is incomplete but a bounded first pass is still valuable.
Output Format Options
- Default to Markdown for review, execution, and incremental refinement.
- When the user requests tables, CSV, JSON, or ticket fields, preserve risk, evidence, priority, and boundary information.
- For machine-consumed output, confirm the schema, enums, and required fields first.
How to Use
- Read and follow
prompts/api-contract-testing.md, including its input contract, execution rules, minimum coverage, and output order. - Add only context that changes the decision: scope, environment, version, constraints, evidence, and success criteria.
- Audit the input, then separate confirmed facts, working assumptions, and open questions.
- Rank by risk and evidence strength, and produce an artifact that can be executed or reviewed directly.
- If information is missing, deliver a bounded first pass and state which conclusions remain unsupported.
Reference Files
- Always read
prompts/api-contract-testing.md; it is the complete execution specification for this skill. - For evaluation or regression, read
evals/eval.yamland the relevant cases underevals/cases/. - Load
references/,examples/,scripts/, oroutput-formats.mdonly when those directories exist and the task needs them.
Core Constraints
- contracts include semantics and error behavior, not only schemas
- do not infer full contracts from examples
- breaking changes require a migration path
- Never invent system behavior, fields, data, metrics, or root causes absent from the evidence.
- Link important conclusions to evidence; mark unsupported conclusions as hypotheses with a verification method.
- Explain priority using business impact, likelihood, or detectability.
Delivery Checklist
- Covered: fields and types, required and nullable rules, enums, status codes, error bodies, compatibility, version evolution, consumer impact.
- Separated facts, assumptions, gaps, and recommendations.
- Gave high-risk items a priority, evidence basis, owner or next action.
- Defined verifiable decision criteria instead of generic advice.
- Performed no unauthorized production writes or destructive actions.
Common Pitfalls
- Listing checks without preconditions, expected outcomes, or evidence.
- Marking everything high priority and avoiding tradeoffs.
- Substituting tool names or generic theory for domain reasoning.
- Refusing incomplete input, or pretending incomplete evidence supports certainty.
Best Practices
- Start with paths most likely to cause business loss, safety issues, or release blockage.
- Reduce uncertainty through the smallest verifiable experiment and record reproduction conditions.
- Make the artifact executable and independently reviewable by another engineer.
Comments
Markdown supported