skills/dishka/SKILL.md
Use when editing Dishka dependency injection code, Provider, Scope, Container, FromDishka, Inject, DI scopes, providers, testing containers, or Litestar/FastAPI Dishka integrations.
npx skillsauth add cofin/flow dishkaInstall 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.
Dishka is a Python dependency injection framework built around Providers, Scopes, and typed containers. It supports async/sync workflows and integrates with web frameworks (Litestar, FastAPI) and CLI tools (Click).
For detailed guides and configuration examples, refer to the following documents in references/:
from dishka import Provider, Scope, make_async_container, provide
class AppProvider(Provider):
scope = Scope.APP
@provide
async def get_db_engine(self) -> AsyncEngine:
return create_async_engine("postgresql+asyncpg://...")
class RequestProvider(Provider):
scope = Scope.REQUEST
@provide
async def get_session(self, engine: AsyncEngine) -> AsyncSession:
return AsyncSession(engine)
container = make_async_container(AppProvider(), RequestProvider())
</example>
Scope.APP live as long as the container; Scope.REQUEST lives only for the duration of a request.Scope (APP, REQUEST)@providetesting
Use when syncing Beads state to markdown, checking Flow status, refreshing context docs, validating task markers, or reporting ready/blocked Flow work.
testing
Use when initializing Flow in a repo, configuring .agents, installing or checking Beads bd, setting local-only sync policy, or creating first project context files.
data-ai
Use when drafting PRDs, researching, planning, refining, revising, or creating .agents/specs/<flow_id>/spec.md worksheets for Flow.
testing
Use when implementing Flow tasks from Beads or spec.md, claiming ready work, applying TDD, recording task notes, committing, and syncing after task state changes.