websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
Best use case
websocket-realtime is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
Teams using websocket-realtime should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/websocket-realtime/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How websocket-realtime Compares
| Feature / Agent | websocket-realtime | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# websocket-realtime
Receive live vote updates from poll-builder via WebSocket.
## Connection
```
ws://localhost:3000/ws
```
## Protocol
### Subscribe to a poll
After connecting, send a subscribe message with the poll slug:
```json
{ "type": "subscribe", "slug": "k9xm2q4r" }
```
### Receive updates
The server sends an update message after each successful vote:
```json
{
"type": "update",
"slug": "k9xm2q4r",
"results": [
{ "optionId": 1, "text": "Mobile app", "votes": 396, "pct": 48.1 },
{ "optionId": 2, "text": "API improvements", "votes": 255, "pct": 31.0 },
{ "optionId": 3, "text": "Better docs", "votes": 123, "pct": 14.9 },
{ "optionId": 4, "text": "Admin dashboard", "votes": 50, "pct": 6.1 }
],
"totalVotes": 824
}
```
### Unsubscribe
Close the connection or send:
```json
{ "type": "unsubscribe", "slug": "k9xm2q4r" }
```
## Example (Node.js)
```javascript
import WebSocket from 'ws';
const ws = new WebSocket('ws://localhost:3000/ws');
ws.on('open', () => {
ws.send(JSON.stringify({ type: 'subscribe', slug: 'k9xm2q4r' }));
});
ws.on('message', (data) => {
const msg = JSON.parse(data.toString());
if (msg.type === 'update') {
console.log(`Total votes: ${msg.totalVotes}`);
msg.results.forEach(r => {
console.log(` ${r.text}: ${r.votes} (${r.pct}%)`);
});
}
});
```
## Multiple subscriptions
A single WebSocket connection can subscribe to multiple polls:
```json
{ "type": "subscribe", "slug": "k9xm2q4r" }
{ "type": "subscribe", "slug": "7bwq1pz3" }
```
Each update message includes the `slug` field to identify which poll triggered it.
## Error handling
If the slug does not exist:
```json
{ "type": "error", "message": "poll_not_found", "slug": "k9xm2q4r" }
```
The connection remains open - you can subscribe to other slugs.
## Notes
- Updates are broadcast only to clients subscribed to the relevant slug
- Closed polls do not generate updates (no new votes accepted)
- The WebSocket server is part of the same Node.js process as the HTTP server
- No authentication required for public WebSocket connectionsRelated Skills
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose
Skill: Pastebin Core
## Purpose
Skill: Cost Reporting
## Overview