api-and-interface-design

Design stable RESTful and GraphQL interfaces with consistent error semantics.

23|6|Updated May 9, 2026
One-click install
npx skills add https://github.com/vinvcn/addyosmani-agent-skills-zh --skill api-and-interface-design-vinvcn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/vinvcn/addyosmani-agent-skills-zh/tree/main/skills/api-and-interface-design
Command: npx skills add https://github.com/vinvcn/addyosmani-agent-skills-zh --skill api-and-interface-design-vinvcn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenges of creating inconsistent, fragile, or poorly documented interfaces that lead to integration friction and breaking changes.

Core Features & Use Cases

  • Contract-First Design: Enforces the definition of interfaces before implementation to ensure alignment.
  • Standardized Error Handling: Provides patterns for consistent error responses across REST and GraphQL endpoints.
  • Use Case: When building a new microservice, use this Skill to define strict TypeScript interfaces and RESTful resource paths that ensure long-term maintainability and backward compatibility.

Quick Start

Use the api-and-interface-design skill to review my current API endpoint definitions and suggest improvements for consistency and error handling.

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 REST and GraphQL interfaces that avoid breaking changes?

Design stable interfaces by applying contract-first principles and Hyrum's Law to ensure predictable, backward-compatible evolution for your REST and GraphQL endpoints. This prevents integration friction by standardizing error semantics and module boundaries before implementation.

What is the best way to standardize error handling across microservices?

Standardize error handling by implementing consistent error response patterns across your RESTful services and GraphQL schemas. This ensures predictable software interfaces and reduces integration friction by enforcing strict, well-documented error semantics.

How do I define strict TypeScript interfaces for new microservices?

Define strict TypeScript interfaces by enforcing contract-first design, which aligns internal module boundaries and RESTful resource paths before implementation. This approach ensures long-term maintainability and robust, scalable software architecture.

Can I review existing API endpoint definitions for consistency and predictability?

You can review existing API endpoint definitions to evaluate consistency, error handling, and adherence to Hyrum's Law. This process identifies fragile patterns in your REST and GraphQL interfaces and suggests improvements for predictable software interactions.

When do I need contract-first API design for my software architecture?

You need contract-first API design when building new microservices or establishing internal module boundaries to prevent poorly documented interfaces. This approach ensures long-term maintainability, stable endpoint definitions, and backward-compatible interface evolution.