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 implementationReady-made contract-validation script (read-only) in scripts/.
scripts/01-openapi-lint.sh -- OpenAPI structural validity and REST design-smell linttools
kubectl command-line usage and scripting: kubeconfig and context management, output formats (jsonpath, custom-columns, go-template), all major verbs (get, describe, apply, delete, exec, logs, port-forward, rollout, scale, drain), workload resources, config/storage, networking, RBAC, node management, debugging (CrashLoopBackOff, ImagePullBackOff, OOMKilled), and scripting patterns (dry-run, diff, wait, jq, kustomize). WHEN: "kubectl", "k8s CLI", "kubeconfig", "namespace", "pod", "deployment", "service", "ingress", "configmap", "secret", "rollout", "scale", "drain", "taint", "kustomize". Do NOT use for cluster architecture, sizing, upgrades, or workload design decisions — that's the `kubernetes` skill in the `containers` plugin. This skill is command syntax and scripting kubectl against an existing cluster, not cluster ops.
tools
Bash 5.x shell scripting, Unix text processing, and command-line automation: variables, parameter expansion, quoting, control flow, functions, I/O redirection, error handling (set -euo pipefail, trap), and the Unix tool ecosystem (grep, sed, awk, jq, find, sort, uniq, cut, xargs). Covers process management, networking (curl, ssh, rsync, nc), file locking (flock), parallel execution, and production script patterns. WHEN: "Bash", "bash", "shell", "sh", ".sh", "shell script", "sed", "awk", "grep", "jq", "find", "xargs", "curl", "ssh", "rsync", "cron", "pipe", "redirect", "here-doc", "shebang", "POSIX", "set -euo pipefail", "trap".
tools
Azure CLI (az) command syntax and scripting: authentication (interactive, service principal, managed identity, SSO), output formats and JMESPath queries, resource groups, VMs, storage accounts/blobs, networking (VNets, NSGs, load balancers, DNS), Entra ID, AKS, App Service, Functions, databases (SQL, Cosmos DB, MySQL, PostgreSQL), Key Vault, Monitor/alerting, and infrastructure scripting patterns. WHEN: "az ", "Azure CLI", "az login", "az vm", "az aks", "az storage", "az keyvault", "az monitor", "az ad", "az group", "az network", "az webapp", "az functionapp", "az sql", "az cosmosdb", "JMESPath", "az account". Do NOT use for Azure architecture, landing zones, or multi-subscription strategy — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.
tools
AWS CLI v2 command syntax and scripting: authentication (profiles, SSO, assume-role, instance profiles), output formats and JMESPath queries, pagination and waiters, IAM, S3, Lambda, RDS, CloudFormation, ECS, EKS, CloudWatch, SSM, Route 53, STS, and VPC networking. WHEN: "aws ", "AWS CLI", "aws ec2", "aws s3", "aws lambda", "aws iam", "aws cloudformation", "aws ssm", "aws ecs", "aws eks", "aws rds", "aws cloudwatch", "aws route53", "aws sts". Do NOT use for AWS architecture, service selection, multi-account strategy, or FinOps — that's the `cloud-platforms` plugin. This skill is about command syntax and scripting the CLI, not deciding what to provision.