prisma-postgres
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
Best use case
prisma-postgres is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
Teams using prisma-postgres should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/prisma-postgres/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How prisma-postgres Compares
| Feature / Agent | prisma-postgres | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Prisma Postgres setup and operations guidance across Console, create-db CLI, Management API, and Management API SDK. Use when creating Prisma Postgres databases, working in Prisma Console, provisioning with create-db/create-pg/create-postgres, or integrating programmatic provisioning with service tokens or OAuth.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Prisma Postgres Guidance for creating, managing, and integrating Prisma Postgres across interactive and programmatic workflows. ## When to Apply Reference this skill when: - Setting up Prisma Postgres from Prisma Console - Provisioning instant temporary databases with `create-db` - Linking an existing local project with `prisma postgres link` - Managing Prisma Postgres resources via Management API - Using `@prisma/management-api-sdk` in TypeScript/JavaScript - Handling claim URLs, connection strings, regions, and auth flows ## Rule Categories by Priority | Priority | Category | Impact | Prefix | |----------|----------|--------|--------| | 1 | CLI Provisioning | CRITICAL | `create-db-cli` | | 2 | Management API | CRITICAL | `management-api` | | 3 | Management API SDK | HIGH | `management-api-sdk` | | 4 | Console and Connections | HIGH | `console-and-connections` | ## Quick Reference - `create-db-cli` - instant databases and current CLI flags (`--ttl`, `--copy`, `--quiet`, `--open`) - `management-api` - service token and OAuth API workflows - `management-api-sdk` - typed SDK usage with token storage - `console-and-connections` - Console operations, `prisma postgres link`, direct TCP connections, and serverless-driver choices ## Core Workflows ### 1. Console-first workflow Use Prisma Console for manual setup and operations: - Open `https://console.prisma.io` - Create/select workspace and project - Use Studio in the project sidebar to view/edit data - Retrieve direct connection details from the project UI ### 2. Quick provisioning with create-db Use `create-db` when you need a database immediately: ```bash npx create-db@latest ``` Aliases: ```bash npx create-pg@latest npx create-postgres@latest ``` For app integrations, you can also use the programmatic API (`create()` / `regions()`) from the `create-db` npm package. Temporary databases auto-delete after ~24 hours unless claimed. ### 3. Link an existing local project Use `prisma postgres link` when the database already exists and you want to wire a local project to it: ```bash prisma postgres link ``` For CI or other non-interactive environments: ```bash prisma postgres link --api-key "<your-api-key>" --database "db_..." ``` This flow updates your local `.env` with `DATABASE_URL`, then you can run `prisma generate` and `prisma migrate dev`. ### 4. Programmatic provisioning with Management API Use API endpoints on: ```text https://api.prisma.io/v1 ``` Explore the schema and endpoints using: - OpenAPI docs: `https://api.prisma.io/v1/doc` - Swagger Editor: `https://api.prisma.io/v1/swagger-editor` Auth options: - Service token (workspace server-to-server) - OAuth 2.0 (act on behalf of users) ### 5. Type-safe integration with Management API SDK Install and use: ```bash npm install @prisma/management-api-sdk ``` Use `createManagementApiClient` for existing tokens, or `createManagementApiSdk` for OAuth + token refresh. ## Rule Files Detailed guidance lives in: ``` references/console-and-connections.md references/create-db-cli.md references/management-api.md references/management-api-sdk.md ``` ## How to Use Start with `references/create-db-cli.md` for fast setup, then switch to `references/management-api.md` or `references/management-api-sdk.md` when you need programmatic provisioning.
Related Skills
supabase-postgres-best-practices
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
prisma-upgrade-v7
Complete migration guide from Prisma ORM v6 to v7 covering all breaking changes. Use when upgrading Prisma versions, encountering v7 errors, or migrating existing projects. Triggers on "upgrade to prisma 7", "prisma 7 migration", "prisma-client generator", "driver adapter required".
prisma-driver-adapter-implementation
Required reference for Prisma v7 driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter/Transaction interfaces. Contains critical contract details not inferable from code examples — including the transaction lifecycle protocol, error mapping requirements, and verification checklist. Existing implementations do not replace this skill.
prisma-database-setup
Guides for configuring Prisma with different database providers (PostgreSQL, MySQL, SQLite, MongoDB, etc.). Use when setting up a new project, changing databases, or troubleshooting connection issues. Triggers on "configure postgres", "connect to mysql", "setup mongodb", "sqlite setup".
prisma-client-api
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-cli
Prisma CLI commands reference covering all available commands, options, and usage patterns. Use when running Prisma CLI commands, setting up projects, generating client, running migrations, managing databases, or starting Prisma's MCP server. Triggers on "prisma init", "prisma generate", "prisma migrate", "prisma db", "prisma studio", "prisma mcp".
use-zod
Answer questions about the Zod schema validation library and help build schemas, parsers, refinements, transforms, codecs, and error formatters. Use when developers: (1) ask about Zod APIs like `z.object`, `z.string`, `z.array`, `z.union`, `z.discriminatedUnion`, `parse`, `safeParse`, `z.infer`; (2) define request/response/form schemas in TypeScript; (3) handle `ZodError` or customize error messages; (4) migrate between Zod v3 and v4 (entry-point split, `formatError` → `treeifyError`/`prettifyError`, unified `error` param replacing `message`/`errorMap`). Triggers on: "zod", "z.object", "z.string", "z.array", "z.union", "z.infer", "z.input", "z.output", "ZodError", "$ZodError", "safeParse", "parseAsync", "z.codec", "treeifyError", "prettifyError", "flattenError", "discriminatedUnion", "zod/v4", "zod/v3", "zod/mini", "z.coerce", "superRefine".
workflow
Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue", "event", "push", "subscribe", or step-based orchestration.
wpds
Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc.
wp-wpcli-and-ops
Use when working with WP-CLI (wp) for WordPress operations: safe search-replace, db export/import, plugin/theme/user/content management, cron, cache flushing, multisite, and scripting/automation with wp-cli.yml.
wp-rest-api
Use when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument validation, permission_callback/authentication, response shaping, register_rest_field/register_meta, or exposing CPTs/taxonomies via show_in_rest.
wp-project-triage
Use when you need a deterministic inspection of a WordPress repository (plugin/theme/block theme/WP core/Gutenberg/full site) including tooling/tests/version hints, and a structured JSON report to guide workflows and guardrails.