api-and-interface-design

Guide API and interface design with contract-first principles and consistent error semantics.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions --skill api-and-interface-design-tgmarinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions/tree/main/upstream-snapshots/agent-skills/skills/api-and-interface-design
Command: npx skills add https://github.com/tgmarinho/agent-super-powers-matt-pocock-skills-comparasions --skill api-and-interface-design-tgmarinho

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides guidance for designing robust, user-friendly APIs and interfaces, helping developers avoid common pitfalls and ensure their software is accessible and easy to use.

Core Features & Use Cases

  • Stable Interface Design: Ensures APIs and interfaces are well-documented and maintainable.
  • Design Principles: Offers Hyrum's Law and The One-Version Rule as design principles.
  • Contract First Approach: Recommends defining the interface before implementing it.
  • Consistent Error Semantics: Ensures consistent error handling across all endpoints.
  • Validate at Boundaries: Emphasizes validation at system edges where external input enters.
  • REST API Patterns: Provides best practices for REST API design.
  • Use Cases: Useful for designing new API endpoints, defining module boundaries, creating component props, establishing database schemas, and modifying existing public interfaces.

Quick Start

Implement an API endpoint following the contract-first approach, validating inputs at the API boundary, and providing consistent error semantics.

Frequently Asked Questions about api-and-interface-design

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

FAQPage Schema
What is the contract-first approach for REST API design?

The contract-first approach for REST API design defines the interface and clear contracts before implementing the underlying logic. This ensures APIs remain stable, well-documented, and avoid unintended commitments to users.

How do I ensure consistent error handling across all API endpoints?

To ensure consistent error handling across API endpoints, apply consistent error semantics throughout the interface design. This approach guarantees uniform error responses across all public-facing software components.

When do I need to validate inputs at system boundaries?

Validate inputs at system boundaries whenever external input enters your software. This interface design practice prevents invalid data from penetrating internal modules and compromising API stability.

How does Hyrum's Law affect interface design and maintainability?

Hyrum's Law affects interface design by stating that all observable behaviors of an API become implicit dependencies. Applying this principle helps developers avoid unintended commitments and maintain stable public interfaces.

Can I use these design patterns for defining database schemas and module boundaries?

Yes, you can use these interface design patterns for defining database schemas, establishing module boundaries, creating component props, and modifying existing public interfaces to ensure stable software contracts.

What is the best way to avoid unintended commitments in public-facing APIs?

The best way to avoid unintended commitments in public-facing APIs is to define clear contracts, apply the One-Version Rule, and use consistent design patterns. This ensures interfaces remain stable and maintainable.