nestjs-prisma

Integrate Prisma with NestJS using a PrismaService singleton and repository pattern.

42|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/drvoss/everything-copilot-cli --skill nestjs-prisma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-prisma
Source: https://github.com/drvoss/everything-copilot-cli/tree/main/skills/development/nestjs-prisma
Command: npx skills add https://github.com/drvoss/everything-copilot-cli --skill nestjs-prisma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build a scalable NestJS data layer with Prisma by centralizing PrismaClient usage, enabling repository patterns, and enabling clean testing with mocks.

Core Features & Use Cases

  • PrismaService singleton injection in NestJS modules for shared DB access.
  • Repository pattern through Prisma clients for services, enabling clean separation and testability.
  • Unit testing with Prisma mocks to isolate services from the database during tests.

Quick Start

Install Prisma dependencies, initialize Prisma, and wire PrismaService as a global singleton in your NestJS app.

Frequently Asked Questions about nestjs-prisma

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

FAQPage Schema
How do I set up a Prisma data access layer in a NestJS app?

Set up a Prisma data access layer in NestJS by installing Prisma dependencies, initializing your schema, and wiring PrismaService as a global singleton for shared database access across modules.

How do I unit test NestJS services that use Prisma?

Unit test NestJS services that use Prisma by injecting Prisma mocks to isolate services from the database, ensuring Jest-compatible tests validate repository logic without hitting the actual database.

Can I use the repository pattern with Prisma in NestJS?

Yes, you can use the repository pattern with Prisma in NestJS by implementing repositories through Prisma clients, enabling clean separation of data access logic and improving service testability.

What is a PrismaService singleton in NestJS used for?

A PrismaService singleton in NestJS is used to centralize PrismaClient usage, providing a single shared instance for database access across modules to build a scalable and reliable data layer.

Does this NestJS Prisma integration support scalable architectures?

Yes, this NestJS Prisma integration supports scalable architectures by centralizing PrismaClient usage, enabling repository patterns for clean separation, and providing Jest-compatible unit testing with mocks.