Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when designing or reviewing APIs — REST, GraphQL, tRPC, or gRPC. Trigger on keywords: API design, REST, GraphQL, tRPC, gRPC, endpoint, schema, route, OpenAPI, Swagger, API versioning, pagination, API contract, HTTP methods.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 13% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 62% | 0% |
| Type | Best For | Avoid When | |---|---|---| | REST | Public APIs, CRUD, simple clients, IoT | Complex nested data, rapid schema iteration | | GraphQL | Mobile apps, complex nested data, multiple clients | Simple CRUD, small teams new to it | | tRPC | TypeScript monorepos, internal full-stack TS APIs | Non-TypeScript clients, public APIs | | gRPC | High-performance microservice comms, streaming | Browser clients, simple use cases |
textGET /users ← list GET /users/{id} ← single POST /users ← create PUT /users/{id} ← replace PATCH /users/{id} ← partial update DELETE /users/{id} ← delete # Nested resources GET /users/{id}/orders POST /users/{id}/orders # Actions (when REST verbs aren't enough) POST /orders/{id}/cancel POST /users/{id}/activate
| Code | Use When | |---|---| | 200 | Successful GET, PUT, PATCH | | 201 | Successful POST that creates | | 204 | Successful DELETE (no body) | | 400 | Validation failure, bad request | | 401 | Missing/invalid authentication | | 403 | Authenticated but not authorized | | 404 | Resource not found | | 409 | Conflict (duplicate, version mismatch) | | 422 | Unprocessable entity (semantic errors) | | 429 | Rate limit exceeded | | 500 | Unexpected server error |
json// Collection { "data": [...], "meta": { "total": 100, "page": 1, "perPage": 20 } } // Single resource { "data": { "id": "1", "name": "James" } } // Error { "error": { "code": "VALIDATION_ERROR", "message": "Validation failed", "details": [{ "field": "email", "issue": "Invalid format" }] } }
text# URL versioning (most visible, easiest to route) /v1/users /v2/users # Header versioning (cleaner URLs) Accept: application/vnd.api+json;version=2
Never break existing clients. Deprecate, then remove.
text# Offset (simple, good for small datasets) GET /posts?page=2&perPage=20 # Cursor (fast for large datasets, use for infinite scroll) GET /posts?cursor=eyJpZCI6MTAwfQ&limit=20
textGET /orders?status=pending&userId=123 GET /products?sort=-price,name # - prefix = descending GET /products?fields=id,name,price # sparse fieldsets
text# Include idempotency key for non-idempotent operations POST /payments Idempotency-Key: unique-client-generated-uuid
graphqltype Query { user(id: ID!): User users(filter: UserFilter, pagination: PaginationInput): UserConnection! } type Mutation { createUser(input: CreateUserInput!): CreateUserPayload! updateUser(id: ID!, input: UpdateUserInput!): UpdateUserPayload! } type UserConnection { edges: [UserEdge!]! pageInfo: PageInfo! totalCount: Int! }
Other measured skills in the registry, with their headline benchmark lift.