Configure Litestar plugin architecture and ecosystem integrations, including custom Init/DI/serialization/route plugins, SQLAlchemy plugin stacks, Pydantic plugin surfaces, Piccolo DTO usage, and model-bound transport support for dataclasses, msgspec, attrs, and TypedDict. Use when selecting, wiring, or debugging plugin-driven behavior at application boundaries. Do not use for unrelated framework setup that does not involve Litestar plugin protocols, plugin registration, or plugin-backed transport/model integration.
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.
Apply Litestar request lifecycle hooks with `before_request`, `after_request`, and `after_response` for request enrichment, short-circuiting, response mutation, post-send side effects, and layered cross-cutting behavior around handler execution. Use when logic should run immediately before the handler, after the response object is resolved, or after the response has been sent. Do not use for startup/shutdown ownership, `before_send` / `after_exception` / `on_app_init`, decoupled event fanout, or raw ASGI wrapping that belongs in app setup, events, or middleware.
Configure Litestar response caching with route-level `cache` controls, app-level `ResponseCacheConfig`, store selection, TTL strategy, cache key design, and `cache_response_filter` rules. Use when optimizing read-heavy or polling-heavy Litestar endpoints without breaking correctness for tenant-, locale-, or auth-scoped responses. Do not use for write-heavy or immediately consistent workflows unless cache invalidation or versioning is designed explicitly.
Build HTMX-driven Litestar flows with `HTMXPlugin`, `HTMXRequest`, `request.htmx`, `HTMXTemplate`, and HTMX response classes such as `HXLocation`, `PushUrl`, `ReplaceUrl`, `Reswap`, `Retarget`, `TriggerEvent`, `ClientRedirect`, `ClientRefresh`, and `HXStopPolling`. Use when implementing server-rendered partial updates, progressive enhancement, polling, redirects, or history-aware HTML interactions. Do not use for SPA-only JSON APIs that do not exchange HTML or HTMX headers.
Serve static assets in Litestar with `create_static_files_router()`, explicit mount paths, HTML mode, cache-control policy, URL reversal, custom file systems, and symlink-safe directory boundaries. Use when exposing JS, CSS, images, downloadable artifacts, or static HTML from controlled directories. Do not use for upload ingestion, user-writable file publication, or arbitrary file-download endpoints that need per-request authorization logic.
Design cache-aware Advanced Alchemy usage, including deterministic read paths, SQLAlchemy statement-cache-safe custom type configuration, and framework-level response caching around repository and service queries. Use when repeated read workloads need performance tuning without corrupting data semantics, or when custom types or filters interfere with cacheability. Do not use as a substitute for correctness in repository or service design.
Use Advanced Alchemy's CLI for migrations, revision management, inspection, branching, fixture dumping, and framework CLI integration. Use when setting up or operating Alembic migrations through `alchemy`, `litestar database`, or `flask database`, or when embedding the commands into Click or Typer applications. Do not use for runtime repository or service logic.