api-and-interface-design

Design stable, well-documented REST and GraphQL APIs and interfaces.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/moonshineTP/ATTT-20252 --skill api-and-interface-design-moonshinetp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/moonshineTP/ATTT-20252/tree/main/.claude/skills/api-and-interface-design
Command: npx skills add https://github.com/moonshineTP/ATTT-20252 --skill api-and-interface-design-moonshinetp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you design APIs and interfaces that are stable, well-documented, and hard to misuse, making the right thing easy and the wrong thing hard.

Core Features & Use Cases

  • API Design Guidance: Provides best practices for API design, including defining endpoints, handling errors, and validating input.
  • Interface Design Principles: Offers core principles for designing interfaces, such as Hyrum's Law and the One-Version Rule.
  • REST API Patterns: Explains common REST API patterns for resource design, pagination, filtering, and partial updates.
  • TypeScript Interface Patterns: Suggests TypeScript interface patterns for handling variants, input/output separation, and branded types.
  • Use Case: Ideal for developers designing new API endpoints, defining module boundaries, or creating component prop interfaces.

Quick Start

Run the SKILL to learn about designing stable APIs and interfaces.

Frequently Asked Questions about api-and-interface-design

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

FAQPage Schema
What are the best practices for REST API design to ensure endpoints are stable and hard to misuse?

REST API design best practices involve defining clear resource endpoints, handling errors consistently, and validating input rigorously. Applying these principles ensures your APIs are stable, well-documented, and resistant to misuse.

How do I design TypeScript interfaces to separate input and output types effectively?

Designing TypeScript interfaces involves using patterns for input/output separation and branded types. These patterns help define strict module boundaries and create component prop interfaces that are maintainable and reliable.

When should I choose GraphQL over REST API for my interface design?

Choosing GraphQL over REST API depends on your data fetching needs. This Skill provides design principles for both REST and GraphQL, helping you structure module boundaries and select the right approach for reliable interfaces.

How do I implement pagination and filtering patterns for REST API resources?

Implementing REST API pagination and filtering requires following common resource design patterns. These patterns allow clients to request partial updates and query subsets of data, maintaining API stability and reliability.

What is Hyrum's Law and how does it impact interface design?

Hyrum's Law states that when an interface has observable behaviors, those behaviors will be depended upon by users. Recognizing this principle is crucial for designing stable interfaces and enforcing the One-Version Rule.

Can I use these interface design principles for defining module boundaries in a large application?

Yes, these interface design principles are ideal for defining module boundaries. By applying the One-Version Rule and TypeScript interface patterns, you can make the right thing easy and the wrong thing hard across large application modules.