Chat Signal¶
GitHub Repo | Chrome Web Store | Updated: October 31, 2026
A Chrome extension that uses Rust compiled to WebAssembly to analyze YouTube and Twitch live chat in real time. Built for creators and moderators who need to keep up with fast-moving chat without missing the signals buried in the noise. Version 2.1 runs entirely on the device: AI summaries use Chrome's built-in Gemini Nano, the clustering model ships inside the extension, and the extension makes no external network connections.
Tech Stack: - Rust (compiled to WebAssembly) - Chrome Extension (Manifest V3, Side Panel) - JavaScript (extension UI and glue) - MiniLM sentence encoder via Transformers.js (WebGPU with WASM fallback, bundled) - Chrome built-in AI (Gemini Nano, Prompt API) - DOMPurify (pinned, vendored)
Why I Built This¶
If you've ever watched a live stream with an active chat, you know the problem. Messages fly by at 20, 50, sometimes 100 per minute. Questions get buried before the streamer can see them. The mood shifts as viewers react to what's on screen. Topics surface and fade within seconds. For a creator trying to engage with an audience, it's like drinking from a fire hose.
I wanted a tool that could watch the chat for me and surface what actually matters. Not a message counter or a keyword filter, but something that knows the difference between a question, a bug report, and general hype, notices when the room goes from excited to confused, and shows what people are talking about right now.
It also had to be private. Chat is other people's words. All analysis happens in the browser, and as of version 2.1 the extension can prove it: its content security policy only allows connections to itself.
How It Works¶
Chat Stream
↓
Content Script (observes DOM, captures every message in a burst)
↓
Message Batching (every 5 seconds)
↓
WASM Analysis Engine (Rust)
├── Keyword Clustering (Questions, Issues, Requests, General)
├── Topic Extraction (word frequency, stop-word filtering)
└── Sentiment Signals (lexicon-based mood detection)
↓
Semantic Pipeline (bundled MiniLM, when available)
└── Cosine similarity to prototype vectors overrides keyword clusters
↓
On-Device AI (Gemini Nano, when available)
└── Chat summary + mood refinement, rule-based fallback otherwise
↓
Side Panel UI
├── Mood Indicator
├── Trending Topics
├── Message Clusters (Semantic or Keyword badge)
├── AI Summary
└── Session History
The content script watches the YouTube or Twitch chat DOM and sends a batch to the side panel every 5 seconds. The Rust engine handles keyword clustering, topic extraction, and sentiment. When the bundled MiniLM encoder is ready, it turns each message into a 384-dimension embedding and routes it to the closest category by cosine similarity, which handles slang and phrasing far better than keywords alone. A badge in the UI shows which mode is active.
Summaries run on Chrome's built-in Gemini Nano with a fresh session for every call. Chat is untrusted input going into a language model, so the pipeline sanitizes chat samples, fences them as untrusted data, coerces unexpected answers back into a fixed vocabulary, and validates the summary before showing it. If the browser can't run built-in AI, Chat Signal falls back to rule-based analysis and suggests updating Chrome.
The extension asks for two permissions, sidePanel and storage, and its CSP is connect-src 'self'. Nothing is downloaded at runtime.
What I Learned¶
Compiling Rust to WASM for an extension is smooth with wasm-pack, but the boundary between JavaScript and Rust needs care. I validate everything on the JS side before it crosses into the engine, and everything that comes back out before it reaches the DOM.
Manifest V3 is strict, and that's a good thing. No inline scripts, no dynamic code, careful DOM handling. Chat-derived HTML goes through DOMPurify, which makes DOMPurify the extension's XSS boundary, so I pin it, record its hash, and keep it current. Text that never touches HTML goes through textContent and nothing else. Escaping it first turned out to be a bug, not extra safety: a <3 was rendering as <3.
Real-time text analysis is harder than it looks. Early versions were too sensitive to spam and noise, so the engine filters stop words, ignores repeated messages, and waits for at least 3 sentiment-bearing messages before showing a mood. When I first built this, I wrote that embedding-based clustering would be the next step. Version 2.0 added it, and it was the right call.
The biggest lesson came from version 2.1. The earlier AI path downloaded a roughly 400 MB model and needed a CSP that allowed outside hosts. Moving to the browser's built-in model let me remove the download, the consent modal, the extra hosts, and the unlimitedStorage permission. The AI swap was how I earned a tighter security posture, and the posture was the real win.
Links¶
- Chrome Web Store
- chatsignal.dev
- GitHub Repository
- Changelog
- Blog post: Chat Signal 2.1, Almost Two Months In
- Privacy Policy
A browser-based tool for creators who want to understand their live chat in real time, without any of it leaving their machine.