prisma-postgres-setup

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

1|Updated May 1, 2026
One-click install
npx skills add https://github.com/Joshkovu/ghost-ai --skill prisma-postgres-setup-joshkovu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres-setup
Source: https://github.com/Joshkovu/ghost-ai/tree/main/.agents/skills/prisma-postgres-setup
Command: npx skills add https://github.com/Joshkovu/ghost-ai --skill prisma-postgres-setup-joshkovu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of provisioning a new Prisma Postgres database through the Prisma Management API and getting a working local connection configured without manual Console-only steps.

Core Features & Use Cases

  • Provision Prisma Postgres via Management API: Authenticates with a workspace service token, lists available regions, creates a project with createDatabase: true, and waits for the database to become ready.
  • Generate a usable connection string: Extracts the direct PostgreSQL connection string from the API response and supports an optional named connection.
  • Wire up a local Prisma project (Prisma 7 style): Installs required packages, appends DATABASE_URL into .env, scaffolds Prisma if needed, configures prisma.config.ts for runtime URL loading, and helps define or generate the schema before migrating.
  • Verify end-to-end connectivity: Runs a short test-connection.ts using the Prisma 7 adapter pattern to confirm the database connection works.

Use Case Examples:

  • Provision a new Prisma Postgres database for a Next.js/Node project and connect it locally so you can run Prisma migrations immediately.
  • Obtain a fresh DATABASE_URL when asked to “set up a database” for development or a new environment, specifically using the Management API (not the Console UI).

Quick Start

Provision Prisma Postgres with the Management API and connect it to your local Prisma project by following the steps for selecting an available region, creating the project/database, writing DATABASE_URL to .env, running migrations, and verifying the connection.

Frequently Asked Questions about prisma-postgres-setup

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

FAQPage Schema
How do I provision a Prisma Postgres database using the Management API?

You provision Prisma Postgres by authenticating with a `PRISMA_SERVICE_TOKEN`, listing available regions, and creating a project with `createDatabase: true` through the Management API, then waiting for the database to become ready.

How do I get a connection string for my local Prisma 7 project?

You get a connection string by extracting the direct PostgreSQL connection URL from the Management API response after database creation, then appending it to your `.env` file as `DATABASE_URL` for your local Prisma 7 project to use.

Can I set up Prisma Postgres without using the Console UI?

Yes, you can set up Prisma Postgres entirely without the Console UI by using the Prisma Management API to authenticate, provision the database, and extract the connection string directly within your local Node.js workflow.

What do I need to configure in Prisma 7 to load the database URL at runtime?

To load the database URL in Prisma 7, you must configure `prisma.config.ts` for runtime URL loading from the `.env` file, scaffold Prisma if needed, and define your schema before running `prisma migrate dev`.

How do I verify end-to-end connectivity after connecting my app to Prisma Postgres?

You verify end-to-end connectivity by running a short `test-connection.ts` script using the Prisma 7 adapter pattern, which confirms the database connection works correctly after executing `prisma migrate dev`.

Does this Prisma Postgres setup workflow require a specific authentication token?

Yes, this setup requires a `PRISMA_SERVICE_TOKEN` or a user-provided workspace service token to authenticate with the Prisma Management API for region selection, project creation, and database provisioning.