prisma-postgres-setup

Provisions a Prisma Postgres database via the Management API and connects it to a local project.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/manab-debnath/trello --skill prisma-postgres-setup-manab-debnath
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres-setup
Source: https://github.com/manab-debnath/trello/tree/main/packages/db/.agents/skills/prisma-postgres-setup
Command: npx skills add https://github.com/manab-debnath/trello --skill prisma-postgres-setup-manab-debnath

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 through the Management API, choosing a region, extracting the right connection string, configuring Prisma 7's new client adapter pattern, and verifying the connection. This Skill automates that entire provisioning and local configuration workflow. ## Core Features & Use Cases - API-driven provisioning: Authenticates with a service token, lists available regions, creates a project with a database, and polls until the database status is ready. - Local project configuration: Installs required packages (prisma, @prisma/client, @prisma/adapter-pg, pg, dotenv), writes DATABASE_URL to .env, and sets up prisma.config.ts following Prisma 7 conventions. - Schema and verification workflow: Offers starter schema options, runs prisma migrate dev, and executes a test-connection script to confirm end-to-end connectivity. - Use Case: A developer starting a new Next.js app asks the agent to "set up a Prisma Postgres database" and receives a fully provisioned database, configured schema, generated client, and verified connection without touching the Console UI. ## Quick Start Set up a new Prisma Postgres database for this project and connect it locally using my 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, POST to /v1/projects with createDatabase set to true, then extract the direct connection string from the response. Write it to .env as DATABASE_URL and configure prisma.config.ts.

How do I authenticate with the Prisma Management API?▼

Create a service token in Prisma Console under Workspace Settings, then Service Tokens. Pass it as a Bearer token in the Authorization header of every API request. Tokens are workspace-scoped and shown only once at creation.

How do I instantiate PrismaClient in Prisma 7?▼

Prisma 7 requires a driver adapter: create a pg.Pool with your DATABASE_URL, wrap it in PrismaPg from @prisma/adapter-pg, and pass { adapter } to the PrismaClient constructor. Import the client from ./generated/prisma/client.js and ensure package.json has type module.

Why does new PrismaClient() throw an error in Prisma 7?▼

Prisma 7 removed the zero-argument constructor and the datasourceUrl option. You must pass an adapter object, such as PrismaPg wrapping a pg.Pool, so the client knows how to connect to the database at runtime.

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.