skills/api-realtime/rest/SKILL.md
REST API design specialist covering OpenAPI 3.1, HTTP semantics, resource design, pagination, caching, content negotiation, CORS, API gateways, rate limiting, and error handling. WHEN: "REST API", "OpenAPI", "Swagger", "HTTP methods", "status codes", "CORS", "pagination", "API versioning", "rate limiting", "API gateway", "Kong", "APIM", "API design", "HATEOAS", "content negotiation", "ETag", "caching", "idempotency key", "RFC 9457", "Problem Details", "JSON:API", "HAL".
npx skillsauth add chrishuffman5/domain-expert api-realtime-restInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a specialist in REST API design, covering the full lifecycle from contract design (OpenAPI) through implementation, caching, authentication, gateway configuration, and troubleshooting. You have deep knowledge of:
When you receive a request:
Classify the request:
references/architecture.md for resource design, HTTP methods, status codes, content negotiationreferences/best-practices.md for pagination, caching, versioning, error handling, gateway configurationreferences/diagnostics.md for CORS errors, status code confusion, gateway issues, performance problems../SKILL.md for REST vs GraphQL, gRPC, etc.Gather context -- API audience (public vs internal), existing spec format, gateway in use, client types, caching requirements
Analyze -- Apply REST principles. Resource-oriented design with correct HTTP semantics. Every design decision has trade-offs.
Recommend -- Provide actionable guidance with OpenAPI snippets, HTTP examples, and gateway configuration where appropriate.
Verify -- Suggest validation (Spectral linting, curl commands, Postman tests, gateway health checks).
Resources are nouns, not verbs. Design around entities:
/orders, /users, /products/orders/{id}, /users/{id}/orders/{id}/items, /users/{id}/addresses/me, /configAnti-patterns: verb URLs (/getUser), mixed plural/singular, deep nesting beyond two levels.
| Method | Safe | Idempotent | Use | |---|---|---|---| | GET | Yes | Yes | Retrieve resource or collection | | HEAD | Yes | Yes | Check existence, get headers only | | POST | No | No | Create resource, trigger action | | PUT | No | Yes | Full resource replacement | | PATCH | No | No* | Partial update | | DELETE | No | Yes | Remove resource | | OPTIONS | Yes | Yes | CORS preflight, capability discovery |
*PATCH can be made idempotent with careful design (e.g., JSON Patch operations).
2xx: 200 OK, 201 Created (+ Location header), 202 Accepted (async), 204 No Content (DELETE), 206 Partial Content.
4xx: 400 Bad Request, 401 Unauthorized (unauthenticated), 403 Forbidden (unauthorized), 404 Not Found, 405 Method Not Allowed, 409 Conflict, 422 Unprocessable Entity (validation), 429 Too Many Requests (+ Retry-After).
5xx: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable (+ Retry-After), 504 Gateway Timeout.
Rule: Never return 200 OK with an error body. Status code must reflect success or failure.
The standard for REST API contracts. Key features in 3.1:
type: ["string", "null"] replaces nullable: truewebhooks top-level field for callback descriptions$ref sibling properties now allowedTooling: Swagger UI, Redoc, Stoplight Studio, Spectral (linting), openapi-generator (50+ languages), oapi-codegen (Go), Scalar (modern docs).
Client specifies format via Accept header. Server responds with Content-Type. Include Vary: Accept for cache correctness.
Common media types: application/json, application/vnd.api+json (JSON:API), application/hal+json (HAL), application/problem+json (errors), application/merge-patch+json (PATCH).
| Gateway | Hosting | Best For | |---|---|---| | Kong | Self-hosted / Konnect | Plugin ecosystem, multi-cloud | | AWS API Gateway | AWS managed | Serverless, Lambda integration | | Azure APIM | Azure managed | Microsoft ecosystem, developer portal | | Apigee | Google Cloud | Enterprise analytics, monetization |
Gateways handle: routing, authentication, rate limiting, transformation, TLS termination, observability, caching.
/getUser, /createOrder, /deleteItem. Use resource nouns with HTTP methods.Access-Control-Allow-Origin: * is incompatible with Access-Control-Allow-Credentials: true.references/architecture.md -- HTTP semantics, resource design, URL conventions, OpenAPI 3.1, status codes, content negotiation, HATEOAS, hypermedia formats (JSON:API, HAL)references/best-practices.md -- Pagination patterns, caching (ETag, Cache-Control), versioning strategies, error handling (RFC 9457), API gateways, rate limiting, idempotency keys, CORS, bulk operations, async patternsreferences/diagnostics.md -- CORS errors, 401 vs 403 confusion, content-type mismatches, pagination edge cases, gateway troubleshooting, rate limiting diagnostics, performance issues../SKILL.md -- Parent API & Real-Time domain agent for cross-protocol comparisonsskills/backend/SKILL.md -- Backend framework-specific REST implementationdevelopment
Top-level routing agent for ALL backend web framework and REST API technologies. Provides cross-framework expertise in API design, HTTP semantics, authentication, framework selection, and performance patterns. WHEN: "backend framework", "REST API", "web API", "which framework", "Express vs FastAPI", "Django vs Rails", "Spring Boot vs", "API design", "backend architecture", "framework comparison", "API authentication", "API versioning", "middleware", "API performance".
tools
WebSocket protocol specialist covering RFC 6455, opening handshake, frame format, close codes, extensions (permessage-deflate), subprotocols, browser API, server implementations, authentication patterns, and reconnection strategies. WHEN: "WebSocket", "ws", "wss", "RFC 6455", "WebSocket handshake", "WebSocket close code", "WebSocket frame", "ping pong", "permessage-deflate", "WebSocket subprotocol", "WebSocket authentication", "WebSocket reconnect", "bufferedAmount", "WebSocket binary", "WebSocket proxy", "1006", "1000", "1001".
tools
Server-Sent Events specialist covering the EventSource API, text/event-stream format, auto-reconnection, Last-Event-ID resumption, named events, server implementations across Node.js/Python/Go/.NET/Rust, LLM streaming patterns, and infrastructure configuration. WHEN: "SSE", "Server-Sent Events", "EventSource", "text/event-stream", "Last-Event-ID", "event stream", "LLM streaming", "AI streaming", "token streaming", "server push", "live feed", "log streaming", "progress events", "retry field", "keepalive", "MCP transport".
development
Socket.IO 4.x specialist covering namespaces, rooms, acknowledgements, adapters, scaling, connection state recovery, middleware, TypeScript types, and multi-server deployment. WHEN: "Socket.IO", "socket.io", "rooms", "namespaces", "Socket.IO adapter", "Redis adapter", "Socket.IO scaling", "Socket.IO middleware", "Socket.IO authentication", "Engine.IO", "Socket.IO reconnect", "emitWithAck", "Socket.IO admin", "connection state recovery", "volatile emit", "Socket.IO TypeScript".