What problem does it solve? Public interfaces become accidental commitments: undocumented behaviors get depended on (Hyrum's Law), breaking changes slip in, error formats diverge across endpoints, and retry storms cause duplicate charges when idempotency keys are accepted but not honored. This Skill provides concrete design rules and code patterns to prevent those failures before an API ships. ## Core Features & Use Cases - Contract-First Design: Define typed input/output schemas, discriminated unions, and branded ID types before implementation. - Consistent Error Semantics: One structured error shape mapped to HTTP status codes, with validation only at system boundaries. - Idempotency Implementation: Atomic key claiming via unique constraints, payload-hash guarding, in-flight duplicate strategies, and retention sizing. - Use Case: When adding a payment endpoint to a FastAPI or Express backend, apply the idempotency checklist so client retries during a dependency outage never produce duplicate charges. ## Quick Start Ask the AI to review your new REST endpoint design against the API and interface design principles, including error format, pagination, and idempotency handling.