debugging-websocket-issues

debugging-websocket-issues is a skill for Claude Code from gabrielmoreira/agent-skills-mirror. It costs 54 tokens per session (1,234 once invoked), scanned A, a copy of debugging-websocket-issues, MIT.

A troubleshooting guide for WebSocket failures, where a WebSocket is a long-lived connection that lets a browser and server exchange messages. It explains errors involving invalid frames, compression, and multiple server handlers.

In plain words
What is it for?
Use it to investigate invalid frame errors, immediate disconnects, abnormal closure code 1006, and conflicts between WebSocket servers.
Why use it?
It helps distinguish damaged WebSocket data from a server accidentally sending ordinary HTTP data or handling the same connection twice.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to investigate invalid frame errors, immediate disconnects, abnormal closure code 1006, and conflicts between WebSocket servers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gabrielmoreira/agent-skills-mirror --skill debugging-websocket-issues
Clone the repo
git clone --depth 1 https://github.com/gabrielmoreira/agent-skills-mirror

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debugging-websocket-issues

README.md
[![agentmods](https://agentmods.dev/badge/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues/github.svg)](https://agentmods.dev/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues)
Your own site
<a href="https://agentmods.dev/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues"><img src="https://agentmods.dev/badge/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debugging-websocket-issues

Your own site · 80×15
<a href="https://agentmods.dev/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues"><img src="https://agentmods.dev/badge/skills/gabrielmoreira/agent-skills-mirror/debugging-websocket-issues.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01234
Opus 5 $0.00027 $0.00617
Sonnet 5 $0.00011 $0.00247
Haiku 4.5 $0.00005 $0.00123

Measured 7d ago against content hash 40c5fab7d562, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

debugging-websocket-issues scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to debugging-websocket-issues — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

mirrors/repos/AgentWorkforce@relay/.claude/skills/debugging-websocket-issues/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debugging WebSocket Issues

Overview

WebSocket "invalid frame header" errors often stem from raw HTTP being written to an upgraded socket, not actual frame corruption. The most common cause is multiple WebSocketServer instances conflicting on the same HTTP server.

When to Use

  • Error: Invalid WebSocket frame: RSV1 must be clear
  • Error: WS_ERR_UNEXPECTED_RSV_1
  • Error: Invalid frame header
  • WebSocket connects then immediately disconnects with code 1006
  • Server logs success but client receives garbage data

Quick Reference

Symptom Likely Cause Fix
RSV1 must be clear Multiple WSS on same server OR compression mismatch Use noServer: true mode
Hex starts with 48545450 Raw HTTP on WebSocket (0x48='H') Check for conflicting upgrade handlers
Code 1006, no reason Abnormal closure, often server-side abort Check abortHandshake calls
Works isolated, fails in app Something else writing to socket Audit all upgrade listeners

The Multiple WebSocketServer Bug

Problem

When attaching multiple WebSocketServer instances to the same HTTP server using the server option:

// ❌ BAD - Both servers add upgrade listeners, causing conflicts
const wss1 = new WebSocketServer({ server, path: '/ws' });
const wss2 = new WebSocketServer({ server, path: '/ws/other' });

What happens:

  1. Client connects to /ws
  2. BOTH upgrade handlers fire (Node.js EventEmitter calls all listeners)
  3. wss1 matches path, handles upgrade successfully
  4. wss2 doesn't match, calls abortHandshake(socket, 400)
  5. Raw HTTP/1.1 400 Bad Request written to the now-WebSocket socket
  6. Client receives HTTP text as WebSocket frame data
  7. First byte 0x48 ('H') interpreted as: RSV1=1, opcode=8 → invalid frame

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 131 lines · 54 tokens per session scan A 40c5fab7d562

Subscribe to this mod's changes

debugging-websocket-issues is a skill published in the GitHub repository gabrielmoreira/agent-skills-mirror (17 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 1,234 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to debugging-websocket-issues, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

convex-performance-audit

Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.

openclaw/clawhub · 38 tokens

convex-insights

Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.

openclaw/clawhub · 45 tokens

ssl-proxy-troubleshoot

Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites.

HKUDS/OpenSpace · 20 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

platform-apex-anonymous-run

Use this skill to run anonymous Apex against the connected Salesforce org — from a .apex file or a pasted snippet — capturing the debug log, surfacing compile and runtime errors, and summarizing results. Trigger on phrases like "run this anonymous apex", "execute this script against my org", "run this snippet of…

forcedotcom/sf-skills · 159 tokens