Agent skill · Frontend

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmanigithub.com/addyosmaniGitHub ↗
claude-codecodexcursorMIT
Install
npx skills add addyosmani/agent-skills --skill api-and-interface-design --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/api-and-interface-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,574
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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: - **Be intentional about what you expose.** Every observable behavior is a potential commitment. - **Don't leak implementation details.** If users can observe it, they will depend on it. - **Plan for deprecation at design time.** See `deprecation-and-migration` for how t

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Core Principles
  4. Hyrum's Law
  5. The One-Version Rule
  6. 1. Contract First
  7. 2. Consistent Error Semantics
  8. 3. Validate at Boundaries
  9. 4. Prefer Addition Over Modification
  10. 5. Predictable Naming
  11. REST API Patterns
  12. Resource Design
  13. Pagination
  14. Filtering
More from agent-skills
All skills →
About this skill
What does the api-and-interface-design skill do?

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

How do I install it?

Run `npx skills add addyosmani/agent-skills --skill api-and-interface-design --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From addyosmani/agent-skills, a repository with 81,574 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going