api-and-interface-design

Design stable REST and GraphQL endpoints with contract-first validation.

Updated May 21, 2026
One-click install
npx skills add https://github.com/danieldev24/one-for-all --skill api-and-interface-design-danieldev24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/danieldev24/one-for-all/tree/main/skills/api-and-interface-design
Command: npx skills add https://github.com/danieldev24/one-for-all --skill api-and-interface-design-danieldev24

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps design stable, maintainable APIs and module interfaces, reducing complexity and ensuring consistent behavior across different components.

Core Features & Use Cases

  • Design stable APIs: Facilitates the creation of APIs that are hard to misuse and maintain.
  • Interface Contracts: Ensures contracts between modules or teams are clearly defined and adhered to.
  • Use Case: Ideal for designing new REST or GraphQL endpoints, defining type contracts between modules, or modifying public interfaces.

Quick Start

Design a new REST API endpoint for retrieving user profiles using the api-and-interface-design skill.

Frequently Asked Questions about api-and-interface-design

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

FAQPage Schema
What is contract-first API design and why does it matter for maintainable interfaces?

Contract-first API design defines stable interface contracts before implementation, ensuring modules adhere to agreed types and validation rules. This approach reduces complexity and prevents misuse by enforcing consistent behavior across components throughout the software lifecycle.

How do I design a REST API endpoint that is hard to misuse?

To design a hard-to-misuse REST API, define clear interface contracts, enforce validation at boundaries, and evolve the public interface additively. This ensures stable endpoints, prevents breaking changes, and maintains consistent behavior across distributed components.

What's the best way to define type contracts between software modules?

Defining type contracts between modules requires establishing clear interface boundaries and validating data at entry points. By focusing on contract-first design and additive evolution, you ensure stable module interfaces that prevent misuse and maintain consistent system behavior.

Does this approach work for both REST and GraphQL endpoint design?

Yes, the approach applies to designing both REST and GraphQL endpoints by focusing on stable interface contracts, boundary validation, and additive evolution. This ensures maintainable APIs that are hard to misuse across different architectural styles and component boundaries.

How do I change a public interface without breaking existing module contracts?

Changing a public interface safely requires additive evolution, where new fields or endpoints are added without removing or altering existing ones. By maintaining stable contracts and validating at boundaries, you prevent breaking changes for dependent modules.

When should I enforce validation at boundaries for API interface design?

Validation at boundaries should be enforced whenever data crosses module or API interfaces to ensure contract compliance. This practice prevents invalid data from propagating through the system, keeping REST and GraphQL endpoints stable, secure, and hard to misuse.