Prisma Client Setup. Reference when using this Prisma feature.
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-prisma-client-setup
Generate and instantiate Prisma Client for any database provider.
npm install prisma --save-dev
npm install @prisma/client
In prisma/schema.prisma:
generator client {
provider = "prisma-client"
output = "../generated"
}
Prisma v7 requires an explicit output path and will not generate into node_modules by default.
npx prisma generate
Re-run prisma generate after every schema change to keep the client in sync.
import { PrismaClient } from '../generated/client'
import { PrismaPg } from '@prisma/adapter-pg'
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
const prisma = new PrismaClient({ adapter })
If you change the generator output, update the import path to match. In Prisma ORM 7, a driver adapter is required — replace PrismaPg with the adapter for your database.
Each PrismaClient instance creates a connection pool. Reuse a single instance per app process to avoid exhausting database connections.
Take prisma/prisma-database-setup-prisma-client-setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.