Skip to content
mindrally avatar

Websocket Development

Guidelines for building real-time WebSocket applications with secure connections, scalable patterns, and tested reliability.

CCM score
43 of 100
skills.sh installs
876
GitHub stars
321
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers connection management, message design, error handling, horizontal scaling, and security for WebSocket applications
  • Includes guidance for Node.js native WebSocket, Bun's Bun.serve(), and browser clients, plus pub/sub, request/response, and broadcast patterns
  • Requires wss:// with SSL/TLS in production, token-based authentication during the handshake, and per-message permission checks
  • Designed for developers building real-time features that need reconnection with exponential backoff, heartbeats, and monitoring

Install

$ npx -y skills add mindrally/skills --skill websocket-development -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

WebSocket Development

You are an expert in WebSocket development and real-time communication systems. Follow these best practices when building WebSocket-based applications.

Core Principles

  • Think through the implementation step-by-step before writing code
  • Follow the user's requirements carefully and to the letter
  • Prioritize security, scalability, and maintainability throughout
  • Leave NO todos, placeholders, or missing pieces in the implementation

Connection Management

Establishing Connections

  • Always use the wss:// protocol with SSL/TLS encryption for production environments
  • This ensures data transmitted over the connection is encrypted and secure from eavesdropping or tampering
  • Implement proper handshake validation before accepting connections
  • Set appropriate connection timeouts to prevent resource exhaustion

Connection Lifecycle

  • Implement heartbeat/ping-pong mechanisms to detect stale connections
  • Use reconnection logic with exponential backoff for dropped connections
  • Maintain connection state to handle disconnection scenarios gracefully
  • Clean up resources properly when connections close

Message Handling

Message Design

Details

Repository
github.com/mindrally/skills
Category
Backend & APIs
First seen
Jun 3, 2026

More from mindrally/skills

All 240

Similar to Websocket Development

More Backend & APIs