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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 —
- Overview
- When to Use
- Core Principles
- 1. Contract First
- 2. Consistent Error Semantics
- 3. Validate at Boundaries
- 4. Prefer Addition Over Modification
- 5. Predictable Naming
- REST API Patterns
- Resource Design
- Pagination
- Filtering
- Partial Updates (PATCH)
- TypeScript Interface Patterns
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.
