Help us improve
Share bugs, ideas, or general feedback.
From opinionated-prisma
Overview and prerequisites for Prisma ORM + PostgreSQL patterns. Use when first setting up a database, establishing ID strategy, or needing guidance on which specific skill to use. Triggers on "prisma", "database", "postgresql", "postgres".
npx claudepluginhub esot321c/opinionated-prismaHow this skill is triggered — by the user, by Claude, or both
Slash command
/opinionated-prisma:opinionated-prismaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Opinionated patterns for building with Prisma on self-hosted PostgreSQL. This plugin
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Builds scalable data pipelines, modern data warehouses, and real-time streaming architectures using Apache Spark, dbt, Airflow, and cloud-native platforms.
Share bugs, ideas, or general feedback.
Opinionated patterns for building with Prisma on self-hosted PostgreSQL. This plugin provides separate skills for each concern — use the one that matches your current task.
| Skill | Use When |
|---|---|
schema-design | Designing models, choosing field types, naming conventions, primary keys, enums, soft delete |
indexing | Adding indexes, diagnosing slow queries, N+1 problems, partial/expression/GiST/BRIN indexes |
migration-safety | Planning or running prisma migrate, adding columns to large tables, constraint changes |
transactions | Writing transactions, bulk creates, bulk upserts, choosing interactive vs sequential |
raw-sql-boundary | Deciding whether to use $queryRaw, window functions, CTEs, full-text search, JSONB operators |
Invoke the specific skill via the Skill tool when the task narrows to one of these areas.
This plugin assumes UUID v7 as the default primary key strategy. This requires the
pg_uuidv7 extension.
Add to your Postgres initialization:
-- init.sql
CREATE EXTENSION IF NOT EXISTS "pg_uuidv7";
For Docker Compose, mount an init script:
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
Then in Prisma schemas, use:
id String @id @default(dbgenerated("uuid_generate_v7()")) @db.Uuid
If you are on managed Postgres that does not support pg_uuidv7, fall back to
gen_random_uuid() (v4) and accept the index locality tradeoff. Do not use CUID
or ULID as a workaround.
When first working with a project's database:
prisma.schema (or schema.prisma) and docker-compose.ymlpg_uuidv7 is already configured, follow UUID v7 patterns throughoutpg_uuidv7 is missing, add it and note the change