Skip to content
Back to skills

Api Contract Review

ASecurity

Reviews API and message contracts for compatibility, validation, error semantics, authentication, pagination, idempotency, and versioning. Use when adding or changing REST, GraphQL, RPC, event, webhook, or SDK interfaces.

  • 3 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 23, 2026
ai-agentsgorailsapidocumentation

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned October 23, 2026

npx -y skills add OpenSelfHosting/skills --skill api-contract-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Contract Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Contract Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/openselfhosting-api-contract-review/badge)](https://www.skillsdirectory.com/skills/openselfhosting-api-contract-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-contract-review
description: "Reviews API and message contracts for compatibility, validation, error semantics, authentication, pagination, idempotency, and versioning. Use when adding or changing REST, GraphQL, RPC, event, webhook, or SDK interfaces."
license: MIT
metadata:
  author: OpenSelfHosting
  version: "1.0.0"
---

# API Contract Review

## Goal
Check that an interface is understandable, secure, evolvable, and consistent for clients. Cover HTTP APIs and other externally consumed contracts when relevant.

## Workflow
1. Identify consumers, public versus internal status, versioning policy, schemas/specifications, and backward-compatibility expectations.
2. Compare before/after contracts: routes or operations, method semantics, request/response fields, types, defaults, enum values, status/error codes, headers, event payloads, and generated clients.
3. Evaluate request validation and normalization, authorization at the object/action level, data minimization, safe error messages, rate/resource limits, and pagination bounds.
4. Check semantics: idempotency for retryable writes, concurrency/ETag or version behavior, timeouts, retries, ordering and delivery guarantees, duplicate events, and partial failures.
5. Look for compatibility traps: renaming/removing fields, making optional fields required, narrowing accepted values, changing null/empty semantics, reusing enum values, changing units/time zones, and returning undocumented sensitive fields.
6. Review pagination, sorting, filtering, and search for deterministic ordering and bounded cost. Check that cursors and identifiers do not imply authorization.
7. Check documentation and examples against implementation. If an OpenAPI, GraphQL schema, protobuf, JSON Schema, or event schema exists, validate it with available project tooling.
8. Recommend additive changes where feasible. If a breaking change is necessary, specify versioning/deprecation, consumer migration, release notes, and compatibility tests.

## Findings
For each actionable issue include affected operation/field, consumer impact, an example request/response or sequence, severity, and a concrete fix. Separate contract breakage from stylistic preferences.

## Test ideas
Consider contract tests for existing clients, authorization cases, invalid and boundary inputs, duplicate retries, pagination stability, error format consistency, and old/new client interoperability.

## Guardrails
Do not claim compatibility without comparing the relevant old and new contract. Do not leak production payloads or secrets. Do not silently change authentication requirements or data semantics as part of an unrelated refactor.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.