What problem does it solve?
This Skill helps you design APIs and module boundaries that stay predictable over time, reducing integration breakages caused by inconsistent contracts, unclear error behavior, and accidental exposure of implementation details.
Core Features & Use Cases
- Contract-first interface design: Define typed inputs/outputs and behavior before implementing, so consumers and producers agree on the contract.
- Consistent error semantics: Establish a single error strategy across endpoints (e.g., status-code mapping plus a uniform structured error body).
- Boundary validation and safety: Validate untrusted data at system edges (user input, external service responses, configuration) and avoid scattered validation that hides contract behavior.
- Backward-compatible evolution: Prefer additive, optional fields and safe extension patterns over breaking changes to existing types.
- Stability conventions: Apply consistent naming, REST resource patterns, pagination, filtering, PATCH partial updates, and TypeScript interface patterns (including discriminated unions and branded IDs).
Use it when designing new REST/GraphQL endpoints, defining frontend-backend contracts, setting module boundaries across teams, or planning safe changes to public interfaces.
Quick Start
Use the api-and-interface-design Skill to turn your endpoint or module contract requirements into a consistent, validated, version-stable interface spec by asking it to produce typed input/output schemas, a uniform error model, and backward-compatible evolution guidance for your proposed API.