api-and-interface-design

Design stable REST and GraphQL API contracts with versioning and compatibility checks.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/MinhDuyDEV/mdpi --skill api-and-interface-design-minhduydev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/MinhDuyDEV/mdpi/tree/main/.pi/skills/api-and-interface-design
Command: npx skills add https://github.com/MinhDuyDEV/mdpi --skill api-and-interface-design-minhduydev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents fragile API and interface designs by guiding developers to create stable contracts, consistent error handling, and backward-compatible public boundaries before implementation begins.

Core Features & Use Cases

  • Contract-First Design: Define request and response types, schemas, versioning strategies, and compatibility rules before writing implementation code.
  • API Quality Standards: Establish consistent naming, validation, pagination, error structures, and interface patterns for REST, GraphQL, SDKs, and public modules.
  • Use Case: When building a new service endpoint or modifying an existing SDK, use this Skill to design a maintainable interface that protects consumers from breaking changes.

Quick Start

Use the api-and-interface-design skill to review my API design and create a backward-compatible contract with validation and error handling recommendations.

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 REST API contract that prevents breaking changes?

You can design a stable REST API contract by defining typed request and response schemas, establishing versioning rules, and enforcing backward compatibility checks before implementation to prevent breaking changes.

What is contract-first API design and when do I need it?

Contract-first API design defines schemas, validation strategies, and versioning rules before writing implementation code. You need it when building new endpoints or modifying public modules to ensure reliable software evolution and consistent integration behavior.

Does this approach work for both GraphQL schemas and SDK interfaces?

Yes, this approach works for GraphQL schemas and SDK interfaces by applying consistent naming, validation, and error structures. It establishes quality standards across REST, GraphQL, SDKs, and component props to maintain stable public boundaries.

How do I handle error handling and validation in interface design?

Handle error handling and validation in interface design by establishing consistent error structures and validation strategies within your typed contracts. This creates maintainable interfaces that protect consumers from unexpected integration failures.

What is the best way to version an API for backward compatibility?

The best way to version an API for backward compatibility is to define explicit versioning rules and compatibility checks during the contract-first design phase. This prevents fragile designs by ensuring typed contracts support reliable software evolution.