prisma-postgres

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

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/dlptho356/TTTN --skill prisma-postgres-dlptho356
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/dlptho356/TTTN/tree/main/DATN/backend/.windsurf/skills/prisma-postgres
Command: npx skills add https://github.com/dlptho356/TTTN --skill prisma-postgres-dlptho356

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires create-db, @prisma/cli, @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 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 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: Use the Management API or @prisma/management-api-sdk with service tokens or OAuth for workspace, project, branch, and database automation. - Connection setup: Link existing projects with prisma postgres link, configure direct TCP connections with sslmode=require, and choose between @prisma/adapter-pg and serverless drivers. - Use Case: A backend developer needs a Postgres database for a preview deployment. They run npx create-db@latest --json --ttl 2h to get a connection string, then later claim it or provision a persistent database via the Management API. ## 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 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 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 package exposes create() and regions() functions for direct provisioning.

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. The @prisma/cli database commands create persistent databases attached to a Project, with support for connections, usage metrics, and backups.

Does Prisma Postgres support direct TCP connections?

Yes, Prisma Postgres supports direct TCP connections on db.prisma.io:5432 with sslmode=require. Connection responses expose endpoints.direct and endpoints.pooled; secrets are shown only once at creation, so store them immediately.

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.

When should I use the Management API instead of the Console?

Use the Management API for backend automation, multi-tenant onboarding, or controlled resource provisioning where interactive workflows are impractical. The Console is better for manual tasks like viewing Studio data, metrics, and connection details.