Api design

From Xiaowen-Jiang/agent-enterprise · View interactive version

Api design is an AI agent skill from the GitHub repository Xiaowen-Jiang/agent-enterprise. Design RESTful APIs with endpoint specifications, request/response schemas, and error handling

How to use this skill

Skill file

Process

  1. Identify resources — Map the domain entities to REST resources (nouns, not verbs)
  2. Define endpoints — GET, POST, PUT/PATCH, DELETE for each resource
  3. Design request/response schemas — JSON payloads with field types, required/optional
  4. Error handling — Standard error response format with HTTP status codes
  5. Pagination & filtering — Cursor or offset-based pagination, query parameters for filtering
  6. Authentication — Specify auth method (API key, Bearer token, OAuth)
  7. Versioning — URL prefix (/api/v1) or header-based versioning strategy

Output Format

For each endpoint, provide:

### [METHOD] /api/resource
Description: What this endpoint does
Auth: Required / Optional
Request Body:
  { field: type (required/optional) }
Response 200:
  { field: type }
Error Responses:
  400: Validation error
  404: Resource not found

Guidelines

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.