plugins/api-realtime/skills/signalr/SKILL.md
ASP.NET Core SignalR covering .NET 8, 9, and 10. Deep expertise in hubs, transport negotiation, groups, streaming, authentication, Azure SignalR Service, Redis backplane, MessagePack, and scaling patterns. Use for "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". Do NOT use for general ASP.NET Core framework questions unrelated to real-time hubs (middleware, minimal APIs, EF Core) — use the `aspnet-core` skill in the `backend` plugin for that.
npx skillsauth add chrishuffman5/domain-expert 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.
This skill covers ASP.NET Core SignalR, Microsoft's real-time communication library for .NET. Covers .NET 8, 9, and 10 (preview). It has 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 issuesoverview skill 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 managementoverview skill -- SignalR vs Socket.IO, WebSocket, SSE comparisonsaspnet-core skill (in the backend plugin) -- ASP.NET Core framework contexttools
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.