Loading...
Loading...
Found 114 Skills
Wire Prisma Next into the project's build system with the right build-tool plugin — Vite today via @prisma-next/vite-plugin-contract-emit (Vite 7 / 8); Next.js / Webpack / esbuild / Rollup / Turbopack are named as gaps rather than fabricated. Always offers the Vite plugin proactively when the project is using Vite. Use for vite plugin, vite-plugin, vite.config.ts, prismaVitePlugin, contract emit on save, HMR, hot reload contract, dev server, Next.js plugin, next plugin, withPrismaNext, webpack plugin, esbuild plugin, rollup plugin, build integration, dev server plugin, vite 7, vite 8.
Wire the Prisma Next runtime — `db.ts` setup using `postgres<Contract>(...)` from `@prisma-next/postgres/runtime`, middleware composition (telemetry from `@prisma-next/middleware-telemetry`; lints and budgets), `DATABASE_URL` config, per-environment branching, switching between Postgres and Mongo façades. Use for db.ts, postgres(), mongo(), middleware, telemetry, lints, budgets, DATABASE_URL, .env, connection pool, poolOptions, dev vs prod config, transactions, db.transaction, read replicas, multi-database, script won't exit, hangs, close connection, db.end, db.close, pool.end, [Symbol.asyncDispose], await using.
Use when modifying Prisma schema or database queries. Ensures proper migrations, type safety, and query performance.
Write Prisma Next queries — pick a lane (`db.orm.<Model>` for CRUD and includes, `db.sql.<table>` SQL builder for set-builder shapes the ORM doesn't express), filter / project / sort / paginate, eager-load relations with `.include(...)`, transactions via `db.transaction(...)`, aggregates via `.aggregate(...)`. Use for query, where, select, orderBy, take, skip, include, eager load, first, all, count, aggregate, create, update, delete, upsert, returning, transaction, db.transaction, drizzle-style, kysely-style, prisma client, db.close, script, script won't exit, hangs, close connection, db.end, pool.end, await using. Also covers result consumption (`.all()` is a Thenable — just `await` it; no `collect()` / `toArray()` helper needed), single-consumption semantics (`RUNTIME.ITERATOR_CONSUMED`), aggregate nullability (`count` returns `number`, `sum/avg/min/max` return `number | null` per SQL semantics), and range conditions (chain `.where()` clauses or use `and(...)` — there is no `.between(...)`).
Query PostgreSQL with Prisma 7 efficiently, using Prisma Client for mutations and selectively using raw SQL for complex/performant reads (SELECT/COUNT) when appropriate.
Database schema migrations and change management. Covers Prisma migrations, schema versioning, rollback strategies, and safe production deployments. Trigger: When creating database migrations, when modifying schemas, when deploying database changes, when handling rollbacks.
How to write, test, and deploy an app with Prisma Composer (`@prisma/composer`): declare services with `compute()` and typed dependencies, define RPC contracts, compose Modules, declare the service input (config and secrets as one schema, read back with `input()`), compose the ready-made cron/storage/streams Modules, provision a raw S3-compatible object-store bucket with `bucket()`, find extensions (npm packages named `prisma-composer-*`), test with `mockService`/`bootstrapService`, run the whole app locally with `prisma-composer dev` and tail its logs with `prisma-composer log`, and deploy with `prisma-composer deploy` (stages, destroy). Use when building a Prisma App, wiring a service dependency, adding a Postgres database, adding scheduled jobs / blob storage / event streams / a raw bucket, writing tests for composed services, running an app locally, reading its logs, or deploying/tearing down an environment. Triggers on "prisma composer", "@prisma/composer", "prisma app", "compute()", "service.load()", "module()", "contract()", "mockService", "bootstrapService", "prisma-composer dev", "prisma-composer log", "prisma-composer deploy", "--stage", "--fresh", "--tail", "prisma-composer destroy", "prisma-composer-", "bucket()".
Read a Prisma Next structured error envelope and route to the right recovery — code, domain, severity, why, fix, meta. Use for error, exception, my emit failed, my query won't typecheck, my query crashed, my migration won't apply, MIGRATION.HASH_MISMATCH, BUDGET.ROWS_EXCEEDED, BUDGET.TIME_EXCEEDED, RUNTIME.ABORTED, PLAN.HASH_MISMATCH, CONTRACT.MARKER_MISSING, PN-RUN-3001, PN-RUN-3002, PN-RUN-3030, PN-MIG-2001, PN-CLI-4011, PN-SCHEMA-0001, drift, capability missing, planner conflict, prisma studio, EXPLAIN, query log, db.end, db.close, script won't exit, hangs, close connection, pool.end, client is closed.
Author Prisma Next migrations — choose db update vs migration plan, edit the framework-rendered migration.ts (replace placeholder sentinels with dataTransform closures), recover from MIGRATION.HASH_MISMATCH or PN-MIG-2001 unfilled placeholder. Use for prisma migrate dev, prisma migrate deploy, prisma db push, db update, db update --dry-run, migration plan, migrate, migration new, migration show, db verify, db sign, data migration, this.dataTransform, dataTransform, placeholder, generated migration.ts, edit migration.ts, MIGRATION.HASH_MISMATCH, schema drift.
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
Comprehensive Prisma ORM development guidelines with TypeScript, schema design, migrations, and best practices.
Guide on Prisma, SQLite, and LiteFS for Epic Stack