Prisma Postgres Setup
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-prisma-postgres
Configure Prisma with Prisma Postgres (Managed).
Prisma Postgres is a serverless, managed PostgreSQL database optimized for Prisma.
You can provision a Prisma Postgres instance directly via the CLI:
prisma init --db
This will:
.env with the connection string.The connection string starts with prisma+postgres://.
DATABASE_URL="prisma+postgres://[email protected]/env_id"
In prisma/schema.prisma:
datasource db {
provider = "postgresql" // Use postgresql provider
}
generator client {
provider = "prisma-client"
output = "../generated"
}
In prisma.config.ts:
import { defineConfig, env } from 'prisma/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
datasource: {
url: env('DATABASE_URL'),
},
})
Prisma ORM 7 uses the query compiler by default, so you must use a driver adapter. For Prisma Postgres, use the Prisma Postgres serverless driver adapter.
npm install @prisma/adapter-ppg @prisma/ppg
import 'dotenv/config'
import { PrismaClient } from '../generated/client'
import { PrismaPostgresAdapter } from '@prisma/adapter-ppg'
const prisma = new PrismaClient({
adapter: new PrismaPostgresAdapter({
connectionString: process.env.PRISMA_DIRECT_TCP_URL,
}),
})
Since Prisma ORM 7 requires a driver adapter, use the Prisma Postgres adapter shown above when instantiating Prisma Client.
Take prisma/prisma-database-setup-prisma-postgres 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.
Without those the skill loads but fails at the first command.