prisma-postgres

Provision and manage Prisma Postgres databases via CLI, Console, and Management API.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-postgres-dimonikrv
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/DimonikRV/ghost-pilot-project/tree/main/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/DimonikRV/ghost-pilot-project --skill prisma-postgres-dimonikrv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires create-db, @prisma/management-api-sdk, and includes references (resource) components.

What problem does it solve? Setting up and managing Prisma Postgres databases involves multiple surfaces—Console, CLI, Management API, and SDK—and choosing the wrong workflow wastes time or breaks automation. This Skill provides structured guidance for every provisioning and connection path. ## Core Features & Use Cases - Instant CLI Provisioning: Create temporary databases with npx create-db, control regions, TTL, JSON output, and write DATABASE_URL directly to .env files. - Programmatic Management: Use the Management API with service tokens or OAuth 2.0, or the typed @prisma/management-api-sdk with token refresh for backend automation. - Connection & Linking Guidance: Link existing databases with prisma postgres link, configure direct TCP connections with sslmode=require, and choose between @prisma/adapter-pg and @prisma/adapter-ppg. - Use Case: A developer building a multi-tenant SaaS needs to provision a fresh Postgres database per customer signup. The Skill guides them to use the Management API with a service token, retrieve connection credentials, and construct the DATABASE_URL programmatically. ## Quick Start Ask the AI to provision a new Prisma Postgres database using create-db and write the connection string into your project's .env file.

Frequently Asked Questions about prisma-postgres

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

FAQPage Schema
How do I create a Prisma Postgres database from the command line?▼

Run `npx create-db@latest` to provision a database instantly. Use flags like `--region` for location, `--env .env` to write DATABASE_URL to a file, `--json` for CI output, or `--ttl` to control auto-deletion timing.

How to provision Prisma Postgres databases programmatically in Node.js?▼

Use the `create-db` npm package's `create()` function for quick provisioning, or `@prisma/management-api-sdk` for full workspace and project management with typed endpoints, OAuth support, and automatic token refresh.

What is the difference between service token and OAuth for Prisma Management API?▼

Service tokens are best for server-to-server operations within your own workspace. OAuth 2.0 is used when acting on behalf of users across multiple workspaces, requiring an authorize redirect, code exchange, and token refresh handling.

How long do create-db temporary databases last?▼

Databases created with create-db are temporary by default and auto-delete after roughly 24 hours unless claimed. You can shorten this with the `--ttl` flag (e.g., `30m` or `2h`), or open the claim URL to keep the database permanently.

Which Prisma adapter should I use for serverless vs Node.js apps?▼

Standard Node.js apps should use `@prisma/adapter-pg` with a direct TCP connection string including `sslmode=require`. Edge or serverless runtimes should use `@prisma/adapter-ppg` with `@prisma/ppg` only when the Prisma Postgres serverless driver is specifically needed.

How do I link an existing Prisma Postgres database to my local project?▼

Run `prisma postgres link` interactively, or use `prisma postgres link --api-key <key> --database <id>` for CI environments. This updates your `.env` with DATABASE_URL, after which you run `prisma generate` and `prisma migrate dev`.