Backend Websocket Patterns

Use when the user asks about WebSockets, live chat with socket.io and rooms, Server-Sent Events, heartbeats, reconnection, broadcasting or scaling WebSockets with Redis pub/sub. Produces real-time messaging server code. Not for audio/video calls (use backend-web-real-time).

45 stars 6 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill backend-websocket-patterns
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/universal/websocket-patterns ~/.claude/skills/backend-websocket-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Backend WebSocket Patterns

## Purpose
Design consistent, production-grade WebSocket services. Every connection must follow the same conventions for handshake, message framing, room management, reconnection, error handling, and cross-node scaling.

## Agent Protocol

### Trigger
Exact user phrases: "WebSocket", "real-time", "socket.io", "WS connection", "reconnection", "WS rooms", "broadcast", "WS scaling", "WS clustering", "pub/sub over WS", "SSE", "Server-Sent Events", "long polling", "WS handshake", "design a WebSocket server".

### Input Context
Before activating, verify:
- The real-time feature being designed is known.
- The transport (raw WebSocket / Socket.IO / SSE) is chosen. If not, ask: "Raw WebSocket, Socket.IO, or SSE?"
- The scaling requirement (single node vs multi-node) is known.
- The authentication model is known.

### Output Artifact
No file output unless the user requests it. Produces WebSocket connection specs and message protocols as text.

### Response Format
For each message type:
```
Event: {event_name}
Direction: {client→server | server→client | bidirectional}
Payload: {schema reference}
Ack: {required/optional/none}
```

For a full connection spec:
```
## Connection
Endpoint: {ws/wss}://{host}/{path}
Auth: {mechanism}

## Messages
{list of message types}

## Lifecycle
{connection → auth → subscribe → message → disconnect}
```
Read the full skill on GitHub

Details

Skill name
backend-websocket-patterns
Path
skills/backend/universal/websocket-patterns/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Backend Websocket Patterns skill do?

Use when the user asks about WebSockets, live chat with socket.io and rooms, Server-Sent Events, heartbeats, reconnection, broadcasting or scaling WebSockets with Redis pub/sub. Produces real-time messaging server code. Not for audio/video calls (use backend-web-real-time).

How do I install the Backend Websocket Patterns skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill backend-websocket-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Backend Websocket Patterns popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Bare Metal Rust

45

j4flmao/agent-skills

Use when the user asks about embedded Rust, no_std firmware, Cortex-M Rust, embedded-hal, PAC and svd2rust, RTIC, Embassy, probe-rs or defmt. Produces no_std firmware with safe interrupt sharing and a flash/debug toolchain. Not for general Rust application code (use lang-rust) or C firmware (use c-cpp-patterns).

Software Development

Backend Webhooks

45

j4flmao/agent-skills

Use when the user asks about webhooks, receiving Stripe or GitHub webhooks safely, verifying webhook signatures (HMAC), sending outgoing webhooks, retries or replay protection. Produces webhook receiver and delivery code. Not for payment flows themselves (use ecommerce-payment-processing).

Software Development

Bun

45

j4flmao/agent-skills

Use when the user asks about Bun, Bun.serve, bun install, bun test, bun build --compile, bun:sqlite, Bun.file or Bun Shell. Produces Bun runtime servers, tooling and tests with Node compatibility notes. Not for the Elysia framework on Bun (use elysia-architecture).

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.