prisma-orm-setup
Set up Prisma ORM in an application, connect its database, or troubleshoot the connection of an existing Prisma 6, 7, or 8 app. Defaults new applications to Prisma ORM 8 and loads the package-owned prisma-8 skill; keeps existing Prisma 6/7 apps on their version with provider references for PostgreSQ
- 0
- Installs
- —
- Rating
- —
- Success rate
- 9
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 5053e77b8b9ac77e… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Prisma ORM setup
This skill owns ORM version selection for setup and connection work. Preserve the application's ORM version and intended database. A connection repair does not require a major upgrade.
New applications default to Prisma ORM 8. Detailed Prisma 8 configuration, queries, migrations, and runtime code belong to the versioned prisma-8 skill shipped with the ORM package.
1. Detect the starting point
Read the package manifest, lockfile, Prisma configuration, schema, and application imports. Identify the ORM version, database provider, and runtime. The CLI version alone does not identify the application's version: a Prisma 8 CLI can coexist with a legacy client, so inspect @prisma/client, @prisma/prisma7, and the schema and configuration.
| Starting point | Path |
|---|---|
| Prisma 8 application | Step 4, without reinitializing |
| New application without a version choice | Step 3 |
| Prisma 6 or 7 application, or an explicit earlier major | Step 5 |
For a new application, check the selected Prisma 8 release's provider support and runtime requirements before installing. If the provider is unsupported, explain the limitation and offer an explicitly selected earlier version. Keep the requested database; do not silently fall back or invent a supported target.
Use an existing database when supplied. Load prisma-postgres-setup only when Prisma Postgres is needed and no connection has been selected yet; return here once connected.
2. Handle requested major upgrades separately
When the user requests a major upgrade, load a workflow that supports the source version and provider. For PostgreSQL 7-to-8, use the Prisma migration guide; for MongoDB 6-to-8, use prisma-mongodb-upgrade. Other providers need an explicitly supported migration path. prisma-upgrade-v7 covers 6 to 7; the package-owned prisma-8 upgrade reference covers updates within 8.
3. Bootstrap a new Prisma 8 application
Check the selected release's runtime requirements and initialization guide. Resolve and pin a published Prisma CLI 8 release, including its prerelease suffix if needed; verify its version before initialization. Do not rely on a floating latest remaining version 8.
Use the project's package manager to run the installed CLI. For PostgreSQL and Prisma schema language authoring:
prisma orm init --yes --target postgres --authoring psl
Use the supported target for the selected provider. Preserve existing application files and connection configuration; do not let setup provision an unrelated database. Verify that the resolved ORM package is version 8 before proceeding.
4. Load the installed Prisma 8 guidance
Run the installed CLI through the project's package manager:
prisma skills sync
Then read the synced prisma-8/SKILL.md, for example .agents/skills/prisma-8/SKILL.md, and follow its preconditions and selected references. Syncing alone does not load the instructions. If the package-owned guidance cannot be loaded, report the blocker. Continue with step 6.
5. Set up or repair an earlier version
For a new setup that explicitly selects an earlier version, pin packages to that major and use its runtime requirements. Keep the CLI, client, and SQL adapter releases compatible. Existing dependencies need not change for a connection repair.
- Prisma 7 SQL: use the provider reference below and client setup.
- Prisma 6 MongoDB: use MongoDB setup. SQL driver adapters do not apply.
- Prisma 6 SQL: preserve its generator, schema URL, and client initialization. Use the provider's connection details below and the Prisma 6 documentation; do not copy the Prisma 7 configuration or adapter examples into it.
| Database | Reference |
|---|---|
| PostgreSQL | PostgreSQL |
| MySQL / MariaDB / PlanetScale | MySQL |
| SQLite / Turso | SQLite |
| Microsoft SQL Server / Azure SQL | SQL Server |
| CockroachDB | CockroachDB |
| MongoDB / Atlas on Prisma 6 | MongoDB |
| Prisma Postgres with Prisma 7 | Prisma Postgres |
The Prisma 7 SQL examples were verified with Prisma 7.10.0; the MongoDB examples with Prisma 6.19.3.
6. Connect and verify
The CLI and the application can load different environment files. Load the intended environment for each without printing secrets, and keep credentials in ignored environment files or the host's secret configuration. For SQL adapters, make the adapter's runtime options address the same database as the CLI connection URL.
For an existing app, preserve schema, migrations, and generator configuration unless the requested work requires changes. Diagnose the connection before running schema-changing commands.
Run the project's relevant checks and a read-only query through the application's client against the intended database. Report the ORM version, the loaded prisma-8 skill version where applicable, and the query result. Package installation or a successful skill sync alone is not a completed setup.
Files
9- SKILL.md
e310619d4d6.7 KB - references/v6-mongodb.md
4462f0a04b2.7 KB - references/v7-client-setup.md
ce3921ed1b1.6 KB - references/v7-cockroachdb.md
4f8dd99e2d2.1 KB - references/v7-mysql.md
117570fae53.5 KB - references/v7-postgresql.md
4449969b112.1 KB - references/v7-prisma-postgres.md
89fd2a14861.5 KB - references/v7-sqlite.md
12503fac682.6 KB - references/v7-sqlserver.md
3979b71ca82.7 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from prisma/skills8
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
Prisma Compute deployment and hosting guide. Use whenever the user mentions Prisma Compute, `prisma.compute.ts`, `defineComputeConfig`, deploying or hosting a Prisma app, `@prisma/cli app deploy`, `compute:deploy`, `create-prisma --deploy`, `PRISMA_SERVICE_TOKEN`, Compute auth/workspaces, apps/deplo
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, ori
Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma 8. Triggers on "upgrade prisma
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
Obtain or reuse a Prisma Postgres database and connect an application. Use for "set up Prisma Postgres", "connect my app to Prisma Postgres", or Prisma Postgres setup in v0 and Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; honors an explicit driver, alternative ORM, or data
Related database skillsscan passed
Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub/sub, and connection management for production applications. Use when adding caching, a distributed lock, rate limiting, or pub/sub with Redis, or when key design needs review.
Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up f
Build and troubleshoot Cloudflare Basin analytics workflows with Basin Pipelines, Basin Catalog, and Basin SQL. Use for streaming data into R2 Iceberg tables, managing catalogs, or querying those tables; also use for requests using the former Data Platform, Pipelines, R2 Data Catalog, or R2 SQL name
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to
Sets up, manages, queries, and configures Cloud Firestore databases (Standard/Enterprise edition), including data modeling, security rules, indexes, and SDK integrations (Web, Python, iOS, Android, Flutter). Use when creating/listing Firestore databases, defining data models/indexes, writing SDK que
Full inventory and audit of AWS Glue Data Catalog assets across S3 Tables, Redshift-federated, and remote Iceberg catalogs. Triggers on: inventory the catalog, audit databases, list all tables, catalog overview, data landscape, enumerate catalogs, data inventory, search the catalog. Do NOT use for f