plugins/litestar/skills/litestar-channels/SKILL.md
Implement Litestar channels with ChannelsPlugin, backend selection, subscriber lifecycle, publish and subscribe flows, history management, backpressure strategy, and websocket integration. Use when building broker-backed event streams, server-side fanout, or reusable publish-subscribe flows in Litestar. Do not use for simple request-response APIs or one-off websocket loops without channel semantics.
npx skillsauth add alti3/litestar-skills litestar-channelsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
channels plugin.start_subscription(), subscribe(), unsubscribe(), and cleanup.ChannelsPlugin as the central routing and fanout component.channels dependency instead of importing global plugin instances inside handlers.run_in_background() over manual iter_events() loops when concurrent websocket receive work is required.MemoryChannelsBackend for local development, tests, and single-process deployments.RedisChannelsPubSubBackend when low-latency fanout matters more than history.RedisChannelsStreamBackend when history replay is required.Read only the sections you need:
iter_events() beside a websocket receive loop without understanding disconnect risks.litestar-websockets for client-facing websocket contract design and handler selection.litestar-testing for subscriber, history, and websocket-fanout test coverage.litestar-metrics and litestar-logging for throughput, lag, and delivery observability.litestar-dependency-injection when publishers or subscriber callbacks need injected services.development
Build Litestar WebSocket endpoints with low-level websocket handlers, websocket listeners, websocket streams, dependency injection, custom websocket classes, transport-mode control, and graceful connection lifecycle handling. Use when implementing bidirectional real-time communication, reactive websocket message handling, or proactive server push over WebSockets. Do not use for server-side pub/sub fanout that is better expressed with channels alone.
tools
Test Litestar applications with TestClient, AsyncTestClient, create_test_client, websocket test helpers, dependency overrides, mocked dependencies, lifecycle-aware fixtures, and deterministic success and failure assertions. Use when adding or fixing Litestar test coverage, including exception contracts, override precedence, websocket behavior, event-bus side effects, or live-server-only response patterns. Do not use as a substitute for production observability or runtime debugging strategy.
development
Configure Litestar templating with `TemplateConfig`, Jinja/Mako/MiniJinja engines, file-or-string `Template` responses, request and CSRF-aware context, template callables, and custom engine integration. Use when implementing or fixing server-rendered HTML in Litestar. Do not use for static asset serving or pure JSON API endpoints.
development
Configure Litestar stores and the store registry for caching, server-side sessions, rate limiting, and other key-value state with explicit backend selection, bytes-safe data handling, TTL and renewal policy, namespacing, registry wiring, and lifecycle cleanup. Use when a Litestar app depends on `MemoryStore`, `FileStore`, `RedisStore`, `ValkeyStore`, or `StoreRegistry`. Do not use for relational persistence, domain repositories, or response-caching policy details that belong in database or caching-focused skills.