Token导航 LogoToken导航

Agent Skill · 开发

websocket-engineer(网络套接字工程师)

websocket-engineer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

websocket-engineer 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 7,968。

总安装 3,411周安装 138GitHub Stars 76下载 1,071核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:websocket-engineer(网络套接字工程师)
来源仓库:https://github.com/404kidwiz/claude-supercode-skills
仓库路径:skills/websocket-engineer
安装命令:
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill websocket-engineer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill websocket-engineer

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

专注实时通信架构设计与 WebSocket 系统开发。适用于聊天应用、实时仪表盘或多用户协同场景。可处理连接稳定性、心跳机制和水平扩展问题。websocket-engineer 属于开发类 Skill,可作为该场景下的辅助能力补充。建议使用 Redis Adapter 实现多节点消息同步。

部署前应评估并发量和网络环境对延迟的影响。

来源仓库内路径:skills/websocket-engineer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill webs…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

websocket-engineer 怎么安装?

在终端执行 npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill websocket-engi…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

websocket-engineer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

websocket-engineer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

websocket-engineer 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

websocket-engineer 用的人多吗?

公开数据是累计安装 3,411 次,近一周安装 138 次,下载 1,071 次,GitHub 76 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

websocket-engineer 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
websocket-engineer

网络套接字工程师 · 本页

3,41176需要联网MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

WebSocket & Real-Time Engineer

Purpose

Provides real-time communication expertise specializing in WebSocket architecture, Socket.IO, and event-driven systems. Builds low-latency, bidirectional communication systems scaling to millions of concurrent connections.

When to Use

  • Building chat apps, live dashboards, or multiplayer games
  • Scaling WebSocket servers horizontally (Redis Adapter)
  • Implementing "Server-Sent Events" (SSE) for one-way updates
  • Troubleshooting connection drops, heartbeat failures, or CORS issues
  • Designing stateful connection architectures
  • Migrating from polling to push technology

Examples

Example 1: Real-Time Chat Application

Scenario: Building a scalable chat platform for enterprise use.

Implementation:

  1. Designed WebSocket architecture with Socket.IO
  2. Implemented Redis Adapter for horizontal scaling
  3. Created room-based message routing
  4. Added message persistence and history
  5. Implemented presence system (online/offline)

Results:

  • Supports 100,000+ concurrent connections
  • 50ms average message delivery
  • 99.99% connection stability
  • Seamless horizontal scaling

Example 2: Live Dashboard System

Scenario: Real-time analytics dashboard with sub-second updates.

Implementation:

  1. Implemented WebSocket server with low latency
  2. Created efficient message batching strategy
  3. Added Redis pub/sub for multi-server support
  4. Implemented client-side update coalescing
  5. Added compression for large payloads

Results:

  • Dashboard updates in under 100ms
  • Handles 10,000 concurrent dashboard views
  • 80% reduction in server load vs polling
  • Zero data loss during reconnections

Example 3: Multiplayer Game Backend

Scenario: Low-latency multiplayer game server.

Implementation:

  1. Implemented WebSocket server with binary protocols
  2. Created authoritative server architecture
  3. Added client-side prediction and reconciliation
  4. Implemented lag compensation algorithms
  5. Set up server-side physics and collision detection

Results:

  • 30ms end-to-end latency
  • Supports 1000 concurrent players per server
  • Smooth gameplay despite network variations
  • Cheat-resistant server authority

Best Practices

Connection Management

  • Heartbeats: Implement ping/pong for connection health
  • Reconnection: Automatic reconnection with backoff
  • State Cleanup: Proper cleanup on disconnect
  • Connection Limits: Prevent resource exhaustion

Scaling

  • Horizontal Scaling: Use Redis Adapter for multi-server
  • Sticky Sessions: Proper load balancer configuration
  • Message Routing: Efficient routing for broadcast/unicast
  • Rate Limiting: Prevent abuse and overload

Performance

  • Message Batching: Batch messages where appropriate
  • Compression: Compress messages (permessage-deflate)
  • Binary Protocols: Use binary for performance-critical data
  • Connection Pooling: Efficient client connection reuse

Security

  • Authentication: Validate on handshake
  • TLS: Always use WSS
  • Input Validation: Validate all incoming messages
  • Rate Limiting: Limit connection/message rates


2. Decision Framework

Protocol Selection

What is the communication pattern?
│
├─ **Bi-directional (Chat/Game)**
│  ├─ Low Latency needed? → **WebSockets (Raw)**
│  ├─ Fallbacks/Auto-reconnect needed? → **Socket.IO**
│  └─ P2P Video/Audio? → **WebRTC**
│
├─ **One-way (Server → Client)**
│  ├─ Stock Ticker / Notifications? → **Server-Sent Events (SSE)**
│  └─ Large File Download? → **HTTP Stream**
│
└─ **High Frequency (IoT)**
   └─ Constrained device? → **MQTT** (over TCP/WS)

Scaling Strategy

ScaleArchitectureBackend
< 10k UsersMonolith Node.jsSingle Instance
10k - 100kClusteringNode.js Cluster + Redis Adapter
100k - 1MMicroservicesGo/Elixir/Rust + NATS/Kafka
GlobalEdgeCloudflare Workers / PubNub / Pusher

Load Balancer Config

  • Sticky Sessions: REQUIRED for Socket.IO (handshake phase).
  • Timeouts: Increase idle timeouts (e.g., 60s+).
  • Headers: Upgrade: websocket, Connection: Upgrade.

Red Flags → Escalate to security-engineer:

  • Accepting connections from any Origin (*) with credentials
  • No Rate Limiting on connection requests (DoS risk)
  • Sending JWTs in URL query params (Logged in proxy logs) - Use Cookie or Initial Message instead


3. Core Workflows

Workflow 1: Scalable Socket.IO Server (Node.js)

Goal: Chat server capable of scaling across multiple cores/instances.

Steps:

  1. Install Dependencies npm install socket.io redis @socket.io/redis-adapter
  2. Implementation (server.js) const {Server} = require("socket.io"); const {createClient} = require("redis"); const {createAdapter} = require("@socket.io/redis-adapter"); const pubClient = createClient({url: "redis://localhost:6379"}); const subClient = pubClient.duplicate(); Promise.all([pubClient.connect(), subClient.connect()]).then(() => {const io = new Server(3000, {adapter: createAdapter(pubClient, subClient), cors: {origin: "https://myapp.com", methods: ["GET", "POST"]}}); io.on("connection", (socket) => {// User joins a room (e.g., "chat-123") socket.on("join", (room) => {socket.join(room);}); // Send message to room (propagates via Redis to all nodes) socket.on("message", (data) => {io.to(data.room).emit("chat", data.text);});});});


Workflow 3: Production Tuning (Linux)

Goal: Handle 50k concurrent connections on a single server.

Steps:

  1. File Descriptors

- Increase limit: ulimit -n 65535. - Edit /etc/security/limits.conf.

  1. Ephemeral Ports

- Increase range: sysctl -w net.ipv4.ip_local_port_range="1024 65535".

  1. Memory Optimization

- Use ws (lighter) instead of Socket.IO if features not needed. - Disable "Per-Message Deflate" (Compression) if CPU is high.



5. Anti-Patterns & Gotchas

❌ Anti-Pattern 1: Stateful Monolith

What it looks like:

  • Storing users = [] array in Node.js memory.

Why it fails:

  • When you scale to 2 servers, User A on Server 1 cannot talk to User B on Server 2.
  • Memory leaks crash the process.

Correct approach:

  • Use Redis as the state store (Adapter).
  • Stateless servers, Stateful backend (Redis).

❌ Anti-Pattern 2: The "Thundering Herd"

What it looks like:

  • Server restarts. 100,000 clients reconnect instantly.
  • Server crashes again due to CPU spike.

Why it fails:

  • Connection handshakes are expensive (TLS + Auth).

Correct approach:

  • Randomized Jitter: Clients wait random(0, 10s) before reconnecting.
  • Exponential Backoff: Wait 1s, then 2s, then 4s...

❌ Anti-Pattern 3: Blocking the Event Loop

What it looks like:

  • socket.on('message', () => {heavyCalculation();})

Why it fails:

  • Node.js is single-threaded. One heavy task blocks *all* 10,000 connections.

Correct approach:

  • Offload work to a Worker Thread or Message Queue (RabbitMQ/Bull).


7. Quality Checklist

Scalability:

  • Adapter: Redis/NATS adapter configured for multi-node.
  • Load Balancer: Sticky sessions enabled (if using polling fallback).
  • OS Limits: File descriptors limit increased.

Resilience:

  • Reconnection: Exponential backoff + Jitter implemented.
  • Heartbeat: Ping/Pong interval configured (< LB timeout).
  • Fallback: Socket.IO fallbacks (HTTP Long Polling) enabled/tested.

Security:

  • WSS: TLS enabled (Secure WebSockets).
  • Auth: Handshake validates credentials properly.
  • Rate Limit: Connection rate limiting active.

Anti-Patterns

Connection Management Anti-Patterns

  • No Heartbeats: Not detecting dead connections - implement ping/pong
  • Memory Leaks: Not cleaning up closed connections - implement proper cleanup
  • Infinite Reconnects: Reloop without backoff - implement exponential backoff
  • Sticky Sessions Required: Not designing for stateless - use Redis for state

Scaling Anti-Patterns

  • Single Server: Not scaling beyond one instance - use Redis adapter
  • No Load Balancing: Direct connections to servers - use proper load balancer
  • Broadcast Storm: Sending to all connections blindly - target specific connections
  • Connection Saturation: Too many connections per server - scale horizontally

Performance Anti-Patterns

  • Message Bloat: Large unstructured messages - use efficient message formats
  • No Throttling: Unlimited send rates - implement rate limiting
  • Blocking Operations: Synchronous processing - use async processing
  • No Monitoring: Operating blind - implement connection metrics

Security Anti-Patterns

  • No TLS: Using unencrypted connections - always use WSS
  • Weak Auth: Simple token validation - implement proper authentication
  • No Rate Limits: Vulnerable to abuse - implement connection/message limits
  • CORS Exposed: Open cross-origin access - configure proper CORS

平台分布

Claude Code

30.78%
按下载量换算330

Codex

20.5%
按下载量换算220

OpenCode

17.17%
按下载量换算184

windsurf

13%
按下载量换算139

Cursor

7.59%
按下载量换算81

Gemini CLI

3.46%
按下载量换算37

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills