plugins/litestar/skills/litestar-file-uploads/SKILL.md
Handle Litestar multipart file uploads securely with `UploadFile`, typed multipart models, multi-file inputs, request body limits, and storage-safe processing patterns. Use when accepting single or multiple uploaded files in request bodies, especially multipart form-data endpoints. Do not use for generic request parsing, static asset serving, or download response behavior.
npx skillsauth add alti3/litestar-skills litestar-file-uploadsInstall 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.
UploadFile, typed multipart model, dict[str, UploadFile], or list[UploadFile].Body(media_type=RequestEncodingType.MULTI_PART).UploadFile or multipart container models.dict[str, UploadFile] or list[UploadFile] only when the field layout is dynamic or intentionally loose.request_max_body_size when defaults are not sufficient.litestar-requests for broader request-parsing concerns.UploadFile when one file is the entire body contract.dict[str, UploadFile] when filenames/field names are dynamic and validation is minimal.list[UploadFile] when the files are homogeneous and field names do not matter.data.file.read() in sync handlers.request_max_body_size for sensitive upload endpoints unless a larger bound is justified.Read only the sections you need:
UploadFile internals, safe processing guidance, and test patterns, read references/limits-and-testing.md.dict[str, UploadFile] as the default when the form shape is actually known.litestar-requests for non-file request parsing and mixed request contract design.litestar-responses for download and file-serving behavior after upload.litestar-testing for multipart and size-limit regression coverage.litestar-security when upload endpoints need auth, secret transport, or strict policy enforcement.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.