prisma-postgres

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

Updated Jul 26, 2026
One-click install
npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-postgres-primotionstudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/PrimotionStudio/turbo-repo-is-cool/tree/main/packages/db/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/PrimotionStudio/turbo-repo-is-cool --skill prisma-postgres-primotionstudio

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 tools, and APIs—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 Provisioning: Create temporary databases with create-db (aliases create-pg, create-postgres) using flags like --ttl, --region, --json, and --env. - Programmatic Management: Use the Management API or @prisma/management-api-sdk with service tokens or OAuth for backend automation and multi-tenant onboarding. - Connection Setup: Link existing projects 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 CI preview pipeline runs npx create-db@latest --json --ttl 2h to spin up an auto-expiring database, then uses the Management API SDK to provision persistent databases for production tenants. ## Quick Start Ask the assistant 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 terminal?

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

How to provision Prisma Postgres programmatically in TypeScript?

Install @prisma/management-api-sdk and use createManagementApiClient with an existing service token, or createManagementApiSdk for OAuth with token refresh. Alternatively, the create-db npm package exposes create() and regions() functions for direct programmatic provisioning.

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

Service tokens suit server-to-server operations within your own workspace and are sent as Bearer auth. OAuth 2.0 is for acting on behalf of users across workspaces, requiring an authorize redirect, code exchange, and access token flow.

Does Prisma Postgres support direct TCP connections?

Yes, Prisma Postgres supports direct TCP connections using a PostgreSQL URL with sslmode=require against db.prisma.io:5432. Connection responses expose endpoints.direct and endpoints.pooled; secrets are shown once at creation and must be stored immediately.

When should I use @prisma/adapter-pg versus @prisma/adapter-ppg?

Use @prisma/adapter-pg with the direct TCP URL for standard Node.js applications. Use @prisma/adapter-ppg with @prisma/ppg only for edge or serverless runtimes that specifically need the Prisma Postgres serverless driver.

What happens to unclaimed create-db databases?

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 (for example 30m or 2h), or claim the database via the claim URL to keep it permanently.