Skip to content
Prisma Postgres Setup

Prisma Postgres Setup Skill

Prisma's official skill for getting an app a Prisma Postgres database: reuse an existing connection, use the Vercel Marketplace flow, spin up a no-account database with npx create-db, or provision a persistent one, then connect and verify it.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from prisma/skills.

$ npx skills add prisma/skills --skill prisma-postgres-setup

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

Copy the whole skill folder — SKILL.md and any scripts or references beside it — into ~/.claude/skills/prisma-postgres-setup/, where Claude Code picks it up in every project. Only git is needed.

tmp=$(mktemp -d) && \
  git clone --depth 1 --branch main https://github.com/prisma/skills.git "$tmp" && \
  mkdir -p ~/.claude/skills && \
  cp -R "$tmp"/prisma-postgres-setup ~/.claude/skills/prisma-postgres-setup

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/prisma-postgres-setup/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • Reuses an existing database connection or integration before creating anything
  • Vercel Marketplace flow for v0 and Vercel projects
  • No-account temporary databases with npx create-db (24-hour expiry unless claimed)
  • Persistent provisioning via CLI, MCP tool, Console or Management API
  • Stores the connection string in secret env config and handles differing env files
  • Hands ORM setup to prisma-orm-setup and verifies with a read-only query

Prisma Postgres Setup is the database-provisioning skill in the prisma/skills repository, the successor to the older prisma-postgres skill name. It loads when a user needs a database and has none configured, with requests like "add a Postgres database" or "set up a database for this app", and it keeps provisioning separate from ORM configuration so an existing database is always reused rather than replaced.

The agent first inspects the project: the requested ORM or driver, installed packages, any existing connection and the environment-loading files, checking that secrets exist without printing them. It honours explicit choices such as Drizzle, pg or a database-only setup. It then picks a path from a table: reuse an existing connection or integration; follow the native Vercel Marketplace flow for v0 and Vercel projects; offer npx create-db@latest for a working database with no account, which is deleted after 24 hours unless it is claimed with a free Prisma account; or provision a standalone persistent database through an authenticated CLI, MCP tool, the Console or the Management API. It resolves workspace, project and region first, asks when several fit, and reports a permission or quota blocker instead of deleting resources or switching workspaces.

The connection string goes into the project's secret environment configuration, never into code or chat, and the agent accounts for apps and CLIs loading different env files. ORM configuration is handed to the prisma-orm-setup skill. It finishes with a read-only query through the chosen ORM or driver and a report of what was connected, and points to a bundled operations reference for Studio and later work. MIT licensed.

SKILL.md

The instructions your agent loads, as published by Prisma.

SKILL.md
name
prisma-postgres-setup
description
Obtain or reuse a Prisma Postgres database and connect an application. Use when the user needs a database and has none configured ("I need a database", "add a Postgres database", "set up a database for this app"), runs or mentions `create-db` or `npx create-db`, or asks to set up or connect Prisma Postgres, including in v0 and the Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; reuses an existing connection first and honors an explicit provider, driver, alternative ORM, or database-only choice.
license
MIT
metadata
author: prisma version: "2.3.1"

Prisma Postgres setup

Connect the intended database, then verify it from the application. Keep provisioning separate from ORM configuration so an existing database is reused.

1. Inspect the project

Check the user's requested ORM or driver, installed packages, database connection, and environment-loading files. Check secret presence without printing values.

  • Honor explicit choices such as Drizzle, pg, or database-only setup.
  • For query or schema work in an already configured app, use its version-matched ORM guidance; do not restart setup.
2. Reuse or obtain a database
SituationAction
Existing connection or connected integrationVerify its project, database, and environment; reuse it.
v0, Vercel Marketplace, or a Vercel projectRead [Marketplace setup](references/vercel-marketplace.md) and use the native integration flow.
No database yet and no provider namedOffer npx create-db@latest for a working database now with no account (it is deleted after 24 hours unless claimed, and claiming needs a free Prisma account; read the create-db section in [provisioning](references/provisioning.md)), or a persistent database through [provisioning](references/provisioning.md). Ask which one when the request does not say.
Standalone persistent databaseRead [provisioning](references/provisioning.md); use an authenticated CLI, MCP tool, Console, or Management API.
Temporary development database requestedRead the create-db section in [provisioning](references/provisioning.md), including expiry and claiming.

Resolve the workspace, project, and region before creation. If several resources fit, ask which one to use. If provisioning is blocked by permissions or quota, report the blocker; do not delete another resource or switch workspaces to get around it.

3. Connect the application

Use the connection appropriate to the chosen driver and runtime. Store it in the project's secret environment configuration, never source code or chat. Preserve unrelated entries, update the intended variable once, and ensure local secret files are ignored by Git.

Application processes and CLI commands may load different environment files. For example, a framework may load .env.development.local while a shell command does not. A variable missing from the shell does not mean the database is missing: load the intended file for that command without displaying credentials, and do not provision another database.

4. Configure the ORM and verify

For Prisma ORM setup, read prisma-orm-setup/SKILL.md directly, or load the installed prisma-orm-setup skill when the host resolves sibling skills by name. It owns ORM version selection and configuration. If that handoff is unavailable, report it.

For an explicitly selected alternative, keep that ORM or driver and use its documented setup. For database-only setup, stop after verifying connectivity.

Run a read-only query against the intended database through the application's chosen ORM or driver. Report what was connected, the selected ORM/version, and the query result without secrets. If any step is blocked or untested, say so instead of claiming setup is complete.

For Studio, SDK integrations, or database operations beyond initial setup, read [operations](references/operations.md).

Install
New

Prisma's official skill for setting up Prisma ORM or repairing an app's database connection: it detects the app's Prisma version, defaults new apps to Prisma 8 and its package-owned skill, and keeps Prisma 6 and 7 apps on their own major.

Neon's official agent skill for serverless Postgres — connection strings and drivers, pooled vs direct connections, branching, autoscaling, scale-to-zero, read replicas and logical replication.

Prisma's official Prisma Client reference skill: client setup with driver adapters, CRUD and bulk queries, select/include/omit, filters, relation reads and nested writes, transactions and safe raw SQL.

Browse all skills →