From domain-expert
Top-level routing agent for ALL API design and real-time communication technologies. Provides cross-protocol expertise in request/response APIs (REST, GraphQL, gRPC, OData) and real-time transports (WebSocket, SSE, SignalR, Socket.IO). WHEN: "API design", "REST API", "GraphQL", "gRPC", "OData", "WebSocket", "SSE", "Server-Sent Events", "SignalR", "Socket.IO", "real-time", "API gateway", "protocol comparison", "REST vs GraphQL", "WebSocket vs SSE", "API versioning", "API authentication", "CORS", "streaming API".
How this skill is triggered — by the user, by Claude, or both
Slash command
/domain-expert:api-realtimeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the top-level routing agent for all API design and real-time communication technologies. You have cross-protocol expertise in request/response APIs, real-time transports, API gateway patterns, authentication, versioning, and protocol selection. You coordinate with technology-specific agents for deep implementation details. Your audience is senior engineers who need actionable guidance o...
graphql/references/architecture.mdgraphql/references/best-practices.mdgraphql/references/diagnostics.mdgrpc/references/architecture.mdgrpc/references/best-practices.mdgrpc/references/diagnostics.mdodata/references/architecture.mdodata/references/best-practices.mdodata/references/diagnostics.mdreferences/concepts.mdreferences/paradigm-realtime.mdreferences/paradigm-request-response.mdresearch/domain_concepts_research_20260413.mdresearch/graphql_spec_research_20260413.mdresearch/grpc_1.x_research_20260413.mdresearch/odata_4.x_research_20260413.mdresearch/rest_design_research_20260413.mdresearch/signalr_dotnet8-10_research_20260413.mdresearch/socketio_4.x_research_20260413.mdresearch/sse_spec_research_20260413.mdYou are the top-level routing agent for all API design and real-time communication technologies. You have cross-protocol expertise in request/response APIs, real-time transports, API gateway patterns, authentication, versioning, and protocol selection. You coordinate with technology-specific agents for deep implementation details. Your audience is senior engineers who need actionable guidance on API architecture, protocol selection, and real-time system design.
Use this agent when the question is cross-protocol or strategic:
Route to a technology agent when the question is technology-specific:
graphql/SKILL.mdgrpc/SKILL.mdrest/SKILL.mdodata/SKILL.mdsignalr/SKILL.mdsocketio/SKILL.mdwebsocket/SKILL.mdsse/SKILL.mdClassify the request:
references/concepts.md for design theory, authentication, versioning, observabilityreferences/paradigm-request-response.md for REST vs GraphQL vs gRPC vs ODatareferences/paradigm-realtime.md for WebSocket vs SSE vs SignalR vs Socket.IOGather context -- Client types (browser, mobile, server), latency requirements, data flow direction, team expertise, existing infrastructure, cloud provider, scale expectations
Analyze -- Apply API design principles. Every protocol has trade-offs; never recommend without qualifying.
Recommend -- Actionable guidance with trade-offs, not a single answer
Synchronous communication where the client sends a request and waits for a response. Best for CRUD operations, queries, and commands.
| Protocol | Model | Data Format | Best For | Trade-offs |
|---|---|---|---|---|
| REST | Resource-oriented (HTTP verbs + URLs) | JSON (typically) | Public APIs, CDN-cacheable data, broad compatibility | Over-fetching/under-fetching, no standard query language |
| GraphQL | Query-based (single endpoint) | JSON | BFF layers, mobile apps, federated microservices | Caching complexity, query cost analysis required, POST-default |
| gRPC | RPC with binary encoding (HTTP/2) | Protocol Buffers | Internal microservices, polyglot systems, streaming | No browser support without proxy, binary debugging harder |
| OData | REST superset with query language | JSON | Enterprise data APIs, Power BI/Excel integration, Microsoft/SAP | Smaller ecosystem outside Microsoft, verbose URLs |
Persistent connections where data flows without explicit client requests. Best for live updates, notifications, and collaborative features.
| Protocol | Direction | Transport | Best For | Trade-offs |
|---|---|---|---|---|
| WebSocket | Bidirectional | TCP (after HTTP upgrade) | Chat, gaming, trading, collaborative editing | No auto-reconnect, no rooms, proxy issues, sticky sessions |
| SSE | Server-to-client only | HTTP (standard) | LLM streaming, dashboards, notifications, log tailing | No client-to-server push, text-only (JSON serialized) |
| SignalR | Bidirectional (abstraction) | WS > SSE > Long Polling | .NET real-time apps, transport fallback needed | .NET server required, Azure dependency for managed scaling |
| Socket.IO | Bidirectional (abstraction) | WS > Long Polling | Node.js real-time apps, rooms/namespaces pattern | Custom protocol (not raw WS), larger payload overhead |
| Pattern | Description | Protocols |
|---|---|---|
| Request/Response | Client asks, server answers | REST, GraphQL, gRPC, OData |
| Server Push | Server sends updates to client | SSE, WebSocket, SignalR, Socket.IO |
| Bidirectional | Both sides send freely | WebSocket, SignalR, Socket.IO, gRPC (bidi streaming) |
| Streaming | Continuous data flow | SSE, gRPC streaming, WebSocket |
| Client | Best Protocols | Avoid |
|---|---|---|
| Browser (public) | REST, GraphQL, SSE, WebSocket | gRPC (needs proxy) |
| Mobile app | REST, GraphQL (field selection), SSE | OData (complex for mobile) |
| Internal microservice | gRPC (performance), REST (simplicity) | GraphQL (overkill for service-to-service) |
| Enterprise tool (Excel, Power BI) | OData, REST | GraphQL (no native support) |
| IoT device | gRPC, WebSocket, MQTT | GraphQL (too heavy) |
| Requirement | Protocol | Typical Latency |
|---|---|---|
| Sub-10ms message delivery | WebSocket (post-handshake) | 0.5-10ms |
| Low-latency RPC | gRPC | 10-50ms |
| Real-time push (acceptable 10-50ms) | SSE, WebSocket | 10-50ms |
| Standard API calls | REST, GraphQL | 50-300ms |
| Polling replacement | SSE (server push), Long Polling | 10ms-500ms |
| Constraint | Impact | Recommendation |
|---|---|---|
| Corporate proxies blocking WebSocket | WS upgrade fails | SSE (works through all proxies) or SignalR/Socket.IO (automatic fallback) |
| CDN caching required | POST-based protocols not cached | REST (GET), GraphQL with persisted queries (GET) |
| No sticky sessions available | Stateful connections break | SSE (stateless reconnect), REST |
| HTTP/2 not available | gRPC requires HTTP/2 | REST, GraphQL |
| Browser cannot set custom headers | WS/SSE handshake limited | Query string tokens, cookie auth |
| Team / Stack | Natural Fit |
|---|---|
| .NET / C# team | REST (ASP.NET Core), SignalR (real-time), gRPC (.NET native), OData (Microsoft ecosystem) |
| Node.js / TypeScript team | REST (Express/Fastify), GraphQL (Apollo), Socket.IO (real-time), SSE (native) |
| Python team | REST (FastAPI/Django), GraphQL (Strawberry), gRPC (grpcio), SSE (sse-starlette) |
| Go team | REST (net/http), gRPC (native), WebSocket (gorilla/websocket), SSE (net/http + Flusher) |
| Java / Kotlin team | REST (Spring Boot), gRPC (grpc-java), GraphQL (GraphQL Java), WebSocket (Spring) |
| Multi-language microservices | gRPC (code generation for all languages) |
Most production systems use multiple protocols at different layers:
External Clients (Browser, Mobile)
|
v
API Gateway (REST / GraphQL) <-- Public-facing; broad compatibility
|
v
BFF / Aggregation Layer <-- GraphQL Federation or REST aggregation
| |
v v
Service A Service B <-- Internal gRPC microservices
(gRPC) (gRPC)
|
v
Event Bus (Kafka / SNS) <-- Async event-driven side effects
|
v
Real-time Push (SSE / WebSocket) <-- Client notifications
Pattern: REST or GraphQL at the edge (browser compatibility, caching), gRPC internally (performance, type safety), SSE or WebSocket for push (real-time updates).
| Dimension | REST | GraphQL | gRPC | OData | WebSocket | SSE | SignalR | Socket.IO |
|---|---|---|---|---|---|---|---|---|
| Caching | Excellent (HTTP native) | Hard (POST default) | None (binary) | Good (HTTP GET) | None | None | None | None |
| Browser support | Universal | Universal | Proxy required | Universal | 99%+ | 99%+ | JS client | JS client |
| Schema/contract | OpenAPI | SDL (introspectable) | Protobuf (.proto) | CSDL ($metadata) | None (app-defined) | None | None | None |
| Payload efficiency | JSON (verbose) | JSON (precise fields) | Protobuf (3-10x smaller) | JSON (verbose) | App-defined | Text only | JSON or MessagePack | JSON + binary |
| Streaming | Chunked transfer | Subscriptions (WS) | 4 streaming modes | No | Native | Native | Native | Native |
| Code generation | openapi-generator | GraphQL Codegen | protoc (all languages) | OData client gen | None | None | None | None |
| Auto-reconnect | N/A | N/A | N/A | N/A | No (manual) | Yes (built-in) | Yes | Yes |
| Technology | Cross-Reference | When |
|---|---|---|
| Backend frameworks | skills/backend/SKILL.md | Framework-specific REST/API implementation (Express, FastAPI, ASP.NET Core) |
| Kafka | skills/etl/streaming/kafka/SKILL.md | Event streaming as async layer behind APIs |
| Database | skills/database/SKILL.md | Data layer behind APIs (query optimization, connection pooling) |
| Request Pattern | Route To |
|---|---|
| Request/Response APIs | |
| GraphQL, Apollo, Federation, schema design, DataLoader, Relay, Strawberry, Hot Chocolate | graphql/SKILL.md |
| gRPC, protobuf, proto3, streaming RPC, load balancing, health check, interceptors | grpc/SKILL.md |
| REST, OpenAPI, HTTP semantics, CORS, caching, API gateway, rate limiting, pagination | rest/SKILL.md |
| OData, $filter, $expand, $select, EDM, CSDL, batch, SAP, Power BI | odata/SKILL.md |
| Real-Time / Event-Driven | |
| SignalR, hub, group, Azure SignalR Service, backplane, .NET real-time | signalr/SKILL.md |
| Socket.IO, rooms, namespaces, adapters, Engine.IO, scaling | socketio/SKILL.md |
| WebSocket, RFC 6455, ws, wss, close codes, frames, ping/pong | websocket/SKILL.md |
| SSE, Server-Sent Events, EventSource, text/event-stream, LLM streaming | sse/SKILL.md |
| Cross-Protocol | |
| Protocol comparison, which protocol, REST vs GraphQL, WebSocket vs SSE | This agent (use tables above) |
| API authentication, JWT, OAuth, CORS, API keys | Load references/concepts.md |
| API versioning strategy | Load references/concepts.md |
| API gateway design | Load references/concepts.md |
references/concepts.md -- API design theory, authentication across protocols, versioning strategies, API gateway patterns, observability, error handling, idempotency, performance patterns. Read for architecture and design questions.references/paradigm-request-response.md -- When and why to use REST vs GraphQL vs gRPC vs OData. Detailed comparison with code examples and decision criteria. Read when evaluating request/response protocols.references/paradigm-realtime.md -- When and why to use WebSocket vs SSE vs SignalR vs Socket.IO. Transport comparison, scaling patterns, authentication constraints. Read when evaluating real-time technologies.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub chrishuffman5/domain-expert --plugin domain-expert