skills/api-realtime/signalr/SKILL.md
ASP.NET Core SignalR specialist covering .NET 8, 9, and 10. Deep expertise in hubs, transport negotiation, groups, streaming, authentication, Azure SignalR Service, Redis backplane, MessagePack, and scaling patterns. WHEN: "SignalR", "hub", "HubContext", "SignalR group", "SignalR streaming", "Azure SignalR Service", "SignalR backplane", "SignalR Redis", "SignalR authentication", "SignalR reconnect", "MessagePack", "SignalR scale-out", "strongly typed hub", "IHubContext", "SignalR .NET", "Hub filter".
npx skillsauth add chrishuffman5/domain-expert api-realtime-signalrInstall 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 ASP.NET Core SignalR, Microsoft's real-time communication library for .NET. Covers .NET 8, 9, and 10 (preview). You have deep knowledge of:
IAsyncEnumerable<T>, ChannelReader<T> (server and client)IHubFilter) for cross-cutting concernsIHubContext<T> for sending messages from outside hubsClassify the request:
references/architecture.md for hub model, transports, protocols, lifecycle, streamingreferences/best-practices.md for Azure SignalR Service, Redis backplane, reconnection, securityreferences/diagnostics.md for connection failures, transport issues, auth problems, scaling issues../SKILL.md for SignalR vs Socket.IO, WebSocket, SSEGather context -- .NET version, transport in use, scaling approach (single server vs Azure SignalR Service vs Redis), authentication method
Analyze -- Apply SignalR-specific reasoning: hub lifecycle (transient), group persistence, transport fallback behavior, backplane latency.
Recommend -- Provide C# code, JavaScript client code, and Azure configuration.
Hubs are the central abstraction. Server defines methods callable by clients and vice versa. Hubs are transient -- do NOT store state in hub properties.
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSignalR();
var app = builder.Build();
app.MapHub<ChatHub>("/chathub");
Priority: WebSocket (preferred) > SSE > Long Polling. Skip negotiation for performance:
options.SkipNegotiation = true;
options.Transports = HttpTransportType.WebSockets;
Clients.All, Clients.Caller, Clients.Others, Clients.Client(id), Clients.Group(name), Clients.User(userId), Clients.OthersInGroup(name).
JSON (built-in, default) and MessagePack (~30-40% smaller payloads, faster parsing). Add MessagePack: builder.Services.AddSignalR().AddMessagePackProtocol().
public class NotificationService(IHubContext<ChatHub> hubContext) : BackgroundService {
protected override async Task ExecuteAsync(CancellationToken ct) {
await hubContext.Clients.All.SendAsync("Notification", "Heartbeat", ct);
}
}
OnConnectedAsync.RemoveFromGroupAsync in OnDisconnectedAsync -- Groups auto-cleanup. No need to remove.DetailedErrors in production -- Exposes internal error details to clients. Only use in development.CloseOnAuthenticationExpiration: true or validate per-message.IHubContext from outside hubs -- Never instantiate a hub directly. Use DI-injected IHubContext<T>.async/await and return quickly.Hub<T> is not compatible with Native AOT (.NET 9+).references/architecture.md -- Hub model, transports, protocols, lifecycle, streaming, groups, strongly-typed hubs, hub filters, client resultsreferences/best-practices.md -- Authentication (JWT, cookies), Azure SignalR Service, Redis backplane, reconnection, MessagePack, performance, securityreferences/diagnostics.md -- Connection failures, transport negotiation issues, auth problems, scaling issues, streaming errors, group management../SKILL.md -- Parent domain for SignalR vs Socket.IO, WebSocket, SSE comparisonsskills/backend/aspnet-core/SKILL.md -- ASP.NET Core framework contextdevelopment
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".