api-design

v2026.09.25

Use when designing new REST APIs, reviewing API designs, establishing API standards, designing request/response formats, pagination, versioning, authentication flows, or creating OpenAPI specifications.

GitHub
Install command
npx skhub add srstomp/api-design
Markdown
SKILL.md

API Design

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

When NOT to Use

  • Consuming external APIs — Use api-integration for building clients to call third-party services (Stripe, Twilio, etc.)
  • Writing tests for APIs — Use testing-strategy for contract tests, integration tests, mocking strategies
  • Reviewing existing API security — Use security-audit for vulnerability scanning of live endpoints
  • Designing auth mechanisms that are the whole task — Use security-audit if reviewing, this skill if designing from scratch

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

MethodPurposeIdempotentBody
GETReadYesNo
POSTCreateNoYes
PUTReplaceYesYes
PATCHPartial updateYes*Yes
DELETERemoveYesNo

References

ReferenceDescription
endpoints.mdURL design, HTTP methods, resource modeling
requests-responses.mdRequest/response formats, headers, content types
status-codes.mdHTTP status codes, error handling patterns
pagination-filtering.mdPagination, filtering, sorting, searching
versioning.mdAPI versioning strategies
openapi.mdOpenAPI specification, documentation
security.mdAuthentication, authorization, rate limiting
tdd-patterns.mdTest-first patterns for REST endpoints, supertest templates
review-checklist.mdAPI design review checklist (validation, auth, performance, docs)
Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.25

Published

Sep 25, 2026

Category

Uncategorized

License

MIT

Source path

plugins/pokayokay/skills/api-design

Default branch

master

Latest commit

ef6a34d

Tree SHA

7e3eba3