Skillquality 0.45

litestar-middleware

Auto-activate for AbstractMiddleware, DefineMiddleware, MiddlewareProtocol, middleware=, CORSConfig, CSRFConfig, AllowedHostsConfig, CompressionConfig, request IDs, auth middleware, or ASGI scope filtering. Use when configuring Litestar middleware or cross-cutting request behavio

Price
free
Protocol
skill
Verified
no

What it does

Litestar Middleware

Use this skill for built-in middleware config, custom ASGI middleware, request lifecycle hooks, and auth user loading.

Code Style Rules

  • Use built-in middleware configs before custom middleware.
  • Keep middleware focused on cross-cutting request behavior.
  • Filter by ASGI scope when middleware applies only to HTTP or WebSocket.
  • Keep business policy in Guards and services.

Quick Reference

<workflow>

Workflow

  1. Decide whether a built-in config solves the need.
  2. Choose custom middleware only for cross-cutting behavior.
  3. Set ordering deliberately.
  4. Verify HTTP and WebSocket behavior separately when both apply.
</workflow> <guardrails>

Guardrails

  • Do not put business workflows in middleware.
  • Do not apply HTTP-only middleware to WebSocket scopes.
  • Do not mutate request state without documenting the key.
  • Do not duplicate Guard policy in middleware.
</guardrails> <validation>

Validation Checkpoint

  • Middleware order is intentional.
  • Scope filtering is correct.
  • Built-in configs are used where available.
  • Tests cover the request path affected by middleware.
</validation> <example>

Example

from litestar.middleware import DefineMiddleware

middleware = [DefineMiddleware(RequestIDMiddleware)]
</example>

References Index

Official References

Shared Styleguide Baseline

Capabilities

skillsource-litestar-orgskill-litestar-middlewaretopic-advanced-alchemytopic-agent-skillstopic-agentskillstopic-ai-agentstopic-claude-code-plugintopic-claude-code-skillstopic-gemini-cli-extensiontopic-htmxtopic-inertiatopic-litestartopic-mcptopic-python

Install

Quality

0.45/ 1.00

deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (2,003 chars)

Provenance

Indexed fromgithub
Enriched2026-05-18 19:13:54Z · deterministic:skill-github:v1 · v1
First seen2026-05-18
Last seen2026-05-18

Agent access