Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

prisma-orm-setup — Claude Code skill: what it does, how to install

Walks an AI coding agent through Prisma ORM setup: find the version, connect the database, verify the link. New apps default to Prisma ORM 8.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add prisma/skills --skill prisma-orm-setup -a claude-code
Open on GitHub

What prisma-orm-setup does

The skill fixes an order of work for Prisma ORM: detect the starting point first, connect the database second, verify the connection last. New applications get Prisma ORM 8 by default. An app already on Prisma 6 or 7 stays on its version, because repairing a connection is not a reason for a major upgrade.

The agent reads the package manifest, the lockfile, the Prisma config, the schema and the application imports. A Prisma 8 CLI does not mean a Prisma 8 app — the command line tool can sit next to a legacy client, so the version has to come from @prisma/client, @prisma/prisma7 and the schema. After that the path forks: prisma orm init --yes --target postgres --authoring psl for a fresh project, or prisma skills sync followed by actually reading the synced prisma-8/SKILL.md. Syncing on its own loads nothing.

Separate reference files in references/ cover PostgreSQL, MySQL, SQLite, SQL Server, CockroachDB, MongoDB and Prisma Postgres. That is where to check the agent pulls the right one instead of a generic sample, since Prisma 7 configuration copied into a Prisma 6 app will not work. Setup counts as done only after a read-only query through the application client. A clean prisma skills sync proves nothing on its own.

What it helps with

  • stand up Prisma ORM 8 in a new app without a floating latest
  • repair the database connection in an existing Prisma 6 or 7 app
  • work out which ORM and client version the project actually runs
  • pull the reference for one provider: PostgreSQL, SQLite, MongoDB
  • verify the connection with a read-only query before schema changes

Example prompts for the agent

  • Set up Prisma ORM in this project, the database is PostgreSQL
  • Our Prisma 7 app cannot reach the database. Fix the connection, keep the ORM version where it is
  • Check which Prisma and client versions are installed, then connect Prisma Postgres

How to install prisma-orm-setup

1Skills CLI (Vercel)

npx skills add prisma/skills --skill prisma-orm-setup -a claude-code

2Manually: put the files in place

~/.claude/skills/prisma-orm-setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prisma-orm-setup/

From the same set10

The whole set →
prisma-client-api prisma Complete Prisma Client API reference for database queries, CRUD operations, and filtering. Triggers on findMany, create, update, delete, and $transaction. Claude Code CX Codex Cursor +1 389,500installs prisma-database-setup prisma A deprecated compatibility name for prisma-orm-setup, which handles Prisma setup and database connection repair. Claude Code CX Codex Cursor +1 388,400installs prisma-cli prisma Prisma ORM 7 CLI reference for AI agents. Guides client generation, schema migrations, and local database workflows while preventing accidental data loss. Claude Code CX Codex Cursor +1 386,800installs prisma-postgres prisma A deprecated compatibility name for prisma-postgres-setup. Use it only when explicitly invoked; new projects should select prisma-postgres-setup instead. Claude Code CX Codex Cursor +1 380,400installs prisma-driver-adapter-implementation prisma Reference guide for implementing SQL adapters in Prisma ORM 7. Required for transaction handling, savepoint support, value mapping, and database error preservation. Claude Code CX Codex Cursor +1 375,000installs prisma-postgres-setup prisma Provisions or connects a Prisma Postgres database and links it to your app. Useful for spinning up dev databases quickly or wiring connections in Vercel and v0. Claude Code CX Codex Cursor +1 374,900installs prisma-upgrade-v7 prisma Complete migration guide from Prisma ORM v6 to v7 with all critical changes: new generator, required driver adapters, ESM config, and client imports. Use when upgrading Prisma or hitting v7 errors. Claude Code CX Codex Cursor +1 374,800installs prisma-compute prisma Skill for deploying TypeScript apps to Prisma Compute via Prisma 8 CLI. Manage deployments, versions, environment variables, and custom domains from your editor. Claude Code CX Codex Cursor +1 370,000installs

Similar

quant-analyst sickn33 A quant skill for the agent: financial models, strategy backtests and risk metrics, built on pandas, numpy and scipy. Claude Code CX Codex Cursor +1 942installs genomic-coordinates K-Dense-AI Converts genomic coordinates between BED, VCF, and GTF formats, and normalises variant representations. Useful when reconciling coordinate systems, indels, and assembly contigs. Claude Code CX Codex Cursor +1 939installs ontology-term-resolution K-Dense-AI Resolves free-text scientific labels to ontology term IDs and validates CURIEs via EBI OLS4. Useful for preparing dataset metadata for GEO, BioSamples, or CELLxGENE. Claude Code CX Codex Cursor +1 937installs relsa-severity-assessment K-Dense-AI Calculates multivariate RELSA severity scores and ARIMA-based score forecasts for animal studies. Useful for 3Rs reporting and EU Directive 2010/63/EU compliance. Claude Code CX Codex Cursor +1 863installs yfinance-data himself65 Skill fetches stock quotes, financial statements, options, dividends and holder data through the yfinance library (Yahoo Finance). Claude Code CX Codex Cursor +1 3,800installs firecrawl-lead-research firecrawl Pulls job title, company and firmographics for the people and domains you already named, then fills the gaps in a list. Useful before a call or when an old lead list needs a check. Claude Code CX Codex Cursor +1 31,400installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs

Questions about prisma-orm-setup

How do I install prisma-orm-setup in Claude Code?

Run npx skills add prisma/skills --skill prisma-orm-setup -a claude-code. The skill lands at ~/.claude/skills/prisma-orm-setup/SKILL.md, which is where Claude Code reads it from.

What does prisma-orm-setup do?

It guides an agent through Prisma ORM setup: pick the version, connect the database for the chosen provider, and verify the connection with a query through the application client.

Which Prisma version does the skill pick for a new project?

Prisma ORM 8, unless an earlier major is chosen explicitly. Apps already on Prisma 6 or 7 stay there, and moving to 8 becomes a separate step with the migration guide.

Source text

SKILL.md · MIT
---
name: prisma-orm-setup
description: 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 PostgreSQL, MySQL, SQLite, SQL Server, CockroachDB, MongoDB, and Prisma Postgres.
license: MIT
metadata:
  author: prisma
  version: "1.0.0"
---

# 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](https://github.com/prisma/orm/tree/main/skills/prisma-8) 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](#5-set-up-or-repair-an-earlier-version)         |

For a new application, check the selected Prisma 8 release's [provider support](https://www.prisma.io/docs/orm/supported-databases) 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](https://www.prisma.io/docs/guides/upgrade-prisma-orm/postgresql); for MongoDB 6-to-8, use [prisma-mongodb-upgrade](../prisma-mongodb-upgrade/SKILL.md). 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](https://www.prisma.io/docs/orm/release-status) and [initialization guide](https://www.prisma.io/docs/cli/orm-init). 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:

```bash
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:

```bash
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](references/v7-client-setup.md).
- **Prisma 6 MongoDB:** use [MongoDB setup](references/v6-mongodb.md). 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](https://www.prisma.io/docs/orm/v6); do not copy the Prisma 7 configuration or adapter examples into it.

| Database                         | Reference                                                 |
| -------------------------------- | --------------------------------------------------------- |
| PostgreSQL                       | [PostgreSQL](references/v7-postgresql.md)                 |
| MySQL / MariaDB / PlanetScale    | [MySQL](references/v7-mysql.md)                           |
| SQLite / Turso                   | [SQLite](references/v7-sqlite.md)                         |
| Microsoft SQL Server / Azure SQL | [SQL Server](references/v7-sqlserver.md)                  |
| CockroachDB                      | [CockroachDB](references/v7-cockroachdb.md)               |
| MongoDB / Atlas on Prisma 6      | [MongoDB](references/v6-mongodb.md)                       |
| Prisma Postgres with Prisma 7    | [Prisma Postgres](references/v7-prisma-postgres.md)       |

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.

© prisma · MIT · prisma/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor