prisma-postgres

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

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/NarixHine/uni-chem --skill prisma-postgres-narixhine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-postgres
Source: https://github.com/NarixHine/uni-chem/tree/main/.agents/skills/prisma-postgres
Command: npx skills add https://github.com/NarixHine/uni-chem --skill prisma-postgres-narixhine

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 workflows—Console UI, CLI provisioning, and programmatic APIs—and choosing the wrong path wastes time or breaks automation. This Skill provides structured guidance for every Prisma Postgres workflow so you pick the right tool for each scenario. ## Core Features & Use Cases - Instant CLI Provisioning: Spin up 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. - Project Linking & Connections: Link existing databases with prisma postgres link, configure direct TCP connections with sslmode=require, and choose between @prisma/adapter-pg and serverless drivers. - Use Case: You are building a multi-tenant SaaS and need to provision a fresh Postgres database per customer signup. Use the Management API SDK guidance to implement OAuth-based provisioning with automatic token refresh. ## Quick Start Ask the assistant to provision a new Prisma Postgres database in the eu-central-1 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 command line?▼

Run npx create-db (aliases: create-pg, create-postgres) to provision a database instantly. Use flags like --region, --env to write DATABASE_URL to a file, --json for CI output, and --ttl to control auto-deletion.

How do I provision Prisma Postgres databases programmatically?▼

Use the Management API at https://api.prisma.io/v1 with a service token or OAuth 2.0, or install @prisma/management-api-sdk for typed endpoints. The create-db npm package also exposes create() and regions() functions for Node.js and Bun.

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, sent as Bearer auth. OAuth 2.0 is for acting on behalf of users across workspaces, requiring an authorize redirect, code exchange, and token refresh handling.

How do I connect Prisma Postgres to an existing local project?▼

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

Do temporary create-db databases get deleted automatically?▼

Yes, unclaimed databases are auto-deleted after roughly 24 hours. Use the claim URL shown in the command output to keep the database permanently, or set a shorter lifetime with the --ttl flag like 30m or 2h.

Which adapter should I use for Prisma Postgres connections?▼

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