Deep WebSocket connection knowledge: FoxgloveWebSocketPlayer state machine, WorkerSocketAdapter postMessage protocol, the Foxglove WebSocket protocol handshake, RAF-based state emission, and reconnection.
70%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/websocket-connection/SKILL.mdThe real-time data path from a robot/simulation/bridge to visualization.
Foxglove WebSocket Server (robot/bridge)
│ WebSocket protocol
▼
WorkerSocketAdapter (Worker thread)
│ postMessage (raw, not Comlink)
▼
FoxgloveWebSocketPlayer (main thread)
│
▼
MessagePipeline → Panels| File | Role |
|---|---|
packages/suite-base/src/players/FoxgloveWebSocketPlayer/index.ts | Player implementation for WebSocket connections |
packages/suite-base/src/players/FoxgloveWebSocketPlayer/WorkerSocketAdapter.ts | Offloads WebSocket I/O to a Worker |
packages/suite-base/src/players/FoxgloveWebSocketPlayer/worker.ts | Worker-side WebSocket handling |
serverInfo (capabilities, session ID)advertise with available channels (topic + schema)subscribe with channel IDsmessageData binary framespublish messages back to the serverserverInfo — server capabilities, session IDadvertise / unadvertise — channel availability (topics can appear/disappear)subscribe / unsubscribe — client topic selectionmessageData — binary message payload with channel ID + timestamptime — server clock synchronizationparameterValues — server parametersparsedMessages queuerequestAnimationFrame → emits state to the pipelineadvertise/unadvertise dynamicallyrequestAnimationFrame-driven flush of the message queuepostMessage (not Comlink)Transferable ArrayBuffersArrayBuffer transferred from the Worker (zero-copy)web-workers skilldeserialization skilllichtblick-suite/lichtblick
9589f38
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.