api-and-interface-design

Design stable REST and GraphQL APIs with contract-first specifications and consistent error semantics.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/logo-solutions/NAS-logo --skill api-and-interface-design-logo-solutions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/logo-solutions/NAS-logo/tree/main/skills/api-and-interface-design
Command: npx skills add https://github.com/logo-solutions/NAS-logo --skill api-and-interface-design-logo-solutions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design clear, stable, and well-documented APIs and interfaces that minimize accidental breaking changes, prevent misuse, and make maintenance and evolution predictable for consumers and teams.

Core Features & Use Cases

  • Contract First: Define typed inputs and outputs before implementation so the interface is the source of truth.
  • Consistent Error Semantics & Validation: Standardize error shapes and validate at system boundaries to avoid ambiguous consumer behavior.
  • Compatibility Patterns: Use additive changes, pagination, discriminated unions, branded IDs, and predictable naming to preserve backward compatibility and reduce coupling.
  • Use Case: Designing REST or GraphQL endpoints, establishing module boundaries, creating component prop contracts, or evolving database-informed API shapes.

Quick Start

Draft a contract-first API specification for a task management service with create, list, get, update, and delete endpoints that includes pagination, consistent error formats, and boundary validation.

Frequently Asked Questions about api-and-interface-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a stable REST API that prevents accidental breaking changes?

Design a stable REST API by applying additive extension patterns, boundary validation, and predictable naming conventions to prevent accidental breaking changes. This ensures backward compatibility when evolving public interfaces and module boundaries.

What is the best way to standardize error handling and validation in API design?

Standardize error handling by defining consistent error shapes and validating inputs at system boundaries. This approach avoids ambiguous consumer behavior and ensures predictable API interactions across REST and GraphQL endpoints.

How do I implement contract-first API definitions for GraphQL and REST endpoints?

Implement contract-first API definitions by specifying typed inputs and outputs before writing code, making the interface the source of truth. This technique applies directly to designing REST endpoints, GraphQL schemas, and component props.

Does contract-first API design work for database-informed API shapes and module boundaries?

Yes, contract-first API design works for database-informed API shapes, module boundaries, and component prop contracts. It applies consistent error semantics, boundary validation, and pagination to any public interface being created or modified.

When should I use additive changes and pagination to preserve API backward compatibility?

Use additive changes, pagination, discriminated unions, and branded IDs when evolving public interfaces to preserve backward compatibility and reduce coupling. These patterns ensure existing consumers continue functioning while the API grows.