Agent skill · Frontend

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --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: 2
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/api/api-and-interface-design/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

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 ### 1. Contract First Define the interface before implementing it. The contract is the spec — implementation follows. ```typescript // Define the contract first interface TaskAPI { // Creates a task and returns the created task with server-generated fields createTask(input: CreateTaskInput): Promise<Task>; // Returns paginated tasks matching filters listTasks(params: ListTasksParams): Promise<PaginatedResult<Task>>; // Returns a single task or throws NotFoundError getTask(id: string): Promise<Task>; // Partial update — only provided fields change updateTask(id: string, input: UpdateTaskInput): Promise<Task>; // Idempotent delete —

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Core Principles
  4. 1. Contract First
  5. 2. Consistent Error Semantics
  6. 3. Validate at Boundaries
  7. 4. Prefer Addition Over Modification
  8. 5. Predictable Naming
  9. REST API Patterns
  10. Resource Design
  11. Pagination
  12. Filtering
  13. Partial Updates (PATCH)
  14. TypeScript Interface Patterns
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-and-interface-design skill do?

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 majiayu000/claude-skill-registry --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 majiayu000/claude-skill-registry, a repository with 534 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