What problem does it solve? Prisma projects break in non-obvious ways: the generated client goes missing on Vercel builds, duplicate pg copies make new PrismaPg(config) fail typechecking, tests silently run against the development database, and rows leak between tests. This Skill encodes the canonical Prisma 7 setup — generator output, pinned driver stack, per-worker test databases, and cleanup hooks — so these failure modes are caught and fixed before they ship. ## Core Features & Use Cases - Canonical client setup: Enforces the prisma-client generator with output = "../generated/prisma", root-mapped @/* paths, and prisma generate first in both postinstall and build so fresh clones and cached Vercel builds always have a client. - Pinned driver stack: Keeps prisma, @prisma/client, @prisma/adapter-pg, pg, and @types/pg on tilde pins with pnpm overrides, preventing duplicate pg copies that break PoolConfig assignability. - Test database harness: Documents the owned Vitest files (test/db.ts, vitest.global-setup.ts, vitest.env-setup.ts) that build a template database, clone it per worker, and enforce truncateAllTables / disconnectAppPrisma cleanup hooks. - Use Case: After editing prisma/schema.prisma, you run pnpm exec prisma migrate dev --name add_orders, commit the migration, and the Skill's contract ensures .env.test, test:env, and the Vitest setup point every suite at an isolated test database instead of development data. ## Quick Start Load this skill before editing prisma/schema.prisma or running a migration so the generated client, pinned driver versions, and Vitest test database wiring stay consistent.