Creator · AgentWorkforce
Last updated · Sep 4, 2026
Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques
Creator · AgentWorkforce
Last updated · Sep 4, 2026
Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques
Creator · AgentWorkforce
Last updated · Sep 4, 2026
Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques
Creator · AgentWorkforce
Last updated · Sep 4, 2026
Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques
Sandbox only
Install targets
Codex install prompt
Install the "debugging-websocket-issues" agent skill from https://github.com/AgentWorkforce/relay/tree/main/.claude/skills/debugging-websocket-issues. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"agentworkforce-debugging-websocket-issues","task":"Install debugging-websocket-issues","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Maintenance
fresh
1d since push
Risk
Needs review
Financial research output is not financial advice; require human review before any live investment decision
GitHub quality
813
80/100 Quality · 83/100 Trust
Coverage tags
Review notes
Financial research output is not financial advice; require human review before any live investment decision · Financial research output is not financial advice; require human review before any live investment decision.
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
813 GitHub stars
Repo activity
813 stars, 64 forks
Maintenance
1d since push
License
Apache-2.0
Install
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
Agent should check
Copy prompt
Task: Use debugging-websocket-issues in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install
Install command: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
LLM text format
/api/skills/agentworkforce-debugging-websocket-issues/install?format=text
Find alternatives
/api/skills/search?q=debugging-websocket-issues&limit=3
Agent prompt
Use debugging-websocket-issues for this task. Review https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install, then install with: npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/agentworkforce-debugging-websocket-issues
LLM text
/api/registry/manifest/agentworkforce-debugging-websocket-issues?format=text
Install alias
/api/registry/install/agentworkforce-debugging-websocket-issues
Recommend
/api/registry/recommend?task=Use%20debugging-websocket-issues%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO813 GitHub stars
Stars/forks activity
INFO813 stars, 64 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: debugging-websocket-issues description: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques tags: websocket, debugging, ws, node ---
# 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:
```typescript // ❌ 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
### Solution
Use `noServer: true` and manually route upgrades:
```typescript // ✅ GOOD - Single upgrade handler routes to correct server const wss1 = new WebSocketServer({ noServer: true, perMessageDeflate: false }); const wss2 = new WebSocketServer({ noServer: true, perMessageDeflate: false });
server.on('upgrade', (request, socket, head) => { const pathname = new URL(request.url || '', `http://${request.headers.host}`).pathname;
if (pathname === '/ws') { wss1.handleUpgrade(request, socket, head, (ws) => { wss1.emit('connection', ws, request); }); } else if (pathname === '/ws/other') { wss2.handleUpgrade(request, socket, head, (ws) => { wss2.emit('connection', ws, request); }); } else { socket.destroy(); } }); ```
## Debugging Techniques
### Raw Frame Inspection
Hook into the socket to see actual bytes received:
```typescript ws.on('open', () => { const socket = ws._socket; const originalPush = socket.push.bind(socket);
socket.push = function (chunk, encoding) { if (chunk) { console.log('First 20 bytes (hex):', chunk.slice(0, 20).toString('hex')); const byte0 = chunk[0]; console.log(`FIN: ${!!(byte0 & 0x80)}, RSV1: ${!!(byte0 & 0x40)}, Opcode: ${byte0 & 0x0f}`);
// Check if it's actually HTTP text if (chunk.slice(0, 4).toString() === 'HTTP') { console.log('*** RECEIVED RAW HTTP ON WEBSOCKET ***'); } } return originalPush(chunk, encoding); }; }); ```
### Key Hex Patterns
- `81` = FIN + text frame (normal) - `82` = FIN + binary frame (normal) - `88` = FIN + close frame (normal) - `48545450` = "HTTP" - raw HTTP on WebSocket (bug!) - `c1` or similar with bit 6 set = compressed frame (RSV1=1)
## Common Mistakes
| Mistake | Result | Fix | | ----------------------------------------------- | ---------------------------- | ----------------------------------------- | | Multiple WSS with `server` option | HTTP 400 written to socket | Use `noServer: true` | | `perMessageDeflate: true` (default in older ws) | RSV1 set on frames | Explicitly set `perMessageDeflate: false` | | Not checking upgrade headers | Miss compression negotiation | Log `sec-websocket-extensions` header | | Assuming RSV1 error = compression | Could be raw HTTP | Check if bytes decode as ASCII "HTTP" |
## Verification Checklist
After fixing, verify:
- [ ] `RSV1: false` in frame inspection - [ ] `Extensions header: NONE` in upgrade response - [ ] No `HTTP/1.1` in raw frame data - [ ] Messages received match sent payload size - [ ] Multiple broadcasts work (test interval sends)
Source provenance
Decision snapshot
813 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for debugging-websocket-issues, ready for a manual X post.
debugging-websocket-issues: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ER... 813 stars https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x
Listing + install path for debugging-websocket-issues: https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x Install: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to AgentWorkforce but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues/audit)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)AgentWorkforce
@agentworkforce
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "debugging-websocket-issues" agent skill from https://github.com/AgentWorkforce/relay/tree/main/.claude/skills/debugging-websocket-issues. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"agentworkforce-debugging-websocket-issues","task":"Install debugging-websocket-issues","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Maintenance
fresh
1d since push
Risk
Needs review
Financial research output is not financial advice; require human review before any live investment decision
GitHub quality
813
80/100 Quality · 83/100 Trust
Coverage tags
Review notes
Financial research output is not financial advice; require human review before any live investment decision · Financial research output is not financial advice; require human review before any live investment decision.
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
813 GitHub stars
Repo activity
813 stars, 64 forks
Maintenance
1d since push
License
Apache-2.0
Install
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
Agent should check
Copy prompt
Task: Use debugging-websocket-issues in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install
Install command: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
LLM text format
/api/skills/agentworkforce-debugging-websocket-issues/install?format=text
Find alternatives
/api/skills/search?q=debugging-websocket-issues&limit=3
Agent prompt
Use debugging-websocket-issues for this task. Review https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install, then install with: npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/agentworkforce-debugging-websocket-issues
LLM text
/api/registry/manifest/agentworkforce-debugging-websocket-issues?format=text
Install alias
/api/registry/install/agentworkforce-debugging-websocket-issues
Recommend
/api/registry/recommend?task=Use%20debugging-websocket-issues%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO813 GitHub stars
Stars/forks activity
INFO813 stars, 64 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: debugging-websocket-issues description: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques tags: websocket, debugging, ws, node ---
# 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:
```typescript // ❌ 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
### Solution
Use `noServer: true` and manually route upgrades:
```typescript // ✅ GOOD - Single upgrade handler routes to correct server const wss1 = new WebSocketServer({ noServer: true, perMessageDeflate: false }); const wss2 = new WebSocketServer({ noServer: true, perMessageDeflate: false });
server.on('upgrade', (request, socket, head) => { const pathname = new URL(request.url || '', `http://${request.headers.host}`).pathname;
if (pathname === '/ws') { wss1.handleUpgrade(request, socket, head, (ws) => { wss1.emit('connection', ws, request); }); } else if (pathname === '/ws/other') { wss2.handleUpgrade(request, socket, head, (ws) => { wss2.emit('connection', ws, request); }); } else { socket.destroy(); } }); ```
## Debugging Techniques
### Raw Frame Inspection
Hook into the socket to see actual bytes received:
```typescript ws.on('open', () => { const socket = ws._socket; const originalPush = socket.push.bind(socket);
socket.push = function (chunk, encoding) { if (chunk) { console.log('First 20 bytes (hex):', chunk.slice(0, 20).toString('hex')); const byte0 = chunk[0]; console.log(`FIN: ${!!(byte0 & 0x80)}, RSV1: ${!!(byte0 & 0x40)}, Opcode: ${byte0 & 0x0f}`);
// Check if it's actually HTTP text if (chunk.slice(0, 4).toString() === 'HTTP') { console.log('*** RECEIVED RAW HTTP ON WEBSOCKET ***'); } } return originalPush(chunk, encoding); }; }); ```
### Key Hex Patterns
- `81` = FIN + text frame (normal) - `82` = FIN + binary frame (normal) - `88` = FIN + close frame (normal) - `48545450` = "HTTP" - raw HTTP on WebSocket (bug!) - `c1` or similar with bit 6 set = compressed frame (RSV1=1)
## Common Mistakes
| Mistake | Result | Fix | | ----------------------------------------------- | ---------------------------- | ----------------------------------------- | | Multiple WSS with `server` option | HTTP 400 written to socket | Use `noServer: true` | | `perMessageDeflate: true` (default in older ws) | RSV1 set on frames | Explicitly set `perMessageDeflate: false` | | Not checking upgrade headers | Miss compression negotiation | Log `sec-websocket-extensions` header | | Assuming RSV1 error = compression | Could be raw HTTP | Check if bytes decode as ASCII "HTTP" |
## Verification Checklist
After fixing, verify:
- [ ] `RSV1: false` in frame inspection - [ ] `Extensions header: NONE` in upgrade response - [ ] No `HTTP/1.1` in raw frame data - [ ] Messages received match sent payload size - [ ] Multiple broadcasts work (test interval sends)
Source provenance
Decision snapshot
813 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for debugging-websocket-issues, ready for a manual X post.
debugging-websocket-issues: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ER... 813 stars https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x
Listing + install path for debugging-websocket-issues: https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x Install: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to AgentWorkforce but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues/audit)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)AgentWorkforce
@agentworkforce
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "debugging-websocket-issues" agent skill from https://github.com/AgentWorkforce/relay/tree/main/.claude/skills/debugging-websocket-issues. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"agentworkforce-debugging-websocket-issues","task":"Install debugging-websocket-issues","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Maintenance
fresh
1d since push
Risk
Needs review
Financial research output is not financial advice; require human review before any live investment decision
GitHub quality
813
80/100 Quality · 83/100 Trust
Coverage tags
Review notes
Financial research output is not financial advice; require human review before any live investment decision · Financial research output is not financial advice; require human review before any live investment decision.
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
813 GitHub stars
Repo activity
813 stars, 64 forks
Maintenance
1d since push
License
Apache-2.0
Install
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
Agent should check
Copy prompt
Task: Use debugging-websocket-issues in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install
Install command: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
LLM text format
/api/skills/agentworkforce-debugging-websocket-issues/install?format=text
Find alternatives
/api/skills/search?q=debugging-websocket-issues&limit=3
Agent prompt
Use debugging-websocket-issues for this task. Review https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install, then install with: npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/agentworkforce-debugging-websocket-issues
LLM text
/api/registry/manifest/agentworkforce-debugging-websocket-issues?format=text
Install alias
/api/registry/install/agentworkforce-debugging-websocket-issues
Recommend
/api/registry/recommend?task=Use%20debugging-websocket-issues%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO813 GitHub stars
Stars/forks activity
INFO813 stars, 64 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: debugging-websocket-issues description: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques tags: websocket, debugging, ws, node ---
# 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:
```typescript // ❌ 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
### Solution
Use `noServer: true` and manually route upgrades:
```typescript // ✅ GOOD - Single upgrade handler routes to correct server const wss1 = new WebSocketServer({ noServer: true, perMessageDeflate: false }); const wss2 = new WebSocketServer({ noServer: true, perMessageDeflate: false });
server.on('upgrade', (request, socket, head) => { const pathname = new URL(request.url || '', `http://${request.headers.host}`).pathname;
if (pathname === '/ws') { wss1.handleUpgrade(request, socket, head, (ws) => { wss1.emit('connection', ws, request); }); } else if (pathname === '/ws/other') { wss2.handleUpgrade(request, socket, head, (ws) => { wss2.emit('connection', ws, request); }); } else { socket.destroy(); } }); ```
## Debugging Techniques
### Raw Frame Inspection
Hook into the socket to see actual bytes received:
```typescript ws.on('open', () => { const socket = ws._socket; const originalPush = socket.push.bind(socket);
socket.push = function (chunk, encoding) { if (chunk) { console.log('First 20 bytes (hex):', chunk.slice(0, 20).toString('hex')); const byte0 = chunk[0]; console.log(`FIN: ${!!(byte0 & 0x80)}, RSV1: ${!!(byte0 & 0x40)}, Opcode: ${byte0 & 0x0f}`);
// Check if it's actually HTTP text if (chunk.slice(0, 4).toString() === 'HTTP') { console.log('*** RECEIVED RAW HTTP ON WEBSOCKET ***'); } } return originalPush(chunk, encoding); }; }); ```
### Key Hex Patterns
- `81` = FIN + text frame (normal) - `82` = FIN + binary frame (normal) - `88` = FIN + close frame (normal) - `48545450` = "HTTP" - raw HTTP on WebSocket (bug!) - `c1` or similar with bit 6 set = compressed frame (RSV1=1)
## Common Mistakes
| Mistake | Result | Fix | | ----------------------------------------------- | ---------------------------- | ----------------------------------------- | | Multiple WSS with `server` option | HTTP 400 written to socket | Use `noServer: true` | | `perMessageDeflate: true` (default in older ws) | RSV1 set on frames | Explicitly set `perMessageDeflate: false` | | Not checking upgrade headers | Miss compression negotiation | Log `sec-websocket-extensions` header | | Assuming RSV1 error = compression | Could be raw HTTP | Check if bytes decode as ASCII "HTTP" |
## Verification Checklist
After fixing, verify:
- [ ] `RSV1: false` in frame inspection - [ ] `Extensions header: NONE` in upgrade response - [ ] No `HTTP/1.1` in raw frame data - [ ] Messages received match sent payload size - [ ] Multiple broadcasts work (test interval sends)
Source provenance
Decision snapshot
813 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for debugging-websocket-issues, ready for a manual X post.
debugging-websocket-issues: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ER... 813 stars https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x
Listing + install path for debugging-websocket-issues: https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x Install: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to AgentWorkforce but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues/audit)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)AgentWorkforce
@agentworkforce
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "debugging-websocket-issues" agent skill from https://github.com/AgentWorkforce/relay/tree/main/.claude/skills/debugging-websocket-issues. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"agentworkforce-debugging-websocket-issues","task":"Install debugging-websocket-issues","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Maintenance
fresh
1d since push
Risk
Needs review
Financial research output is not financial advice; require human review before any live investment decision
GitHub quality
813
80/100 Quality · 83/100 Trust
Coverage tags
Review notes
Financial research output is not financial advice; require human review before any live investment decision · Financial research output is not financial advice; require human review before any live investment decision.
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
813 GitHub stars
Repo activity
813 stars, 64 forks
Maintenance
1d since push
License
Apache-2.0
Install
npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
Agent should check
Copy prompt
Task: Use debugging-websocket-issues in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20debugging-websocket-issues%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install
Install command: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/agentworkforce-debugging-websocket-issues/install
LLM text format
/api/skills/agentworkforce-debugging-websocket-issues/install?format=text
Find alternatives
/api/skills/search?q=debugging-websocket-issues&limit=3
Agent prompt
Use debugging-websocket-issues for this task. Review https://www.openagentskill.com/api/skills/agentworkforce-debugging-websocket-issues/install, then install with: npx skills add AgentWorkforce/relay --skill debugging-websocket-issuesRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/agentworkforce-debugging-websocket-issues
LLM text
/api/registry/manifest/agentworkforce-debugging-websocket-issues?format=text
Install alias
/api/registry/install/agentworkforce-debugging-websocket-issues
Recommend
/api/registry/recommend?task=Use%20debugging-websocket-issues%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO813 GitHub stars
Stars/forks activity
INFO813 stars, 64 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Scrape, clean, and reuse web data
A practical workflow for agents that crawl public pages, extract clean content, normalize data, and hand it to downstream research or RAG workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: debugging-websocket-issues description: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ERR_UNEXPECTED_RSV_1" - covers multiple WebSocketServer conflicts, compression issues, and raw frame debugging techniques tags: websocket, debugging, ws, node ---
# 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:
```typescript // ❌ 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
### Solution
Use `noServer: true` and manually route upgrades:
```typescript // ✅ GOOD - Single upgrade handler routes to correct server const wss1 = new WebSocketServer({ noServer: true, perMessageDeflate: false }); const wss2 = new WebSocketServer({ noServer: true, perMessageDeflate: false });
server.on('upgrade', (request, socket, head) => { const pathname = new URL(request.url || '', `http://${request.headers.host}`).pathname;
if (pathname === '/ws') { wss1.handleUpgrade(request, socket, head, (ws) => { wss1.emit('connection', ws, request); }); } else if (pathname === '/ws/other') { wss2.handleUpgrade(request, socket, head, (ws) => { wss2.emit('connection', ws, request); }); } else { socket.destroy(); } }); ```
## Debugging Techniques
### Raw Frame Inspection
Hook into the socket to see actual bytes received:
```typescript ws.on('open', () => { const socket = ws._socket; const originalPush = socket.push.bind(socket);
socket.push = function (chunk, encoding) { if (chunk) { console.log('First 20 bytes (hex):', chunk.slice(0, 20).toString('hex')); const byte0 = chunk[0]; console.log(`FIN: ${!!(byte0 & 0x80)}, RSV1: ${!!(byte0 & 0x40)}, Opcode: ${byte0 & 0x0f}`);
// Check if it's actually HTTP text if (chunk.slice(0, 4).toString() === 'HTTP') { console.log('*** RECEIVED RAW HTTP ON WEBSOCKET ***'); } } return originalPush(chunk, encoding); }; }); ```
### Key Hex Patterns
- `81` = FIN + text frame (normal) - `82` = FIN + binary frame (normal) - `88` = FIN + close frame (normal) - `48545450` = "HTTP" - raw HTTP on WebSocket (bug!) - `c1` or similar with bit 6 set = compressed frame (RSV1=1)
## Common Mistakes
| Mistake | Result | Fix | | ----------------------------------------------- | ---------------------------- | ----------------------------------------- | | Multiple WSS with `server` option | HTTP 400 written to socket | Use `noServer: true` | | `perMessageDeflate: true` (default in older ws) | RSV1 set on frames | Explicitly set `perMessageDeflate: false` | | Not checking upgrade headers | Miss compression negotiation | Log `sec-websocket-extensions` header | | Assuming RSV1 error = compression | Could be raw HTTP | Check if bytes decode as ASCII "HTTP" |
## Verification Checklist
After fixing, verify:
- [ ] `RSV1: false` in frame inspection - [ ] `Extensions header: NONE` in upgrade response - [ ] No `HTTP/1.1` in raw frame data - [ ] Messages received match sent payload size - [ ] Multiple broadcasts work (test interval sends)
Source provenance
Decision snapshot
813 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for debugging-websocket-issues, ready for a manual X post.
debugging-websocket-issues: Use when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WS_ER... 813 stars https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x
Listing + install path for debugging-websocket-issues: https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=x Install: npx skills add AgentWorkforce/relay --skill debugging-websocket-issues
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to AgentWorkforce but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues/audit)
[](https://www.openagentskill.com/skills/agentworkforce-debugging-websocket-issues?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)AgentWorkforce
@agentworkforce
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsPermission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness