Skip to content
SkillModel-led3,259 tokens in use

api-and-interface-design

Design stable REST, GraphQL and module interfaces that are hard to misuse, with contracts first and consistent errors.

119,377 stars on the repository MIT Licenseaddyosmani/agent-skills · skills/api-and-interface-design
npx skills add addyosmani/agent-skills --skill api-and-interface-design
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing api-and-interface-design costs

48tokens idle
3,259tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter12/15
  • Structure11/25
  • Examples15/15
  • Output15/15
  • Size15/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity96
  • Maintenance100
  • Community76
  • Maturity32
  • Momentum40

API and Interface Design guides an agent when it designs endpoints, module boundaries, component props or type contracts between frontend and backend. It centers on Hyrum’s Law, the One-Version Rule, contract-first design and validation at system edges.

The skill also covers REST resource patterns, pagination, TypeScript interface patterns and a detailed section on honouring an Idempotency-Key.

What You Get

  • Six core principles: contract first, consistent error semantics, validation at boundaries, addition over modification, predictable naming and idempotency
  • REST patterns for resources, pagination, filtering and partial updates
  • TypeScript patterns: discriminated unions, input and output types, branded IDs
  • A rationalizations table, red flags and a verification checklist

Common Use Cases

  • Designing new API endpoints
  • Defining contracts between modules or teams
  • Changing a public interface without breaking consumers
  • Making state-changing endpoints safe to retry

What Makes It Unique

Beyond the usual REST advice, the skill spends a full section on what it takes to honour an Idempotency-Key: intent-derived keys, atomic claiming, payload hashing, in-flight duplicate strategy and the unknown outcome of a timeout. It also treats third-party API responses as untrusted data to validate before use.

Under The Hood

The skill is a single SKILL.md of instructions with code examples in TypeScript. It loads when an interface is being designed and does not run scripts or reach any service. It points to the deprecation-and-migration skill for removing behavior that users depend on.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers