prisma-postgres-setup

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

1|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/sristigupta04/Airbnb-app --skill prisma-postgres-setup-sristigupta04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres-setup
Source: https://github.com/sristigupta04/Airbnb-app/tree/main/Full-stack/.agents/skills/prisma-postgres-setup
Command: npx skills add https://github.com/sristigupta04/Airbnb-app --skill prisma-postgres-setup-sristigupta04

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: authenticating with the Management API, choosing a region, provisioning a project, extracting the connection string, and configuring Prisma 7 correctly in a local project. This Skill automates that entire workflow end-to-end. ## Core Features & Use Cases - Automated provisioning: Creates a Prisma Postgres project and database through the Management API, polls until the database is ready, and extracts the direct connection string. - Prisma 7 local configuration: Installs required packages, writes DATABASE_URL to .env, configures prisma.config.ts with the pg driver adapter, and runs migrations with client generation. - Connection verification: Runs a test script against the database to confirm the setup works before finishing. - Use Case: You start a new Node.js project and say "set up a Prisma Postgres database for this app" — the Skill provisions the database, wires up the schema, runs the initial migration, and verifies connectivity. ## Quick Start Ask the agent to set up a new Prisma Postgres database and connect it to this project, providing your workspace service token if you have one.

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, create a project via POST /v1/projects with createDatabase set to true, and extract the direct connection string from the response. Then write it to .env as DATABASE_URL, configure prisma.config.ts, and run prisma migrate dev.

How do I get a Prisma Postgres connection string?

Create a project with a database through the Management API and read data.database.connections[0].endpoints.direct.connectionString from the response. Use the direct endpoint, not the pooled or accelerate endpoints, for new projects.

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.

Why does Prisma Postgres authentication fail with a 401 error?

A 401 authentication-failed error means the service token is invalid or expired. Create a new token in Prisma Console under Workspace Settings, Service Tokens, and pass it in the Authorization Bearer header of every API request.

When should I not use this database setup workflow?

Do not use it for CI/CD preview databases, which belong to the prisma-postgres-cicd skill, or for multi-tenant provisioning inside an app, which belongs to prisma-postgres-integrator. Existing connected databases only need standard Prisma CLI migration commands.