Reviews HTTP API behavior and compatibility for routes, request/response schemas, status codes, errors, pagination, versioning, and OpenAPI. Use for consumer-facing contract questions; do not use for a full .NET code review (use dotnet-code-review) or implementation-only endpoint work.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Api Contract Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/k4ndev-api-contract-review)
---
name: api-contract-review
description: Reviews HTTP API behavior and compatibility for routes, request/response schemas, status codes, errors, pagination, versioning, and OpenAPI. Use for consumer-facing contract questions; do not use for a full .NET code review (use dotnet-code-review) or implementation-only endpoint work.
---
# API Contract Review
## Purpose
Protect API consumers by identifying observable HTTP changes and proposing a compatible evolution path.
## Scope
HTTP methods/routes, request and response schemas, serialization, status/error semantics, pagination, idempotency, OpenAPI, and versioning.
## When to use
- User asks whether an HTTP change is backward-compatible or how to evolve a public/internal API contract.
- Consumer behavior depends on serialization, status codes, or error payload shape.
## Do not use for
- Full code quality/security guideline review: use `dotnet-code-review`.
- Building an endpoint: use `minimal-api-patterns` or `aspnetcore-patterns`.
- gRPC/protobuf schema changes unless HTTP gateway contract is the focus: use `dotnet-code-review` with RPC rules.
## Required context
Identify consumers, API versioning policy, serializer settings, OpenAPI generation, route/method, current and proposed schema, compatibility window, and tests/specs.
## Workflow
1. Compare route, method, request, response, status, headers, error format, and semantics before/after.
2. Inspect required/nullable fields, default values, enum/string/number handling, naming policy, date/decimal formats, and serializer options.
3. Check authorization, validation, idempotency, pagination maximums/cursor order, sorting/filter semantics, and caching headers where changed.
4. Classify consumers and compatibility impact as additive, behaviorally changing, or breaking; do not assume serializer/versioning behavior.
5. Recommend additive transition, explicit versioning, deprecation window, or consumer migration as appropriate.
6. Add contract/integration tests and generated OpenAPI diff for important guarantees.
## Decision rules
- A nullable/optional field may still be incompatible with strict clients; inspect actual consumers and serializer config.
- Removing enum values, changing meanings/statuses, or weakening validation can be breaking even when schema shape is unchanged.
- Do not call a change breaking solely because source declarations changed; establish wire behavior.
## Severity classification
For contract findings, classify as Breaking/Behavior change/Compatible when that vocabulary is useful; if a repo severity scheme exists, use it and describe affected consumers and migration urgency.
## Expected output format
Summarize affected contract surface, compatibility classification, evidence/configuration assumptions, impacted consumers, migration recommendation, and regression contract tests.
## Common mistakes
- Inferring wire shape from C# types alone, ignoring nullability/enum converters, assuming all clients tolerate additive fields, or recommending versioning for every change.
## Edge cases
- OpenAPI output can differ from serializer/runtime behavior; test both when contract fidelity matters.
- `204` vs `200` with empty body and `404` vs `403` can alter client control flow.
- Pagination cursor/order and default sort changes alter semantics without changing schema.
## Examples
See [API contract examples](examples.md) for an enum compatibility change and a stable additive response.
## Test scenarios
- Positive: “Will replacing numeric enum JSON with strings break existing mobile clients?”
- Negative: “Find a race condition inside a background queue” routes to `async-concurrency`.
- Boundary: “Review a Minimal API route change for compatibility” selects this skill and `dotnet-code-review` only when full review is requested.
## Related skills
`dotnet-code-review`, `minimal-api-patterns`, `aspnetcore-patterns`, `testing-quality`, `security-audit`.