AGENT SKILL

api-contract-review

Review backend API contracts, OpenAPI, GraphQL, protobuf, DTOs, compatibility, generated clients, status codes, validation, and migration impact.

License 许可
MIT
最近更新
2026-07-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
api-contract-review
description
Review backend API contracts, OpenAPI, GraphQL, protobuf, DTOs, compatibility, generated clients, status codes, validation, and migration impact.

03 SKILL.md 正文

When to Use

  • API request or response shape changes.
  • OpenAPI, GraphQL, protobuf, or DTO files change.
  • Generated clients or SDKs are updated.
  • Status codes, validation, or error contracts change.

When NOT to Use

  • Internal-only refactors with no contract change.
  • Frontend-only consumption changes.
  • Database-only changes without API impact.

Workflow

  1. Identify public and internal API boundaries.
  2. Check compatibility and versioning.
  3. Review generated clients and schemas.
  4. Check validation, error, and status code behavior.
  5. Report migration, rollout, and test requirements.

Review Steps

  • Identify breaking versus additive changes.
  • Check fields, enum changes, nullability, and defaults.
  • Verify generated clients match source contracts.
  • Check validation error stability and public documentation.
  • Confirm rollout order for clients and servers.
  • Require contract, integration, or compatibility tests.

Constraints

  • Do not assume all consumers deploy together.
  • Do not hide breaking changes inside generated diffs.
  • Avoid repo-specific API governance rules.
  • Keep review focused on observable contract behavior.

Expected Outputs

  • Compatibility summary.
  • Breaking-change risks.
  • Client generation and rollout notes.
  • Contract test gaps.

04 同仓库更多 Skills