api-and-interface-design

Design stable REST and GraphQL interfaces with contract-first typing and additive versioning.

1|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/svssdeva/agentic-skills --skill api-and-interface-design-svssdeva
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/svssdeva/agentic-skills/tree/main/engineering/api-and-interface-design
Command: npx skills add https://github.com/svssdeva/agentic-skills --skill api-and-interface-design-svssdeva

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents breaking downstream consumers by guiding how to design stable, predictable public interfaces (APIs, schemas, and module boundaries) with consistent behavior and error handling.

Core Features & Use Cases

  • Contract-first interface definitions that specify inputs/outputs before implementation, improving clarity for both teams and external clients.
  • Consistent error semantics with a single error shape and clear HTTP/status mapping so consumers can reliably handle failures.
  • Boundary validation and additive evolution to validate untrusted inputs at entry points and extend interfaces without breaking existing usage, including pagination and naming conventions for REST.

Quick Start

Use api-and-interface-design to define a version-safe REST contract for a tasks service, including typed request/response models, consistent errors, validation at the API boundary, and pagination for list endpoints.

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 doesn't break existing consumers?

To design a stable REST API, use contract-first interface definitions, enforce consistent error semantics, validate untrusted inputs at boundaries, and apply additive versioning practices to prevent breaking downstream consumers.

What's the best way to handle API error formats consistently across endpoints?

The best way to handle API error formats is to establish a single error shape with clear HTTP or status mapping, ensuring consumers can reliably parse and handle failures across all interface boundaries.

How does contract-first typing improve interface design for front-end and back-end sharing?

Contract-first typing improves interface design by specifying typed request and response models before implementation, ensuring predictable semantics and reducing integration friction between front-end and back-end systems.

When do I need boundary validation for untrusted API inputs?

You need boundary validation for untrusted API inputs at all entry points to enforce predictable contracts, reject malicious or malformed data early, and maintain stable module boundary behavior.

Can I use this approach for GraphQL endpoint design and module boundary contracts?

Yes, this approach applies to both GraphQL endpoint design and module boundary contracts, guiding predictable type safety, consistent error formats, and additive evolution without breaking existing usage.

What pagination and naming conventions should I follow for REST API list endpoints?

For REST API list endpoints, follow additive versioning practices that include consistent pagination and naming conventions, allowing you to extend interfaces safely without breaking current consumer implementations.