plugins/api-realtime/skills/websocket/SKILL.md
WebSocket protocol covering RFC 6455, opening handshake, frame format, close codes, extensions (permessage-deflate), subprotocols, browser API, server implementations, authentication patterns, and reconnection strategies. Use for "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". Covers the raw bidirectional transport protocol itself. Do NOT use for broker-backed pub/sub or message-queue delivery (Kafka, RabbitMQ, SNS/SQS) — use the relevant broker skill in the `messaging` plugin for that.
npx skillsauth add chrishuffman5/domain-expert websocketInstall 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 the WebSocket protocol, standardized as RFC 6455. WebSocket provides full-duplex, bidirectional communication over a single persistent TCP connection. It has deep knowledge of:
permessage-deflate (RFC 7692)graphql-ws, mqtt, stompws (Node.js), websockets (Python), gorilla/websocket (Go)Classify the request:
references/architecture.md for RFC 6455, frames, handshake, close codes, extensionsreferences/best-practices.md for authentication, reconnection, backpressure, compression, securityreferences/diagnostics.md for connection failures, close codes, proxy issues, performanceoverview skillGather context -- Client type (browser, server), server language, proxy/CDN in use, subprotocol, authentication method
Analyze -- Apply WebSocket-specific reasoning: stateful connections, no built-in reconnection, proxy traversal, authentication constraints.
Recommend -- Provide browser API code, server implementation code, proxy configuration.
HTTP/1.1 upgrade request. Server accepts with 101 Switching Protocols and computed Sec-WebSocket-Accept header.
Lightweight binary framing: FIN bit, opcode (text=1, binary=2, close=8, ping=9, pong=10), mask bit, payload length, optional masking key, payload.
Client-to-server frames are ALWAYS masked. Server-to-client NEVER masked.
| Code | Meaning | |---|---| | 1000 | Normal closure | | 1001 | Going away (server shutdown, page navigation) | | 1002 | Protocol error | | 1006 | Abnormal closure (no close frame -- TCP dropped) | | 1008 | Policy violation | | 1009 | Message too big | | 1011 | Server internal error | | 4000-4999 | Application-defined |
const ws = new WebSocket("wss://example.com/ws");
ws.onopen = () => ws.send("hello");
ws.onmessage = (e) => console.log(e.data);
ws.onclose = (e) => console.log(e.code, e.reason, e.wasClean);
ws.onerror = () => {};
Cannot set custom headers from browser. Auth via query string or cookies.
ws.bufferedAmount.references/architecture.md -- RFC 6455 handshake, frame format, opcodes, masking, fragmentation, close codes, extensions, subprotocols, browser APIreferences/best-practices.md -- Authentication, reconnection, backpressure, compression, ping/pong, security, proxy configuration, server implementationsreferences/diagnostics.md -- Connection failures, close code debugging, proxy issues, performance, memory leaks, cross-origin errorsoverview skill -- WebSocket vs SSE, SignalR, Socket.IO comparisonssocketio skill -- Socket.IO (builds on WebSocket via Engine.IO)signalr skill -- SignalR (uses WebSocket as primary transport)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.