prisma-postgres-setup

Provisions Prisma Postgres databases via the Management API and connects them to local projects.

1|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-postgres-setup-sima-malla
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres-setup
Source: https://github.com/Sima-Malla/Digital_Menu/tree/main/my-app/.windsurf/skills/prisma-postgres-setup
Command: npx skills add https://github.com/Sima-Malla/Digital_Menu --skill prisma-postgres-setup-sima-malla

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires prisma, @prisma/client, @prisma/adapter-pg, pg, dotenv, and includes references (resource) components.

What problem does it solve? Setting up a new Prisma Postgres database involves multiple manual steps: creating a project, choosing a region, obtaining a connection string, configuring Prisma 7, and verifying connectivity. This Skill automates that entire provisioning workflow through the Prisma Management API. ## Core Features & Use Cases - Automated Database Provisioning: Creates a Prisma Postgres project and database via the Management API, with interactive region selection and polling until the database is ready. - Prisma 7 Project Configuration: Installs required packages, writes the direct connection string to .env, configures prisma.config.ts, and runs migrations with client generation. - Connection Verification: Runs an end-to-end test script using the @prisma/adapter-pg driver adapter to confirm the database connection works. - Use Case: You are starting a new Node.js app and need a hosted Postgres database. Ask the agent to set up Prisma Postgres, and it provisions the database, configures your project, and verifies the connection in one flow. ## Quick Start Set up a new Prisma Postgres database for this project and connect it to my app.

Frequently Asked Questions about prisma-postgres-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Prisma Postgres database for a new project?

Authenticate with a workspace service token, pick an available region, and create a project with createDatabase enabled via the Management API. Then write the direct connection string to .env, configure prisma.config.ts, and run prisma migrate dev to finish setup.

How do I get a Prisma Postgres connection string?

Create a project through the Management API and extract data.database.connections[0].endpoints.direct.connectionString from the response. Use the direct endpoint, not the pooled or accelerate endpoints, which are only for legacy Accelerate setups.

How do I instantiate PrismaClient in Prisma 7?

Create a pg.Pool with your DATABASE_URL, wrap it in a PrismaPg adapter, and pass { adapter } to the PrismaClient constructor. Calling new PrismaClient() with no arguments or using datasourceUrl throws in Prisma 7.

Does Prisma 7 read the database URL from schema.prisma?

No. In Prisma 7, connection URLs belong in prisma.config.ts, not in the datasource block of schema.prisma. The schema datasource only declares provider = "postgresql", and prisma.config.ts loads the URL from the environment via dotenv.

Why does Prisma Postgres project creation fail with a database limit error?

Workspaces have a limit on databases, so creation fails when the limit is reached. List your existing projects via GET /v1/projects, delete one you no longer need, and retry the creation request.

When should I not use the Management API for database setup?

Do not use it for CI/CD preview databases or multi-tenant provisioning built into an app, which need dedicated workflows. It is also unnecessary for databases that already exist and are connected, where standard Prisma CLI migration tasks apply.