litestar-lifecycle-hooks

Installation
SKILL.md

Lifecycle Hooks

Use this skill when the requirement is specifically about the request-handler lifecycle for HTTP handlers, not application bootstrapping or whole-ASGI wrapping.

Execution Workflow

  1. Decide which stage matches the requirement: before_request, after_request, or after_response (the exact lifecycle stage needed for behavior injection).
  2. Choose the layer intentionally: app, router, controller, or handler (the layer to place the hook in).
  3. Keep hook behavior small, deterministic, and clearly cross-cutting.
  4. Implement request-state handoff or response mutation explicitly.
  5. Test normal flow, short-circuit flow, and layer-precedence behavior explicitly.

Core Rules

Installs
31
GitHub Stars
7
First Seen
Mar 2, 2026
litestar-lifecycle-hooks — alti3/litestar-skills