prisma-next-runtime

Configures Prisma Next runtime entry points for database clients and middleware.

47.5k|2.5k|Updated Jun 20, 2019
One-click install
npx skills add https://github.com/prisma/prisma --skill prisma-next-runtime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-next-runtime
Source: https://github.com/prisma/prisma/tree/main/skills/prisma-next-runtime
Command: npx skills add https://github.com/prisma/prisma --skill prisma-next-runtime

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about prisma-next-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a Prisma database client with middleware in TypeScript?

To configure a Prisma database client with middleware, you wire database façades with contract artifacts and environment-specific settings. This standardizes the setup of your db.ts file for type-safe access and structured observability.

What's the best way to manage Prisma connection pools and prevent process hangs in CLI scripts?

Managing Prisma connection pools requires applying lifecycle management patterns for clean process teardown. This ensures short-lived CLI scripts properly close their database connections upon completion to prevent runtime process hangs.

Does this Prisma runtime configuration support Postgres, SQLite, and MongoDB database targets?

Yes, this Prisma runtime configuration supports Postgres, SQLite, and MongoDB database targets. It applies environment-specific configuration and connection pool management across these different database façades.

Why does my Prisma Next runtime initialization fail to integrate telemetry correctly?

Prisma Next runtime initialization fails when middleware composition is not properly wired to the database client. Simplifying the integration of telemetry, lints, and budget enforcement during runtime wiring resolves these configuration errors.

Can I use this skill to enforce type-safe database access and prevent connection leaks?

Yes, you can use this skill to enforce type-safe database access and prevent connection leaks. It resolves the complexity of wiring up database clients and handling connection lifecycles in Prisma Next projects.

What is Prisma Next runtime wiring and when do I need it?

Prisma Next runtime wiring is the configuration of the runtime entry point by connecting database façades with middleware. You need it during the initialization of database clients to ensure structured observability and clean process teardown.