prisma/cursor-plugin

prisma-database-setup-prisma-client-setup

Prisma Client Setup. Reference when using this Prisma feature.

First seen Mar 6, 2026

Installation

$ npx skills add prisma/cursor-plugin --skill prisma-database-setup-prisma-client-setup

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from prisma/cursor-plugin · top by installs.

npx skills add prisma/cursor-plugin

Browse all from prisma/cursor-plugin

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 9
License MIT
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version7.0.0
LicenseMIT
More metadata
author
prisma
version
7.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,391 B
  • docs SUMMARY.md 111 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 19 installs

SKILL.md

Prisma Client Setup

Generate and instantiate Prisma Client for any database provider.

1. Install dependencies

npm install prisma --save-dev
npm install @prisma/client

2. Add generator block

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.

3. Generate Prisma Client

npx prisma generate

Re-run prisma generate after every schema change to keep the client in sync.

4. Instantiate Prisma Client

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.

5. Use a single instance

Each PrismaClient instance creates a connection pool. Reuse a single instance per app process to avoid exhausting database connections.