Skip to content
Skill

API and interface design

Guides designing stable, hard-to-misuse APIs, REST endpoints and module contracts

API and interface design is an open-source agent skill for design and media. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
122K
Last commit
License
MIT
Listing updated

Similar skills

About API and interface design

This skill steers an agent toward designing interfaces that stay stable over time, covering REST and GraphQL endpoints, module boundaries, component props and the database shape that feeds an API. It stresses contract-first design, one consistent error format, and validating input only at system edges rather than inside internal code.

The guide walks through concrete conventions: plural resource URLs without verbs, paginated list endpoints, partial PATCH updates, additive and optional fields for backward compatibility, and discriminated unions or branded types in TypeScript. It also covers idempotency keys, explaining how to derive them from intent, claim them atomically with a unique constraint, reject reused keys with a different payload, and set retention longer than any retry path.

The skill is a single instruction file with code examples and no scripts. It is written with TypeScript and Express-style examples, and it ends with a red-flag list and a verification checklist the agent can run through after designing an API.

When your agent uses it

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (15 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the agent-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionic

Or copy only this skill to ~/.claude/skills/api-and-interface-design:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-and-interface-design &&
cp -R "$tmp/skills/api-and-interface-design" ~/.claude/skills/api-and-interface-design &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/api-and-interface-design inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/api-and-interface-design to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-and-interface-design &&
cp -R "$tmp/skills/api-and-interface-design" ~/.agents/skills/api-and-interface-design &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/api-and-interface-design inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/api-and-interface-design to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-and-interface-design &&
cp -R "$tmp/skills/api-and-interface-design" ~/.cursor/skills/api-and-interface-design &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/api-and-interface-design inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/api-and-interface-design

Or copy the folder to ~/.gemini/skills/api-and-interface-design yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/api-and-interface-design:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-and-interface-design &&
cp -R "$tmp/skills/api-and-interface-design" ~/.copilot/skills/api-and-interface-design &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/api-and-interface-design inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/addyosmani/agent-skills.git

Then copy agent-skills/skills/api-and-interface-design into your agent's skills folder as api-and-interface-design. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Contract-first interface design
Defines the typed contract before implementation, so the spec drives the code.
Consistent error semantics
Sets one error body shape and a status code mapping used across all endpoints.
Boundary validation rules
Explains where input should be validated and treats third-party responses as untrusted.
Backward-compatible evolution
Favors adding optional fields over changing or removing existing ones.
REST naming and pagination
Covers resource URLs, query parameter naming, filtering, paging and PATCH updates.
Idempotency key handling
Covers deriving keys from intent, atomic claims, payload checks and in-flight duplicate responses.
TypeScript interface patterns
Shows discriminated unions, input and output separation and branded ID types.

Good for

  • Design a REST endpoint set for a task management service
  • Review an API for inconsistent error formats and pagination gaps
  • Define type contracts between a frontend and backend module
  • Add idempotency key support to a payment or order endpoint
  • Plan a backward-compatible change to an existing public interface

API and interface design FAQ

Does API and interface design work with a specific language or framework?

The examples are written in TypeScript and use an Express-style route handler with a schema validator, but the principles described apply to REST and GraphQL design more broadly.

Does API and interface design run any scripts or change files?

No. The skill contains only its SKILL.md instructions, with no scripts or additional reference files.

When does the skill trigger?

It loads when a task involves designing APIs, module boundaries or public interfaces, creating REST or GraphQL endpoints, defining type contracts between modules, or setting boundaries between frontend and backend.

How do I install API and interface design in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-and-interface-design to use it in all your projects, or to .claude/skills/api-and-interface-design in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.

Does API and interface design run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use API and interface design?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to API and interface design?

The closest alternatives to API and interface design are API design, API design, API design edho ferdian, API and Go API design.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from addyosmani/agent-skills

  1. Audits interfaces against WCAG 2.2 AA and guides fixing the violations found

    • Open source
    • 122K GitHub stars
    • Developer tools
  2. Lets your coding agent inspect and test live browser pages through Chrome DevTools

    • Open source
    • 122K GitHub stars
    • Browser automation
  3. Sets up CI/CD quality gates, deployment strategies and rollback plans for agents

    • Open source
    • 122K GitHub stars
    • Developer tools
  4. Guides an agent through multi-axis code review before changes are merged

    • Open source
    • 122K GitHub stars
    • Developer tools
  5. Guides an agent to simplify working code for clarity without changing behavior

    • Open source
    • 122K GitHub stars
    • Developer tools
  6. Turns a project's quality bar into a written, checkable contract for coding agents

    • Open source
    • 122K GitHub stars
    • Developer tools