prisma-postgres-setup

Provision Prisma Postgres databases via the Management API and connect local projects.

1|2|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/byEduarda/TrabalhoFinal-EJCM2026.2 --skill prisma-postgres-setup-byeduarda
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres-setup
Source: https://github.com/byEduarda/TrabalhoFinal-EJCM2026.2/tree/main/back/src/.windsurf/skills/prisma-postgres-setup
Command: npx skills add https://github.com/byEduarda/TrabalhoFinal-EJCM2026.2 --skill prisma-postgres-setup-byeduarda

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 service token, choosing a region, provisioning a project, extracting the connection string, and configuring Prisma 7 correctly. This Skill automates that entire workflow through the Prisma Management API so your local project is connected and verified in one guided session. ## Core Features & Use Cases - Database Provisioning via API: Creates a Prisma Postgres project and database through the Management API, including region selection and polling until the database status is ready. - Local Project Configuration: Installs required packages, writes the direct connection string to .env, and configures prisma.config.ts and schema.prisma following Prisma 7 conventions. - End-to-End Verification: Runs a test connection script using the pg driver adapter to confirm the generated Prisma Client works before finishing. - Use Case: You start a new Node.js project and need a hosted Postgres database. The Skill provisions the database, wires up the connection string, runs the initial migration, and verifies connectivity without opening the Prisma Console. ## Quick Start Ask the agent to set up a new Prisma Postgres database for this project and connect it locally using your service token.

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 from the command line?▼

Use the Prisma Management API with a workspace service token: list available regions, create a project with createDatabase set to true, then extract the direct connection string from the response. Write it to your .env file as DATABASE_URL and run prisma migrate dev.

How do I get a Prisma Postgres connection string?▼

Create a project via POST /v1/projects with createDatabase enabled, then read data.database.connections[0].endpoints.direct.connectionString from the response. Use the direct endpoint, not the pooled or Accelerate endpoints.

How do I instantiate PrismaClient in Prisma 7?▼

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

Where does the database URL go in Prisma 7?▼

In Prisma 7 the connection URL belongs in prisma.config.ts under the datasource field, loaded from process.env with dotenv. The schema.prisma datasource block should only declare the postgresql provider with no url property.

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

Workspaces have a limit on databases. List existing projects with GET /v1/projects, delete an unused project or database via the DELETE endpoints, then retry the creation request.

When should I not use the Prisma 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. If your database already exists and is connected, standard Prisma CLI migration commands are sufficient.