Skillquality 0.45

litestar-di

Auto-activate for Provide, dependencies=, dependency maps, litestar.di, scoped providers, Dishka FromDishka, Inject, provider modules, or request/session/app scope wiring. Use when wiring Litestar dependencies, service factories, app state dependencies, or external DI integration

Price
free
Protocol
skill
Verified
no

What it does

Litestar Dependency Injection

Use this skill for Provide, dependency maps, provider factories, request-scoped resources, and Dishka integration.

Code Style Rules

  • Use Litestar dependency maps for simple and medium apps.
  • Use Dishka when the project needs explicit scopes and provider modules.
  • Keep provider names stable and descriptive.
  • Do not open request-scoped resources at import time.

Quick Reference

<workflow>

Workflow

  1. Identify whether the dependency is app, request, transaction, or function scoped.
  2. Choose built-in dependency maps or the existing DI framework.
  3. Register providers at the narrowest useful scope.
  4. Inject dependencies by name or type according to the chosen stack.
</workflow> <guardrails>

Guardrails

  • Do not introduce Dishka for one or two simple providers.
  • Do not mix dependency naming conventions in one app.
  • Do not keep database sessions or clients as global mutable state.
  • Do not hide business logic inside providers.
</guardrails> <validation>

Validation Checkpoint

  • Dependency scope is explicit.
  • Providers are async when they manage async resources.
  • Tests can override providers cleanly.
  • Provider wiring matches the app's existing DI style.
</validation> <example>

Example

from litestar.di import Provide

async def provide_user_service(db_session: AsyncSession) -> UserService:
    return UserService(session=db_session)

dependencies = {"users_service": Provide(provide_user_service)}
</example>

References Index

Official References

Shared Styleguide Baseline

Capabilities

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

Install

Installnpx skills add litestar-org/litestar-skills
Transportskills-sh
Protocolskill

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,165 chars)

Provenance

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

Agent access