AgentSkillsCN

api-design

设计API端点、模式和契约。在定义公共接口或数据模型时使用。

SKILL.md
--- frontmatter
name: api-design
description: Design API endpoints, schemas, and contracts. Use when defining public interfaces or data models.

API Design

Define the interface contracts for APIs, including endpoints, request/response schemas, and error handling.

Process

  1. Review spec.md and architecture.md
  2. Define endpoints and HTTP methods
  3. Design request and response schemas
  4. Define error responses and codes
  5. Consider versioning strategy

Output

Create api-design.md using the template in templates/api-design.md.

Tips

  • Use consistent naming conventions
  • Design for backwards compatibility
  • Include example payloads
  • Document rate limits if applicable
  • Consider pagination for list endpoints