plugins/api-realtime/skills/socketio/SKILL.md
Socket.IO 4.x covering namespaces, rooms, acknowledgements, adapters, scaling, connection state recovery, middleware, TypeScript types, and multi-server deployment. Use for "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".
npx skillsauth add chrishuffman5/domain-expert socketioInstall 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 Socket.IO 4.x (latest stable: 4.8.x), the real-time communication library built on Engine.IO. Socket.IO is NOT a WebSocket wrapper -- it is a higher-level protocol with its own features. It has deep knowledge of:
emitWithAck (request/response pattern)Classify the request:
references/architecture.md for Engine.IO, namespaces, rooms, events, recoveryreferences/best-practices.md for adapters, sticky sessions, middleware, TypeScript, Admin UIreferences/diagnostics.md for connection issues, room broadcasting, adapter problems, performanceoverview skillGather context -- Socket.IO version, runtime (Node.js, Deno, Bun), adapter in use, scaling approach, client platform
Analyze -- Apply Socket.IO-specific reasoning: namespace isolation, room lifecycle, adapter propagation, transport upgrade.
Recommend -- Provide server and client JavaScript/TypeScript code, adapter configuration, infrastructure setup.
Engine.IO always starts with HTTP long-polling, then upgrades to WebSocket. Heartbeat: server sends ping every 25s; client responds with pong within 20s.
Socket.IO requires matching client/server libraries. A raw WebSocket client cannot connect to a Socket.IO server.
const adminNsp = io.of("/admin");
adminNsp.on("connection", (socket) => { /* ... */ });
Each namespace has independent event handlers, rooms, and middleware.
Server-side only broadcast groups:
socket.join("room1");
io.to("room1").emit("event", data);
socket.to("room1").emit("event", data); // excludes sender
const result = await socket.timeout(5000).emitWithAck("create:user", data);
const io = new Server(httpServer, {
connectionStateRecovery: { maxDisconnectionDuration: 2 * 60 * 1000 }
});
Restores socket ID, rooms, and missed packets after brief disconnection.
next() in middleware -- Connection hangs until timeout if next() is not called.socket.rooms in disconnecting event -- In disconnect event, socket.rooms is already empty. Use disconnecting to read rooms before cleanup.forceNew: true unnecessarily -- Disables multiplexing, creating separate WebSocket connections per namespace.references/architecture.md -- Engine.IO transport, namespaces, rooms, events, acknowledgements, binary, connection state recovery, middlewarereferences/best-practices.md -- Adapter selection, scaling patterns, sticky sessions, TypeScript typing, Admin UI, room management patterns, authenticationreferences/diagnostics.md -- Connection failures, room broadcast issues, adapter problems, sticky session errors, performance, upgrade issuesoverview skill -- Socket.IO vs SignalR, WebSocket, SSE comparisonswebsocket skill -- Raw WebSocket protocol (Socket.IO builds on top)tools
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.