{"id":"e8d6536f-e275-43a1-96ce-095d46bc622f","shortId":"UPTdDT","kind":"skill","title":"litestar-realtime","tagline":"Auto-activate for @websocket, WebSocket, ServerSentEvent, SSE, ChannelsPlugin, ChannelsBackend, stream_pubsub, channel subscriptions, realtime events, or cross-process fan-out. Use when implementing Litestar WebSockets, SSE, Channels, or event publishing. Not for polling-only API","description":"# Litestar Realtime\n\nUse this skill for WebSockets, SSE, ChannelsPlugin backends, realtime event contracts, and fan-out from workers or services.\n\n## Code Style Rules\n\n- Use plain WebSocket handlers for one-off streams.\n- Use ChannelsPlugin when dynamic topics, history, or cross-process fan-out matter.\n- Choose the backend that matches the existing stack.\n- Treat WebSocket auth separately from HTTP header auth constraints.\n\n## Quick Reference\n\n- WebSocket and Channels patterns: [websockets.md](references/websockets.md)\n- Event contract patterns: [realtime-events.md](references/realtime-events.md)\n- Pair with [litestar-auth-guards](../litestar-auth-guards/SKILL.md) for socket auth.\n\n<workflow>\n\n## Workflow\n\n1. Choose WebSocket, SSE, or Channels based on delivery needs.\n2. Define event contracts before wiring transport.\n3. Select a backend that fits the project stack.\n4. Test connection, auth, fan-out, disconnect, and error paths.\n\n</workflow>\n\n<guardrails>\n\n## Guardrails\n\n- Do not force Redis into a PostgreSQL-only stack just for Channels.\n- Do not assume browsers can set arbitrary WebSocket headers.\n- Do not publish untyped event dicts across service boundaries.\n- Do not use request-scoped resources after the socket lifecycle ends.\n\n</guardrails>\n\n<validation>\n\n## Validation Checkpoint\n\n- [ ] Transport choice matches the user experience.\n- [ ] Event payloads are typed.\n- [ ] Backend choice matches the stack.\n- [ ] Auth and disconnect behavior are tested.\n\n</validation>\n\n<example>\n\n## Example\n\n```python\nfrom litestar import websocket\n\n@websocket(\"/ws\")\nasync def stream(socket: WebSocket) -> None:\n    await socket.accept()\n    await socket.send_json({\"type\": \"ready\"})\n```\n\n</example>\n\n## References Index\n\n- [websockets.md](references/websockets.md)\n- [realtime-events.md](references/realtime-events.md)\n\n## Official References\n\n- <https://docs.litestar.dev/> - Litestar documentation\n- <https://docs.litestar.dev/latest/reference/> - Litestar API reference\n\n## Shared Styleguide Baseline\n\n- [General](../litestar-styleguide/references/general.md)\n- [Python](../litestar-styleguide/references/python.md)\n- [Litestar](../litestar-styleguide/references/litestar.md)","tags":["litestar","realtime","skills","litestar-org","advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx"],"capabilities":["skill","source-litestar-org","skill-litestar-realtime","topic-advanced-alchemy","topic-agent-skills","topic-agentskills","topic-ai-agents","topic-claude-code-plugin","topic-claude-code-skills","topic-gemini-cli-extension","topic-htmx","topic-inertia","topic-litestar","topic-mcp","topic-python"],"categories":["litestar-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/litestar-org/litestar-skills/litestar-realtime","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add litestar-org/litestar-skills","source_repo":"https://github.com/litestar-org/litestar-skills","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (2,190 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:54.489Z","embedding":null,"createdAt":"2026-05-18T13:20:58.219Z","updatedAt":"2026-05-18T19:13:54.489Z","lastSeenAt":"2026-05-18T19:13:54.489Z","tsv":"'/latest/reference/':269 '/litestar-auth-guards/skill.md':126 '/litestar-styleguide/references/general.md':277 '/litestar-styleguide/references/litestar.md':281 '/litestar-styleguide/references/python.md':279 '/ws':242 '1':131 '2':141 '3':148 '4':157 'across':197 'activ':6 'api':42,271 'arbitrari':188 'assum':184 'async':243 'auth':100,105,124,129,160,229 'auto':5 'auto-activ':4 'await':249,251 'backend':52,92,151,224 'base':137 'baselin':275 'behavior':232 'boundari':199 'browser':185 'channel':16,33,111,136,181 'channelsbackend':13 'channelsplugin':12,51,77 'checkpoint':213 'choic':215,225 'choos':90,132 'code':64 'connect':159 'constraint':106 'contract':55,116,144 'cross':22,84 'cross-process':21,83 'def':244 'defin':142 'deliveri':139 'dict':196 'disconnect':164,231 'docs.litestar.dev':264,268 'docs.litestar.dev/latest/reference/':267 'document':266 'dynam':79 'end':211 'error':166 'event':19,35,54,115,143,195,220 'exampl':235 'exist':96 'experi':219 'fan':25,58,87,162 'fan-out':24,57,86,161 'fit':153 'forc':171 'general':276 'guard':125 'guardrail':168 'handler':70 'header':104,190 'histori':81 'http':103 'implement':29 'import':239 'index':257 'json':253 'lifecycl':210 'litestar':2,30,43,123,238,265,270,280 'litestar-auth-guard':122 'litestar-realtim':1 'match':94,216,226 'matter':89 'need':140 'none':248 'offici':262 'one':73 'one-off':72 'pair':120 'path':167 'pattern':112,117 'payload':221 'plain':68 'poll':40 'polling-on':39 'postgresql':176 'postgresql-on':175 'process':23,85 'project':155 'publish':36,193 'pubsub':15 'python':236,278 'quick':107 'readi':255 'realtim':3,18,44,53 'realtime-events.md':118,260 'redi':172 'refer':108,256,263,272 'references/realtime-events.md':119,261 'references/websockets.md':114,259 'request':204 'request-scop':203 'resourc':206 'rule':66 'scope':205 'select':149 'separ':101 'serversentev':10 'servic':63,198 'set':187 'share':273 'skill':47 'skill-litestar-realtime' 'socket':128,209,246 'socket.accept':250 'socket.send':252 'source-litestar-org' 'sse':11,32,50,134 'stack':97,156,178,228 'stream':14,75,245 'style':65 'styleguid':274 'subscript':17 'test':158,234 'topic':80 'topic-advanced-alchemy' 'topic-agent-skills' 'topic-agentskills' 'topic-ai-agents' 'topic-claude-code-plugin' 'topic-claude-code-skills' 'topic-gemini-cli-extension' 'topic-htmx' 'topic-inertia' 'topic-litestar' 'topic-mcp' 'topic-python' 'transport':147,214 'treat':98 'type':223,254 'untyp':194 'use':27,45,67,76,202 'user':218 'valid':212 'websocket':8,9,31,49,69,99,109,133,189,240,241,247 'websockets.md':113,258 'wire':146 'worker':61 'workflow':130","prices":[{"id":"7a3bf93a-c507-4986-9644-9b020a2e9a0d","listingId":"e8d6536f-e275-43a1-96ce-095d46bc622f","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"litestar-org","category":"litestar-skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:58.219Z"}],"sources":[{"listingId":"e8d6536f-e275-43a1-96ce-095d46bc622f","source":"github","sourceId":"litestar-org/litestar-skills/litestar-realtime","sourceUrl":"https://github.com/litestar-org/litestar-skills/tree/main/skills/litestar-realtime","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:58.219Z","lastSeenAt":"2026-05-18T19:13:54.489Z"}],"details":{"listingId":"e8d6536f-e275-43a1-96ce-095d46bc622f","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"litestar-org","slug":"litestar-realtime","github":{"repo":"litestar-org/litestar-skills","stars":7,"topics":["advanced-alchemy","agent-skills","agentskills","ai-agents","claude-code-plugin","claude-code-skills","gemini-cli-extension","htmx","inertia","litestar","mcp","python","sqlspec"],"license":"mit","html_url":"https://github.com/litestar-org/litestar-skills","pushed_at":"2026-05-13T16:04:09Z","description":"Opinionated first-party agent skills, plugins, subagents, slash commands, and MCP servers for the Litestar framework ecosystem — publishable to Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and VS Code/Copilot from a single repo.","skill_md_sha":"40707a973f6d012bda04c34ea6c4abdb76914d06","skill_md_path":"skills/litestar-realtime/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/litestar-org/litestar-skills/tree/main/skills/litestar-realtime"},"layout":"multi","source":"github","category":"litestar-skills","frontmatter":{"name":"litestar-realtime","description":"Auto-activate for @websocket, WebSocket, ServerSentEvent, SSE, ChannelsPlugin, ChannelsBackend, stream_pubsub, channel subscriptions, realtime events, or cross-process fan-out. Use when implementing Litestar WebSockets, SSE, Channels, or event publishing. Not for polling-only APIs or frontend socket clients alone."},"skills_sh_url":"https://skills.sh/litestar-org/litestar-skills/litestar-realtime"},"updatedAt":"2026-05-18T19:13:54.489Z"}}