MCPInstall

api-design

Use when designing API endpoints, defining request/response schemas, generating OpenAPI specifications, choosing between REST/GraphQL/tRPC, or establishing API conventions for a project

Installs
81
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/pixel-process-ug/superkit-agents --skill api-design
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads api-design automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

API Design

Overview

Structured API endpoint design through guided discovery. Produces consistent, well-documented API designs with OpenAPI/Swagger specifications. Covers resource modeling, authentication, pagination, error handling, and versioning — ensuring consumer-centric design before any implementation begins.

Announce at start: "I'm using the api-design skill to design the API."

Phase 1: Discovery

Ask these questions ONE AT A TIME:

Resource Questions

#QuestionWhat It Determines
1What entities/resources does this API manage?Resource naming
2What are the relationships between them?Nested routes, includes
3What operations are needed for each? (CRUD, search, batch)HTTP methods, endpoints

Consumer Questions

#QuestionWhat It Determines
4Who will consume this API? (frontend, mobile, third-party, internal)Response shape, auth model
5What authentication/authorization is needed?Security scheme
6What rate limits or quotas apply?Rate limiting headers

Constraint Questions

#QuestionWhat It Determines
7REST, GraphQL, or tRPC?API paradigm
8Versioning strategy? (URL path, header, query param)URL structure
9Pagination approach? (cursor, offset, keyset)List response shape
10Existing API conventions in the codebase?Consistency constraints

API Paradigm Decision Table

FactorChoose RESTChoose GraphQLChoose tRPC
ConsumersMultiple, diverseFrontend-heavy, flexible queriesTypeScript monorepo
Caching needsStrong (HTTP caching)Moderate (client-side)Low (internal only)
Data shapePredictable, resource-orientedNested, variable-shapeType-safe RPC
Team familiarityUniversalRequires schema knowledgeRequires TypeScript
Real-time needsWebSocket addonSubscriptions built-inSubscription support

STOP after discovery — present a summary of resources, operations, and constraints. Get confirmation before designing endpoints.

Phase 2: Design Endpoints

For each endpoint, define:

### [METHOD] /api/v1/[resource]

**Purpose:** [what this endpoint does]

**Request:**
- Headers: `Authorization: Bearer <token>`
- Query params: `?page=1&limit=20&sort=created_at:desc`
- Body:
  ```json
  {
    "field": "type — description"
  }

Response (200):

{
  "data": [...],
  "meta": { "total": 100, "page": 1, "limit": 20 }
}

Error Responses:

StatusCodeDescription
400VALIDATION_ERRORInvalid request body
401UNAUTHORIZEDMissing or invalid token
404NOT_FOUNDResource doesn't exist
409CONFLICTResource already exists

Authorization: [who can access this]


### HTTP Method Decision Table

| Operation | Method | Status (success) | Idempotent |
|-----------|--------|-----------------|------------|
| List resources | GET | 200 | Yes |
| Get single resource | GET | 200 | Yes |
| Create resource | POST | 201 | No |
| Full replace | PUT | 200 | Yes |
| Partial update | PATCH | 200 | No |
| Delete resource | DELETE | 204 | Yes |
| Bulk create | POST | 201 | No |
| Search (complex) | POST | 200 | Yes (safe) |

### Pagination Decision Table

| Approach | When to Use | Pros | Cons |
|----------|------------|------|------|
| **Cursor** | Real-time feeds, large datasets | Consistent, no skipping | Cannot jump to page N |
| **Offset** | Small datasets, admin panels | Simple, jumpable | Skips/duplicates on insert |
| **Keyset** | Time-series, logs | Efficient on large tables | Requires sortable key |

### Error Response Format

All endpoints must use a consistent error shape:

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Human-readable description",
    "details": [
      { "field": "email", "message": "Invalid email format" }
    ]
  }
}

Status Code Reference

CodeMeaningWhen to Use
200OKSuccessful GET, PUT, PATCH
201CreatedSuccessful POST that creates
204No ContentSuccessful DELETE
400Bad RequestValidation failure
401UnauthorizedMissing or invalid credentials
403ForbiddenValid credentials, insufficient permissions
404Not FoundResource does not exist
409ConflictDuplicate or state conflict
422Unprocessable EntityValid JSON but semantic error
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server failure

STOP after endpoint design — present each endpoint for review and approval.

Phase 3: Generate OpenAPI Spec

openapi: 3.1.0
info:
  title: [API Name]
  version: 1.0.0
  description: [API description]

servers:
  - url: http://localhost:3000/api/v1
    description: Development
  - url: https://api.example.com/v1
    description: Production

paths:
  /resource:
    get:
      summary: List resources
      parameters: [...]
      responses: [...]
    post:
      summary: Create resource
      requestBody: [...]
      responses: [...]

components:
  schemas: [...]
  securitySchemes: [...]

STOP after spec generation — validate the YAML and present for final approval.

Phase 4: Save and Transition

After explicit approval:

  1. Save OpenAPI spec to docs/api/YYYY-MM-DD-<api-name>.yaml
  2. Commit with message: docs(api): add OpenAPI spec for <api-name>
  3. Determine next step based on user intent

Transition Decision Table

User IntentNext SkillRationale
"Let's implement this"planningCreate implementation plan from API spec
"Write specs for this"spec-writingBehavioral specs for each endpoint
"Generate client SDK"ManualUse OpenAPI codegen tools
"Just save the design"NoneAPI design is the deliverable
"Add tests"testing-strategyDefine API test approach

Design Principles

PrincipleRule
Consistent namingPlural nouns for collections (/users, not /user)
Proper HTTP methodsGET reads, POST creates, PUT replaces, PATCH updates, DELETE removes
Proper status codesUse the right code for the right situation (see table above)
Consistent error formatSame error shape across all endpoints
Pagination by defaultAll list endpoints paginated
Filtering and sortingQuery params for list endpoints
IdempotencyPUT and DELETE are always idempotent
HATEOASInclude links for discoverability (when appropriate)

Anti-Patterns / Common Mistakes

MistakeWhy It Is WrongWhat To Do Instead
Verb-based URLs (/getUsers)Not RESTful, breaks conventionsUse nouns: GET /users
Inconsistent plural/singularConfuses consumersAlways plural for collections
Returning 200 for errorsHides failures from clientsUse proper status codes
No pagination on list endpointsPerformance bomb on large datasetsAlways paginate
Different error formats per endpointClients can't build generic error handlingOne error shape for all
Exposing internal IDs in URLsSecurity and coupling riskUse UUIDs or slugs
No versioning strategyBreaking changes break clientsVersion from day one
Designing without knowing consumersAPI serves no one wellDiscovery phase first

Anti-Rationalization Guards

  • Do NOT skip the discovery phase — understand consumers and constraints first
  • Do NOT design endpoints without defining error responses
  • Do NOT skip pagination for any list endpoint
  • Do NOT use inconsistent naming across endpoints
  • Do NOT generate the OpenAPI spec without user approval of endpoint designs
  • Do NOT mix API paradigms (REST + GraphQL) without explicit justification

Integration Points

SkillRelationship
spec-writingDownstream: API design informs behavioral specifications
planningDownstream: API endpoints become implementation tasks
tech-docs-generatorDownstream: OpenAPI spec feeds API reference docs
testing-strategyDownstream: API design informs integration test strategy
security-reviewDownstream: auth/authz model reviewed for vulnerabilities
database-schema-designUpstream: data model informs resource design
prd-generationUpstream: PRD requirements drive API resource identification

Verification Gate

Before claiming the API design is complete:

  1. VERIFY all endpoints have request/response schemas
  2. VERIFY all error responses are documented with consistent format
  3. VERIFY authentication is specified for each endpoint
  4. VERIFY pagination is defined for all list endpoints
  5. VERIFY the OpenAPI spec is valid YAML
  6. VERIFY user has approved each endpoint individually

Skill Type

Flexible — Adapt API paradigm, pagination style, and auth model to project needs while preserving the discovery-first approach, consistent error handling, and consumer-centric design principles.

FAQ

What does the api-design skill do?

Use when designing API endpoints, defining request/response schemas, generating OpenAPI specifications, choosing between REST/GraphQL/tRPC, or establishing API conventions for a project

How do I install api-design?

Run npx skills add https://github.com/pixel-process-ug/superkit-agents --skill api-design in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/api-design/ (personal) or .claude/skills/api-design/ (project).

Which AI agents can use api-design?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is api-design safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains api-design?

It is published by pixel-process-ug in pixel-process-ug/superkit-agents. It has 81 recorded installs.

More from pixel-process-ug/superkit-agents

View all →

ui-ux-pro-max

pixel-process-ug/superkit-agents

Use when the user needs full UI/UX design intelligence — styles, palettes, fonts, UX guidelines, chart selection, and accessible, performant implementation across any supported stack. Triggers: user says "design", "UI", "UX", "color palette", "typography", "accessibility", "responsive design", "chart type", "style guide", building any user-facing interface.

Frontend & Design1.2K installs

frontend-ui-design

pixel-process-ug/superkit-agents

Use when designing UI components, creating component architectures, implementing responsive layouts, setting up design systems, or selecting state management solutions for frontend applications

Frontend & Design117 installs

reverse-engineering-specs

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

107 installs

canvas-design

pixel-process-ug/superkit-agents

Use when the user needs HTML Canvas, SVG graphics, data visualization, generative art, or interactive visual elements with D3.js or similar libraries. Triggers: user says "canvas", "SVG", "chart", "data visualization", "D3", "generative art", "animation", "interactive graphics", drawing on screen.

Media & Creative90 installs

autonomous-loop

pixel-process-ug/superkit-agents

Use when running Ralph-style iterative autonomous development. Triggers on /ralph or /loop commands, when autonomous iterative development is needed, when a project has specs and an implementation plan ready for iterative execution, or when deterministic context loading with subagent delegation and dual-condition exit gates is required. Orchestrates PLANNING, BUILDING, and STATUS cycles.

mobile-design

pixel-process-ug/superkit-agents

Open the skill to read its SKILL.md instructions.

Mobile87 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs