
prisma/cursor-plugin
40 skills566 installs320 starsGitHub
Install
npx skills add https://github.com/prisma/cursor-pluginSkills in this repo
1Prisma Database Setup PostgresqlThe prisma-database-setup-postgresql skill configures postgresql datasource, prisma.config.ts DATABASE_URL, generated client output, and required @prisma/adapter-pg PrismaPg adapter for Prisma 7 query compiler mode with connection troubleshooting.29installs2Prisma Cli Db PushThe prisma-cli-db-push skill documents prisma db push for syncing Prisma schema directly to the database without creating migration files or tracking history. It creates the database if missing, supports --accept-data-loss for destructive changes, and --force-reset for full resets. Prisma v7 requires running prisma generate explicitly after push since --skip-generate was removed. Use cases include prototyping, local development, MongoDB workflows where migrations are unsupported, and test database setup. The skill warns against production use when migration history and rollback matter, recommending prisma migrate for team environments. Examples cover basic push, data-loss acceptance, force reset, and the v7 full workflow pairing push with generate. Options table documents --schema, --config, and --url overrides for non-default project layouts. Pushes schema changes directly to database without creating migrations. Ideal for prototyping. Completely resets database and applies schema.17installs3Prisma Client Api Model QueriesThe prisma-client-api-model-queries skill is a reference for Prisma Client model-level queries including findMany, findUnique, create, update, delete, upsert, and batch helpers such as createMany and createManyAndReturn. It documents filter objects, select and include relation loading, ordering, pagination with skip and take, and aggregate counts. Examples show typed results, handling nullable unique fields, and returning arrays from batch creates. Guidance covers when to use transactions for multi-write consistency and how to structure where clauses for compound unique constraints. The skill helps agents choose the correct query method for CRUD operations without inventing unsupported APIs. It also explains deleteMany and updateMany batch patterns, cursor-based pagination for large tables, and distinct filters when deduplicating results. Relation writes use nested create and connect syntax with explicit include plans to avoid N+1 fetches in service layers. Pair with prisma-cli-generate after schema changes and prisma-cli-dev for local database workflows during iterative query development.16installs4Prisma Upgrade V7 Driver AdaptersThe prisma-upgrade-v7-driver-adapters skill guides Prisma v7 upgrades with driver adapter configuration for edge, serverless, and custom database drivers. It covers breaking changes such as explicit prisma generate, datasource URL handling via config files, and adapter packages for PostgreSQL, MySQL, SQLite, and serverless providers. Workflow audits current schema and client usage, updates dependencies and generator blocks, wires driver adapters in PrismaClient construction, and validates queries against the target runtime. Migration notes address removed flags, new config file shapes, and compatibility with existing migrate history. Examples show adapter imports, connection pooling choices, and test strategies for adapter-backed clients. Use when upgrading Prisma major versions or deploying Prisma Client to non-Node database environments. Prisma v7 requires driver adapters for all database connections. This replaces the built-in Rust query engine. Driver adapters use the underlying driver's pool settings, which differ from v6 defaults.16installs5Prisma Cli DevThe prisma-cli-dev skill documents prisma dev for local database development workflows in Prisma projects. It covers starting the local Prisma-managed database environment, syncing schema during iterative development, and pairing with prisma generate for client updates. Workflow typical for local feature work: adjust schema.prisma, run prisma dev or related dev commands per project setup, generate client, and run application against the dev database. Notes address Prisma v7 explicit generate requirement and config file paths when not using defaults. Examples show common dev command invocations and integration with npm or bun scripts. Use when setting up or troubleshooting local Prisma database development loops rather than production migration deploys. Starts a local Prisma Postgres database for development. Provides a PostgreSQL-compatible database that runs entirely on your machine. Interactive mode with keyboard shortcuts: Shows all local Prisma Postgres instances with status.15installs6Prisma Client Api TransactionsThe prisma-client-api-transactions skill explains prisma.$transaction patterns. Sequential array form runs ordered operations with all-or-nothing rollback on any failure. Interactive callbacks receive tx scoped clients for dependent logic such as balance checks before transfers. Options configure maxWait, timeout, and isolationLevel from ReadUncommitted through Serializable. Nested writes on create already run in automatic transactions. Best practices keep non-DB work outside callbacks, handle P2002 unique errors, and choose Serializable only when strict consistency demands. Comparison table contrasts sequential versus interactive flexibility and performance. Sequential $transaction arrays roll back on any failure. Interactive callbacks support conditional dependent logic. tx client mirrors Prisma APIs inside transactions. Configurable maxWait, timeout, and isolation levels. Nested writes already run in automatic transactions. All-or-nothing database updates with correct isolation settings. User needs $transaction sequential or interactive patterns. Developers implementing transfers, inventory, or multi-table updates.15installs7Prisma Cli GenerateThe prisma-cli-generate skill documents prisma generate for updating the generated Prisma Client after schema.prisma changes. In Prisma v7 generate must be run explicitly after db push or migrate because automatic post-push generate flags were removed. Workflow covers running generate from project root, custom --schema paths, and verifying TypeScript client types update in the IDE. Common issues include stale node_modules client, wrong schema path in monorepos, and generator provider blocks for edge clients. Examples show basic generate, schema override, and pairing with db push or migrate dev in local workflows. The skill notes generator preview features, multiple schema files in monorepos, and clearing .prisma client output when types appear stale after dependency upgrades. It reminds agents to rerun generate in CI after schema changes so deployed services and tests share the same client revision.15installs8Prisma Cli Db ExecuteThe prisma-cli-db-execute skill documents prisma db execute for running native SQL against the configured datasource from prisma.config.ts. Scripts load from --file or --stdin, with optional --url and --config overrides. Use for manual migrations, maintenance such as truncates, applying migrate diff output piped on stdin, or ad hoc DDL. The command reports success or failure only, not query rows, so inspection belongs in Prisma Client or Studio. MongoDB is unsupported. Examples show piping migrate diff --script into db execute for schema synchronization. Configuration reads datasource.url from defineConfig with env DATABASE_URL. Runs SQL from --file or --stdin against datasource. Pipes migrate diff scripts directly to the database. Supports --url and --config overrides. Reports success without returning SELECT rows. Not supported on MongoDB datasources. SQL script applied with success or failure reported. User needs prisma db execute for SQL files or stdin scripts.14installs9Prisma Cli Db PullThe prisma-cli-db-pull skill guides prisma db pull introspection that reads tables, columns, relations, and indexes into schema.prisma. Options include --print for stdout preview, --force to ignore the current schema, --schemas for multi-schema databases, --url overrides, and --local-d1 for Cloudflare D1. Workflow covers init, configure DATABASE_URL, pull, customize naming to PascalCase models with @@map, camelCase fields, relation names, and docs comments, then prisma generate. Warns that pull overwrites the schema file so commit first and preview with --print. MongoDB sampling may need manual refinement. Sync workflow reruns pull and generate when external DDL changes land. Introspects live database into schema.prisma models. Supports --print preview and --force overwrite. Documents post-pull PascalCase and @@map cleanup. Covers multi-schema and local D1 options. Warns to commit before overwriting customizations. Updated schema.prisma reflecting database tables and relations.14installs10Prisma Cli Db SeedThe prisma-cli-db-seed skill documents prisma db seed executing the migrations.seed command from prisma.config.ts such as tsx prisma/seed.ts. v7 requires explicit seeding after migrate dev unlike v6 auto-seed on reset. Examples show upsert-based idempotent users, conditional seeding when tables are empty, and environment-specific branches. Custom args pass after -- to the seed script. Best practices recommend minimal realistic fake data, version-controlled scripts, and disconnect handling in finally blocks. Pairs with migrate reset --force for clean dev databases. Seed configuration lives beside migrations.path in defineConfig with datasource url from env. Runs seed command configured in prisma.config.ts. v7 requires explicit prisma db seed after migrations. Documents upsert idempotency and conditional seeding. Passes custom args after -- to seed scripts. Pairs with migrate reset for dev database refresh. Populated database from idempotent seed script execution.14installs11Prisma Cli DebugThe prisma-cli-debug skill covers prisma debug output used when diagnosing version mismatches or filing issues. It prints Prisma CLI version, installed @prisma/client version, query and migration engine binaries, operating system and architecture, Node.js and TypeScript versions, query compiler status, and configured datasource provider. Options accept --schema and --config paths. Use before opening GitHub issues, after upgrades that behave oddly, or to verify binaries downloaded correctly. Output is read-only diagnostics without mutating project files. Prints CLI, client, and engine version matrix. Includes OS, architecture, Node, and TypeScript info. Shows configured datasource provider. Supports custom schema and config paths. Read-only diagnostics for support tickets. Version and platform report suitable for bug reports. User needs environment info for Prisma troubleshooting. Developers debugging Prisma install or version skew. Operate-phase error work gathering Prisma environment facts.14installs12Prisma Client Api Client MethodsThe prisma-client-api-client-methods skill documents PrismaClient lifecycle and extension APIs. $connect and $disconnect manage explicit connections and graceful shutdown including SIGTERM handlers and test afterAll cleanup. $on subscribes to query and log events when log emit is event. $extends adds client, model, query, and result extensions with chainable soft-delete and computed field patterns. Cross-references $transaction and raw query docs. Type utilities cover Prisma namespace input and output types plus Prisma.validator for reusable select fragments. v7 examples assume required driver adapters on construction. Documents $connect, $disconnect, and shutdown handlers. Covers $on query and log event subscriptions. Shows $extends client, model, query, and result patterns. Includes Prisma.validator typed select fragments. Links transactions and raw query companion skills. Correct use of connect, extensions, and typed query helpers. User implements $extends, logging, or connection lifecycle hooks.14installs13Prisma Client Api ConstructorThe prisma-client-api-constructor skill explains PrismaClient options in Prisma ORM v7. Adapter instances such as PrismaPg are required with connectionString from DATABASE_URL. accelerateUrl pairs with @prisma/extension-accelerate for prisma:// URLs. log arrays or event emit configs feed $on handlers. errorFormat selects pretty, colorless, or minimal output. transactionOptions set maxWait, timeout, and isolationLevel defaults. Singleton patterns use globalThis guards for development hot reload in plain Node and Next.js lib/prisma.ts examples. Query and log event samples show duration and parameter printing for observability during local debugging. Requires driver adapter in Prisma ORM v7 examples. Documents accelerateUrl with withAccelerate extension. Covers log levels and event emit configuration. Shows Node and Next.js singleton client patterns. Sets default transactionOptions on construction. Singleton PrismaClient with adapter and logging configured. User configures PrismaClient adapter, logging, or singleton module. Teams bootstrapping Prisma in Node or Next.js apps.14installs14Prisma Client Api FiltersThe prisma-client-api-filters skill catalogs filter operators for Prisma where clauses. Equality covers implicit match, equals, and not. Comparison provides gt, gte, lt, and lte including combined ranges. String filters add contains, startsWith, endsWith, and insensitive mode. Logical AND, OR, and NOT compose nested conditions. Relation filters use some, every, none, is, and isNot for one-to-one shapes. Array fields support has, hasSome, hasEvery, and isEmpty. JSON path filters target nested keys with equals or string_contains. Full-text search requires @@fulltext indexes. Examples progress from simple email match to combined admin verified queries with relation constraints. Documents equality, comparison, and string operators. Covers AND, OR, and NOT logical composition. Explains relation some, every, and none filters. Includes array and JSON path filter syntax. Notes full-text search index requirement. Correct filter objects for relations, strings, and JSON fields.14installs15Prisma Client Api Query OptionsThe prisma-client-api-query-options skill explains query shape controls beyond bare where filters. select picks scalar fields and nested relation projections including _count. include loads relations with filtered, ordered, and limited nested shapes. omit excludes sensitive fields and cannot combine with select. orderBy sorts single or multiple fields, relation counts, and nulls first or last. take and skip implement offset pagination while cursor enables stable keyset pages with skip one after cursor id. distinct returns unique combinations of fields. Cross-links filters.md for where details. Examples show password exclusion via omit and nested comment author graphs. select and include shape returned field graphs. omit excludes fields without pairing select. orderBy supports relation _count sorting. take, skip, and cursor cover pagination patterns. distinct returns unique field combinations. Queries returning only needed fields with correct pagination.14installs16Prisma Client Api Raw QueriesThe prisma-client-api-raw-queries skill covers $queryRaw and $executeRaw tagged templates returning rows or affected counts. Prisma.sql and Prisma.join build dynamic safe fragments while Prisma.raw handles identifiers only. Unsafe variants warn about injection when concatenating user strings. Database-specific PostgreSQL array and JSON operators and MySQL full-text examples appear. Transactions wrap raw balance transfers on tx clients. BigInt COUNT results need Number conversion. Guidance contrasts safe parameterized templates against unsafe string interpolation. Use when ORM queries cannot express required SQL while keeping user input parameterized. $queryRaw returns typed SELECT result rows. $executeRaw reports INSERT UPDATE DELETE counts. Prisma.sql and Prisma.join compose safe dynamic SQL. Documents unsafe variants and injection risks. Shows raw SQL inside interactive transactions. Parameterized raw queries without SQL injection exposure. User writes $queryRaw or $executeRaw with dynamic fragments. Developers needing SQL features beyond Prisma query API.14installs17Prisma Client Api RelationsThe prisma-client-api-relations skill documents relation reads and writes in Prisma Client. include and select load nested posts, comments, and profiles with filters, ordering, and take limits. Nested create, connect, connectOrCreate, update, updateMany, upsert, disconnect, delete, deleteMany, and set replace relation graphs atomically where supported. Relation filters some, every, none, is, and isNot power findMany parent queries. _count selects tally related rows with optional where on counted relations. Examples walk from simple author connect shorthand via authorId through deep comment author includes to bulk unpublished post deleteMany. include and select load nested relation graphs. Nested writes create, connect, and update related rows. disconnect, delete, and set manage relation membership. Relation filters some, every, and none in where. _count tallies related records with optional filters. Relation loads and nested mutations matching schema graph.14installs18Prisma Cli InitThe prisma-cli-init skill documents prisma init creating prisma/schema.prisma, prisma.config.ts, .env DATABASE_URL, and .gitignore entries. Options pick datasource providers including postgresql, mysql, sqlite, mongodb, and cockroachdb, provision managed Postgres via --db, set custom --url, choose generator output paths, preview features, and --with-model examples. Bun users run bunx --bun prisma init to avoid Node fallback. AI prompt init generates schema from natural language and can deploy to Prisma Postgres. Post-init steps configure url, define models, run prisma dev or remote connection, migrate dev, and generate client. v7 generator uses prisma-client with required output path. Creates schema.prisma and prisma.config.ts scaffold. Supports multiple datasource providers and --db cloud provision. Documents Bun bunx --bun init invocation. AI --prompt can generate schema from description. Lists migrate dev and generate as next steps. Prisma schema, config, and env files ready for models.14installs19Prisma Cli Migrate DevThe prisma-cli-migrate-dev skill explains prisma migrate dev for local schema evolution. Steps run pending migrations in a shadow database, apply pending files, generate new SQL from schema diffs, apply to dev DB, and update _prisma_migrations. Options include --name, --create-only for SQL review, schema and config paths, and url overrides. v7 removed --skip-generate and --skip-seed so teams run prisma generate and prisma db seed explicitly afterward. Drift prompts offer database reset when manual edits diverge. Shadow database URL configures via prisma.config.ts shadowDatabaseUrl. Not for production or MongoDB where db push applies. Data loss warnings accept --accept-data-loss when dropping columns. Creates and applies migrations during local development. Uses shadow database for drift detection. --create-only writes SQL without applying. v7 requires explicit generate and seed after migrate dev. Prompts reset when schema drift is detected.14installs20Prisma Cli Migrate ResetThe prisma-cli-migrate-reset skill documents prisma migrate reset destroying all data, recreating the database, reapplying every migration in prisma/migrations, and running configured seed scripts. --force skips interactive confirmation for CI or automation. Custom schema paths supported via --schema. v7 may require separate prisma generate after reset unlike v6 auto-generate behavior, while seed still runs when configured in prisma.config.ts migrations.seed. Use for dev fresh starts, pre-test database cleanup, or recovering from unrecoverable drift. Warns that all data is lost. Pairs with db seed for repeatable fixtures after destructive reset. Drops database and reapplies all migration files. Runs configured seed script after migrations by default. --force skips confirmation for automation. v7 may need separate prisma generate afterward. Intended for development and test resets only. Clean database with migrations and seed reapplied. User resets dev DB after migration experiments or drift.14installs21Prisma Cli StudioThe prisma-cli-studio skill covers prisma studio launching a local web GUI defaulting to port 5555. Options set --port, --browser, config path, or --url overrides. BROWSER=none avoids auto-open on remote servers. Features include paginated table views, multi-condition filters, inline create update delete with confirmation, and relation navigation with counts. Workflow runs migrate dev, db seed, then studio to verify fixtures. Limitations stress development-only use, no advanced queries, and direct database access requiring trusted networks. Security note warns against public exposure since Studio grants full configured database access. Starts web GUI on default port 5555. Browse, filter, sort, and paginate model records. Inline create, update, and delete with confirmation. Navigate relations and view related counts. Development-only tool, not for production exposure. Running Studio session for viewing and editing dev data. User opens prisma studio to inspect or edit records.14installs22Prisma Cli ValidateThe prisma-cli-validate skill documents prisma validate parsing schema.prisma for syntax errors, invalid types, missing relation fields, and duplicate model names without running generate. Custom --schema and --config paths support monorepos. CI pipelines add npx prisma validate early to catch broken schemas before migrations or builds. Common errors list missing @relation attributes, invalid field types, and brace syntax mistakes. Read-only check suitable for pre-commit or GitHub Actions database schema gates. Parses schema.prisma without generating client. Reports syntax, relation, and type validation errors. Supports custom schema and config paths. Recommended for CI schema validation steps. Lists common relation and syntax failure modes. Schema validation pass or actionable error report. User validates schema.prisma syntax and relations. Teams enforcing schema correctness before migrations merge. Ship-phase testing work gating schema changes in CI. Testing subphase fits static schema validation.14installs23Prisma Database Setup Prisma Client SetupThe prisma-database-setup-prisma-client-setup skill walks Prisma Client setup end to end. Install prisma dev dependency and @prisma/client, add generator client block with provider prisma-client and mandatory output path outside node_modules, run npx prisma generate after every schema change, and instantiate PrismaClient with a driver adapter such as PrismaPg using DATABASE_URL. Notes that v7 requires adapters per database vendor. Reuse a single client instance per process to avoid exhausting connection pools. Import paths must match the configured generator output directory. Install prisma and @prisma/client packages. Generator requires explicit output path in v7. Regenerate client after every schema change. Instantiate with required driver adapter. Reuse one PrismaClient per app process. Generated client imported with adapter-backed singleton instance. User sets up generate output, adapter, and singleton pattern. Teams adding Prisma ORM to Node or TypeScript services.14installs24Prisma Database Setup Prisma PostgresThe prisma-database-setup-prisma-postgres skill explains Prisma Postgres managed serverless PostgreSQL. prisma init --db logs into Prisma Data Platform, creates a project, and writes prisma+postgres:// DATABASE_URL to .env. Schema keeps postgresql provider with prisma-client generator output. prisma.config.ts loads url via env helper. Prisma ORM v7 requires @prisma/adapter-ppg and @prisma/ppg with PrismaPostgresAdapter using direct TCP PRISMA_DIRECT_TCP_URL from the console rather than pooled accelerate URLs for the adapter constructor. Highlights serverless scale-to-zero, integrated Accelerate caching, and Pulse real-time events as platform features. Provision managed Postgres via prisma init --db. Connection strings use prisma+postgres:// format. Requires PrismaPostgresAdapter with direct TCP URL. Schema uses postgresql provider with v7 generator. Documents Accelerate caching and Pulse features. Connected Prisma Client using PPG adapter and platform URL. User provisions or connects Prisma Postgres with adapters. Teams starting on Prisma Data Platform Postgres.14installs25Prisma Upgrade V7 Accelerate UsersThe prisma-upgrade-v7-accelerate-users skill guides Accelerate and prisma:// or prisma+postgres:// URL users upgrading to v7. Driver adapters must not receive Accelerate URLs because PrismaPg expects direct TCP strings. Keep DATABASE_URL as accelerate endpoint in prisma.config.ts, install @prisma/extension-accelerate, and construct PrismaClient with accelerateUrl plus .$extends(withAccelerate()). Wrong pattern passes accelerate URL into PrismaPg and fails at runtime. Migration section notes Accelerate URLs work with CLI commands while some teams add DIRECT_DATABASE_URL for migration engines. Contrasts correct extension setup against adapter misuse with code samples. Never pass prisma:// URLs to driver adapters. Use accelerateUrl with withAccelerate extension. Keep Accelerate URL in prisma.config.ts datasource. Documents wrong PrismaPg accelerate URL antipattern. Covers migration CLI connection options. PrismaClient using accelerateUrl extension without adapter misuse. User upgrades Accelerate client from v6 middleware patterns. Teams on Prisma Accelerate or prisma+postgres URLs upgrading to v7.14installs26Prisma Upgrade V7 Env VariablesThe prisma-upgrade-v7-env-variables skill explains v7 no longer auto-loads .env files unlike v6. Add import dotenv/config as first line in prisma.config.ts before defineConfig env DATABASE_URL calls. Bun projects skip extra setup because Bun loads .env automatically. Multiple env files use dotenv-cli in package scripts such as dotenv -e .env.local -- prisma migrate dev or dotenv.config path overrides. Documents testing, production, and monorepo patterns for keeping DATABASE_URL and shadow URLs available to CLI without leaking secrets into generated client code. v7 requires explicit dotenv loading in prisma.config.ts. Bun auto-loads .env without extra imports. dotenv-cli supports per-environment script wrappers. Contrasts v6 automatic versus v7 manual loading. Covers multiple .env file path strategies. prisma.config.ts importing dotenv with working DATABASE_URL. User fixes missing env vars after v7 upgrade. Teams upgrading Prisma CLI to v7 with env-based URLs.14installs27Prisma Upgrade V7 Esm SupportThe prisma-upgrade-v7-esm-support skill states Prisma v7 ships ES modules only so projects need type module in package.json and tsconfig module ESNext or Node16 with matching moduleResolution. Import syntax uses named ESM imports from generated client paths, not require. Node16 resolution may require .js extensions on relative imports while bundler resolution does not. Covers jest or vitest ESM test config, prisma.config.ts as ESM, and CommonJS migration pitfalls. Alternative NodeNext compiler settings documented for libraries targeting dual consumers. Prisma v7 is ESM-only distribution. Requires package.json type module. tsconfig needs ESNext or Node16 module settings. Named imports replace require for PrismaClient. Node16 may need .js extensions on imports. Project module settings compatible with Prisma v7 imports. User hits ESM import errors after Prisma v7 upgrade. Teams migrating CommonJS Node apps to Prisma v7.14installs28Prisma Upgrade V7 Prisma ConfigThe prisma-upgrade-v7-prisma-config skill introduces prisma.config.ts at project root using defineConfig and env helpers. Options include schema path, datasource url directUrl and shadowDatabaseUrl, migrations path and seed command, and experimental preview settings. Replaces scattered v6 env-only patterns with typed TypeScript config importable by tooling. Shows dotenv first import, seed string like tsx prisma/seed.ts, and monorepo relative schema paths. Documents how CLI commands read config via --config override for multi-package repositories. prisma.config.ts centralizes CLI configuration in v7. defineConfig sets schema, datasource, and migrations. Supports directUrl and shadowDatabaseUrl fields. migrations.seed configures db seed command. --config overrides path in monorepos. Typed config file wiring schema, URL, migrations, and seed. User authors or fixes prisma.config.ts during v7 migration. Teams upgrading Prisma projects to v7 config model. Build-phase integrations work migrating Prisma config to v7 file.14installs29Prisma Cli FormatThe prisma-cli-format skill documents prisma format as Prettier-like formatting plus semantic schema repairs. It fixes indentation and spacing, adds missing back-relations on the opposite side of relations, fills missing relation fields and references arguments, and sorts fields and attributes opinionatedly. Runs in place on default or custom --schema paths with optional --config. Editor extensions often format on save while CLI format suits CI checks and large refactors after manual edits. Formats schema.prisma indentation and spacing in place. Adds missing back-relations and relation arguments. Sorts fields and attributes opinionatedly. Supports custom schema and config paths. Useful for CI formatting checks and bulk refactors. Formatted schema with consistent relations and spacing. User runs prisma format after schema edits or refactors. Developers cleaning up hand-edited Prisma schemas. Build-phase backend work normalizing Prisma schema files.13installs30Prisma Cli Migrate DeployThe prisma-cli-migrate-deploy skill documents prisma migrate deploy for staging and production. It applies pending files from prisma/migrations, updates _prisma_migrations, never generates migrations, never seeds, and avoids interactive prompts or shadow databases unlike migrate dev. CI examples use npx prisma migrate deploy with DATABASE_URL secret. Comparison table contrasts dev versus deploy capabilities. On failure, resolve with prisma migrate resolve then redeploy after fixing SQL or database state. Best practices run migrate status first, test in staging, backup before prod, and never run migrate dev in production. Applies pending migrations without creating new files. Safe for production, staging, and CI pipelines. No shadow database or interactive prompts. Failed migrations use migrate resolve workflow. Recommends migrate status before deploy. All pending migrations applied with history table updated. User deploys migrations to staging or production databases.13installs31Prisma Cli Migrate DiffThe prisma-cli-migrate-diff skill explains prisma migrate diff comparing --from and --to sources including empty, schema files, migrations directories, URLs, or config datasource. Default output is human-readable summary while --script prints SQL and --exit-code returns 2 when drift exists for CI gates. Examples generate prod-to-schema SQL, review pending migrations against live DB, baseline empty-to-schema init migrations, and debug what migrate dev would apply. Pairs with db execute --stdin to apply generated scripts when appropriate. Compares schema, migrations, URL, or config datasource pairs. --script outputs executable SQL diffs. --exit-code supports CI drift detection. Baselines existing databases to initial migrations. Debug tool for migrate dev expectations. SQL script or summary showing schema differences. User runs migrate diff for baselines, drift checks, or SQL export. DBAs generating forward SQL or detecting drift in CI.13installs32Prisma Cli Migrate StatusThe prisma-cli-migrate-status skill documents prisma migrate status connecting to the database, reading _prisma_migrations, and comparing against local prisma/migrations files. Reports whether schema is up to date, lists unapplied migrations with counts, flags DB-only migrations missing locally, and surfaces failed apply attempts. Output suggests migrate dev for development or migrate deploy for production follow-ups. Use in CI before deploy, when debugging drift complaints from migrate dev, or verifying prod state after a failed release. Exit code 1 indicates command errors while success may still list pending files. Compares local migration files to database history. Reports pending, missing, and failed migrations. Suggests migrate dev or migrate deploy next steps. Useful CI preflight before production deploy. Explains drift debugging scenarios. Status report with pending or failed migration list. User checks migration status before deploy or after failures.13installs33Prisma Upgrade V7 Removed FeaturesThe prisma-upgrade-v7-removed-features skill maps v7 removals to replacements. Client $use middleware becomes $extends query interceptors for logging, soft delete, and timing. Automatic .env loading requires explicit dotenv in prisma.config.ts. prisma-client-js in node_modules shifts to prisma-client generator with mandatory output path and driver adapters. Removed preview flags and deprecated APIs list migration snippets. Covers accelerate versus adapter confusion and points to companion upgrade skills for schema and config changes. Replaces $use middleware with $extends query hooks. Documents removed auto env loading behavior. Migrates prisma-client-js to prisma-client output path. Soft delete and logging patterns via extensions. Links related v7 upgrade companion skills. Updated patterns using extensions, config, and generators. User hits removed middleware, env, or generator behavior in v7. Teams upgrading large Prisma codebases to v7. Build-phase integrations work replacing removed Prisma v6 APIs.13installs34Prisma Upgrade V7 Schema ChangesThe prisma-upgrade-v7-schema-changes skill details generator migration from prisma-client-js with engineType to prisma-client with mandatory output directory outside node_modules. Remove engineType binary or library settings. Shows standard, monorepo, and same-directory output examples creating generated/client imports. Datasource block adjustments and preview feature renames accompany import path updates after prisma generate. Explains that v7 no longer drops client into node_modules by default so TypeScript imports must follow configured output. Switch generator provider to prisma-client. output path is mandatory for prisma-client generator. Remove engineType from generator block. Update imports to match configured output directory. Examples for monorepo and colocated output paths. schema.prisma generator block with output and new provider. User changes generator provider or output path for v7. Teams upgrading schema files during Prisma v7 migration. Build-phase integrations work updating Prisma schema for v7 generator.13installs35Prisma Cli Migrate ResolveThe prisma-cli-migrate-resolve skill documents Prisma migrate resolve for manual _prisma_migrations state fixes. Exactly one of --applied or --rolled-back must be provided with the migration name. Marking applied baselines existing databases without re-running SQL during adoption on production schemas. Marking rolled back recovers from failed migrate deploy runs so SQL can be fixed and reapplied. Options include --schema and --config for custom paths. Use cases cover baselining brownfield databases, recovering failed production deploys, and rare hotfix reconciliation. References link to Prisma baselining and production troubleshooting guides.12installs36Prisma Database Setup CockroachdbThe prisma-database-setup-cockroachdb skill configures Prisma with CockroachDB using provider = cockroachdb in schema.prisma, prisma.config.ts datasource url via env DATABASE_URL, and Prisma ORM 7 driver adapter @prisma/adapter-pg with pg. Connection strings follow postgres-compatible cockroach URLs. ID strategies document BigInt autoincrement via unique_rowid or String UUID with gen_random_uuid and @db.Uuid. Introspection requires cockroachdb provider for correct db pull type mapping. Setup covers schema generator output paths, dotenv loading, and adapter-instantiated PrismaClient examples matching v7 query compiler requirements.12installs37Prisma Database Setup MongodbThe prisma-database-setup-mongodb skill documents MongoDB setup for Prisma with an explicit warning that MongoDB is not supported in Prisma ORM v7 and requires v6.x. Schema uses provider mongodb with url env, prisma-client-js generator, and mandatory @id @map(_id) @db.ObjectId String fields with @default(auto()). Relations require @db.ObjectId on reference fields. Connection strings use mongodb+srv URLs with retryWrites. Migrations do not work; use db push for indexes and db pull for sampling introspection. Common issues cover replica set requirement for transactions and Invalid ObjectID decoration on relation fields.12installs38Prisma Database Setup MysqlThe prisma-database-setup-mysql skill configures Prisma v7 MySQL datasources with prisma.config.ts env DATABASE_URL, mysql:// connection format, and required @prisma/adapter-mariadb with mariadb driver instantiation including host, port, connectionLimit, user, password, and database fields. PlanetScale setups add relationMode = prisma to emulate foreign keys without database-level constraints. Common issues document connection_limit URL tuning for too many connections and JSON support notes across MySQL 5.7+ and MariaDB 10.2+. Generator uses prisma-client with custom output path per v7 conventions.12installs39Prisma Database Setup SqliteThe prisma-database-setup-sqlite skill sets provider sqlite in schema.prisma, prisma.config.ts datasource url for file:./dev.db paths, and Prisma ORM 7 mandatory adapters. Default path uses @prisma/adapter-better-sqlite3 with better-sqlite3 and PrismaBetterSqlite3 url config. Edge or Turso deployments use @prisma/adapter-libsql with TURSO_DATABASE_URL and TURSO_AUTH_TOKEN. Limitations note no native enums, no scalar String lists, and write locking concurrency behavior. Troubleshooting covers database file not found when DATABASE_URL path differs from schema location context in v7.12installs40Prisma Database Setup SqlserverThe prisma-database-setup-sqlserver skill configures Microsoft SQL Server with Prisma v7 provider sqlserver, prisma.config.ts DATABASE_URL using sqlserver:// connection strings, and required driver adapter @prisma/adapter-mssql with tedious or compatible driver per v7 query compiler requirements. Schema generator outputs prisma-client to a custom folder. Setup covers Windows and Azure SQL connection patterns, encrypt and trustServerCertificate URL parameters, and PrismaClient instantiation passing adapter config. Aligns with other Prisma database setup skills for config.ts env pattern and post-setup migrate workflows on relational engines supporting prisma migrate.11installs