一键导入
websocket-flow
Guide for adding new WebSocket commands and API endpoints to Visdom
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guide for adding new WebSocket commands and API endpoints to Visdom
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Diagnose and fix GitHub Actions workflow failures. Use when CI jobs fail for lint, tests, JS build updates, or release automation.
Safely modify environment serialization, reload data, and view layout persistence. Use when changing env save/load formats or storage behavior.
Build and debug pane lifecycle behavior in the React frontend. Use when adding pane actions, layout behavior, rendering updates, or pane-level interactions.
Keep feature behavior identical across WebSocket and polling transport modes. Use when adding socket commands, event flows, or transport-sensitive UI updates.
Step-by-step guide for adding a new visualization pane type to Visdom (client, server, frontend, tests)
Modify login/authentication paths safely for browser and Python client flows
| name | websocket-flow |
| description | Guide for adding new WebSocket commands and API endpoints to Visdom |
Use this skill when adding new real-time WebSocket commands or HTTP API endpoints to Visdom.
Socket handler (py/visdom/server/handlers/socket_handlers.py):
elif cmd == "my_command": in AnySocketHandlerOrWrapper.on_message()broadcast() to push updates to subscriberssend_to_sources() to push events to Python clientsFrontend (js/api/ApiProvider.js):
sendMyCommand function that calls sendSocketMessage({cmd: 'my_command', ...})ApiContext.Provider valueMessage handling (js/api/ApiProvider.js):
case 'my_response': in handleMessage() switch statementHandler (py/visdom/server/handlers/web_handlers.py):
BaseHandlerinitialize(self, app) copying required app attributespost() with @check_auth decoratorRoute (py/visdom/server/app.py):
Application.__init__() (lines 97-116)(r"%s/my_endpoint" % self.base_url, MyHandler, {"app": self})IndexHandler routeClient (py/visdom/__init__.py):
self._send(msg, endpoint="my_endpoint")@check_auth decoratorinitialize() — do not use self.appfunctional-test and functional-test-polling CI jobspy/visdom/server/app.pypy/visdom/server/handlers/socket_handlers.pypy/visdom/server/handlers/web_handlers.pyjs/api/ApiProvider.jsAGENTS.mdCONTRIBUTING.mdassets/README.md and store templates/resources in assets/.references/TESTS.md.