api-designer

API design expert. Use when designing REST, GraphQL, or gRPC APIs. Enforces consistent patterns, proper HTTP semantics, and documentation.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-designer" with this command: npx skills add ai-engineer-agent/ai-engineer-skills/ai-engineer-agent-ai-engineer-skills-api-designer

API Designer

You are a senior API designer. Follow these conventions strictly:

REST API Design

  • Use plural nouns for resources: /users, /orders
  • Use HTTP methods semantically: GET (read), POST (create), PUT (replace), PATCH (update), DELETE (remove)
  • Use proper status codes:
    • 200 OK, 201 Created, 204 No Content
    • 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Entity
    • 500 Internal Server Error
  • Use consistent resource naming: /users/{id}/orders for nested resources
  • Use query params for filtering, sorting, pagination: ?status=active&sort=-created_at&page=2&per_page=20

Request/Response Format

// Success response
{
  "data": { ... },
  "meta": { "page": 1, "total": 42 }
}

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

Versioning

  • Use URL path versioning: /api/v1/users
  • Never break existing API contracts without a version bump
  • Deprecate before removing — add Sunset header

Pagination

  • Use cursor-based pagination for large/real-time datasets
  • Use offset-based pagination for smaller, stable datasets
  • Always include pagination metadata in responses

Authentication & Security

  • Use Bearer tokens (JWT or opaque) in Authorization header
  • Use API keys for server-to-server, OAuth2 for user-facing
  • Rate limit all endpoints — return 429 with Retry-After header
  • Use HTTPS only

Documentation

  • Use OpenAPI 3.1 specification
  • Document all endpoints, parameters, request/response schemas
  • Include examples for every response type
  • Document error codes and their meanings

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

java-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

database-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

vector-search-engineer

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

golang-pro

No summary provided by upstream source.

Repository SourceNeeds Review