prisma-postgres

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

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-postgres-arvindiyer1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/ArvindIyer1/prediction-market-project/tree/main/packages/.windsurf/skills/prisma-postgres
Command: npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-postgres-arvindiyer1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires create-db, @prisma/management-api-sdk, @prisma/cli, 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 produces misconfigured connections. This Skill provides structured guidance for every provisioning and management path. ## Core Features & Use Cases - Instant database provisioning: Create temporary or persistent Prisma Postgres databases with create-db, create-pg, or the @prisma/cli platform commands, including region selection, TTL, and JSON output for CI. - Programmatic management: Automate workspace, project, branch, and database operations through the Management API or the typed @prisma/management-api-sdk with service token or OAuth authentication. - Connection setup: Link existing projects with prisma postgres link, retrieve direct TCP or pooled connection strings, and choose the right driver adapter (@prisma/adapter-pg vs @prisma/adapter-ppg). - Use Case: A backend developer needs a Postgres database for a CI preview environment. They run npx create-db@latest --json --ttl 2h to get a connection string that auto-deletes after the pipeline finishes. ## Quick Start Ask the assistant to create a new Prisma Postgres database in a specific region 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 terminal?

Run npx create-db@latest to provision a database instantly, with aliases create-pg and create-postgres available. Use flags like --region, --json, --env, and --ttl to control region, output format, env file writing, and auto-deletion timing.

How to provision Prisma Postgres programmatically with the Management API?

Send authenticated requests to https://api.prisma.io/v1 using a service token as Bearer auth or an OAuth 2.0 access token. The API manages workspaces, projects, branches, and databases, with OpenAPI docs at /v1/doc.

What is the difference between create-db and the Prisma Platform CLI?

create-db creates temporary databases that auto-delete after about 24 hours unless claimed, ideal for demos and CI. The @prisma/cli database commands create persistent databases attached to a Project with backups, usage metrics, and branch support.

Does Prisma Postgres support direct TCP connections?

Yes, Prisma Postgres exposes direct endpoints at db.prisma.io:5432 and pooled endpoints at pooled.db.prisma.io:5432. Use sslmode=require in the connection URL, and note that connection secrets are shown only once at creation.

Which adapter should I use for Prisma Postgres in serverless apps?

Standard Node.js apps should use @prisma/adapter-pg with the direct TCP connection URL. 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 a local project?

Run prisma postgres link to connect a local project to an existing database, which updates your .env with DATABASE_URL. For CI, pass --api-key and --database flags non-interactively, then run prisma generate and prisma migrate dev.