api-design

📁 srstomp/pokayokay 📅 Jan 24, 2026
15
总安装量
6
周安装量
#22414
全站排名
安装命令
npx skills add https://github.com/srstomp/pokayokay --skill api-design

Agent 安装分布

claude-code 3
github-copilot 3
codex 3
gemini-cli 3
opencode 3
trae 2

Skill 文档

API Design

Design clear, consistent, and developer-friendly REST APIs.

Core Principles

  • Resource-oriented — Design around nouns (resources), not verbs (actions)
  • Predictable patterns — Consistent URL structure, response format, and behavior
  • Clear contracts — Explicit schemas, documented errors, versioned endpoints
  • Developer experience — Meaningful errors, helpful examples, logical defaults

Quick Start Checklist

  1. Identify resources and their relationships
  2. Define CRUD operations + custom actions with correct HTTP methods
  3. Design request/response schemas with consistent envelope
  4. Plan error format with status codes, error codes, and field-level details
  5. Write OpenAPI specification with examples
  6. Review for consistency, security, and usability

Design Quick Reference

Method Purpose Idempotent Body
GET Read Yes No
POST Create No Yes
PUT Replace Yes Yes
PATCH Partial update Yes* Yes
DELETE Remove Yes No

References

Reference Description
endpoints.md URL design, HTTP methods, resource modeling
requests-responses.md Request/response formats, headers, content types
status-codes.md HTTP status codes, error handling patterns
pagination-filtering.md Pagination, filtering, sorting, searching
versioning.md API versioning strategies
openapi.md OpenAPI specification, documentation
security.md Authentication, authorization, rate limiting