prisma-next-runtime
Installation
SKILL.md
Prisma Next — Runtime (db.ts Wiring)
Edit your data contract. Prisma handles the rest.
This skill covers the runtime entry point — db.ts — and how to compose the database client with extensions, middleware, and environment configuration.
When to Use
- User is wiring up
db.tsfor the first time (post-init). - User wants to add middleware (telemetry, lints, budgets, custom).
- User wants per-environment config (dev vs prod, multi-region).
- User wants to switch between the Postgres, SQLite, and Mongo façades.
- User wants to wrap operations in
db.transaction(...)(Postgres and SQLite). - User is running a one-off script (
tsx my-script.ts, Node CLI, CI task) and the process won't exit after queries finish, or they need script teardown (db.close(),await using). - User mentions: db.ts, postgres(), mongo(), middleware, telemetry, lints, budgets, DATABASE_URL, .env, connection pool, poolOptions, dev vs prod, transactions, read replicas, multi-database, script won't exit, hangs, db.close, db.end, close connection, pool.end, await using.