api-and-interface-design

Guide REST and GraphQL API design with contract-first, backward-compatible interfaces.

7|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/carl10086/ys-powers --skill api-and-interface-design-carl10086
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/carl10086/ys-powers/tree/main/skills/api-and-interface-design
Command: npx skills add https://github.com/carl10086/ys-powers --skill api-and-interface-design-carl10086

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the common pitfalls of interface design, such as breaking changes, inconsistent error handling, and poor module boundaries, ensuring your system remains maintainable as it grows.

Core Features & Use Cases

  • Contract-First Development: Provides a framework for defining interfaces before implementation to ensure alignment.
  • Standardized Error Semantics: Offers patterns for consistent error responses across REST and internal modules.
  • Boundary Validation: Implements robust validation strategies at system edges to protect internal logic from untrusted input.

Quick Start

Apply the api-and-interface-design skill to review the current module boundaries and suggest a contract-first interface definition for the new service.

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 stable REST APIs and prevent breaking changes?

Design stable REST APIs by establishing contract-first definitions and enforcing strict boundary validation. This ensures backward compatibility and protects internal logic from untrusted input as your system scales.

What is contract-first API development and when should I use it?

Contract-first API development is the practice of defining interface schemas and error semantics before implementation. Use it to ensure alignment across REST endpoints, GraphQL schemas, and internal service contracts.

How do I standardize error handling across internal module boundaries?

Standardize error handling across module boundaries by applying consistent error response patterns. This ensures predictable REST API behaviors and robust internal service contract establishment.

Does Hyrum's Law affect backward compatibility when defining TypeScript interfaces?

Hyrum's Law affects TypeScript interface backward compatibility because observable behaviors become implicit dependencies. Applying contract-first design and boundary validation mitigates these implicit contract risks.

What is the best way to validate untrusted input at system edges?

The best way to validate untrusted input at system edges is implementing robust boundary validation strategies. This protects internal module logic and maintains architectural stability as the system grows.