Loading...
Loading...
Comprehensive guide for building with Prisma 8 (Prisma Next), the contract-first data layer. Use whenever working on Prisma code in a project that uses it — authoring or editing the data contract (contract.prisma, PSL, TypeScript builders), migrations, queries (db.orm / db.sql), runtime wiring (db.ts, middleware, DATABASE_URL), build-tool integration, Supabase / RLS, reading PN-* structured errors, or filing feedback — and for orientation questions like "what is Prisma Next" or comparisons to other ORMs. Signals that this skill applies: @internal/* imports, prisma-next.config.ts, contract.prisma / contract.json / contract.d.ts, the prisma-next CLI, PN-* error codes. Does not apply to Prisma ORM 7 or earlier (schema.prisma + @prisma/client projects).
npx skill4agent add prisma/prisma prisma-8Edit your data contract. Prisma handles the rest.
contract.prismacontract.jsoncontract.d.tsdb.sql.<ns>.<table>db.orm.<ns>.<Model>db.orm.usersreferences/queries.mdmigration.tsreferences/contract.mdreferences/migrations.mdmigration.tsreferences/migrations.md| Task | Reference | Triggers |
|---|---|---|
| Adopt / set up / first steps | | new project, existing database, "what can I do with Prisma Next", "where do I start", "just ran createprisma", |
| Edit the data contract | | schema, models, fields, attributes, relations, indexes, enums, value objects (composite types), type aliases, namespaces (Postgres schemas), cross-contract foreign keys (cross-space FK), polymorphic types ( |
| Author migrations | | |
| Review migrations on deploy | | "what migrations are going to run", "what runs on deploy / merge", merge conflict, diamond convergence, concurrent migrations, migration status, ref management for CI, staging / production environment refs, |
| Write queries | | query, where, select, project, orderBy, take, skip, include, lookup, first, all, count, aggregate, groupBy, create, update, delete, upsert, returning, transaction, |
| Wire the runtime | | |
| Build-tool integration | | Vite plugin ( |
| Supabase | | |
| Debug an error | | any structured error envelope (code, domain, severity, why, fix, meta), emit failed, query won't typecheck, query crashed, migration won't apply, |
| File feedback / ask the team | | bug report, file an issue, feature request, missing feature, capability gap, "this is broken", surprising behaviour, Q&A / design discussion, ask the Prisma team, Prisma Discord (pris.ly/discord), extension-author questions |
references/quickstart.mdreferences/quickstart.mdreferences/contract.mdreferences/migrations.mdreferences/migration-review.mddb.tsreferences/build.mdreferences/runtime.mdreferences/debug.mdreferences/feedback.mdreferences/feedback.md