New advertisers: 50% off your first month with code FIRSTMONTHSee slots
addyosmani avatar

Api And Interface Design

Stable API and module-boundary design guide that makes correct usage easy and misuse hard.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
7
skills.sh installs
77.2K
GitHub stars
119.7K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers contract-first interface definition, Hyrum's Law, the one-version rule, and predictable naming for REST, GraphQL, and component props
  • Includes a consistent error envelope with status-code mapping and validation placed at system boundaries, treating third-party responses as untrusted
  • Enforces additive-only changes such as optional fields and no removals or type changes to existing consumers
  • Designed for teams defining public APIs, cross-team module contracts, or frontend-backend boundaries

Install

$ npx -y skills add addyosmani/agent-skills --skill api-and-interface-design -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

API and Interface Design

Overview

Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.

When to Use

  • Designing new API endpoints
  • Defining module boundaries or contracts between teams
  • Creating component prop interfaces
  • Establishing database schema that informs API shape
  • Changing existing public interfaces

Core Principles

Hyrum's Law

With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.

This means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:

Details

Repository
github.com/addyosmani/agent-skills
Categories
Backend & APIs, Technical Documentation
First seen
Apr 16, 2026

More from addyosmani/agent-skills

All 25

Similar to Api And Interface Design

More Backend & APIs