What problem does it solve?
This skill resolves the complexity of wiring up database clients, managing middleware, and handling connection lifecycles in Prisma Next projects, preventing common issues like connection leaks and runtime configuration errors.
Core Features & Use Cases
- Runtime Wiring: Standardizes the setup of db.ts for Postgres, SQLite, and MongoDB façades.
- Middleware Composition: Simplifies the integration of telemetry, lints, and budget enforcement.
- Lifecycle Management: Provides patterns for handling connection pools and script teardowns to prevent process hangs.
- Use Case: Use this skill to correctly initialize a database client with telemetry middleware and ensure that short-lived CLI scripts properly close their connections upon completion.
Quick Start
Use the prisma-next-runtime skill to configure the database client in src/prisma/db.ts for a new Postgres project.