What problem does it solve?
Prisma schema design often suffers from inconsistent conventions, making maintenance harder and increasing the risk of runtime errors.
This Skill codifies naming, modeling, and indexing standards to improve reliability when modifying schema.prisma.
Core Features & Use Cases
- Naming conventions: Tables use TitleCase, columns use camelCase, models are singular, and avoid GraphQL built-in type names as table names.
- Relations & structure: Standard model structure includes id, createdAt, updatedAt, plus userId/orgId relations with proper cascade behavior and @unique where applicable.
- Indexing and enums: Guidance on adding indexes for foreign keys and status fields, and using the EntityNameStatus pattern with @default for initial values.
- Use Case: When evolving a Prisma schema in PostgreSQL, apply these rules to ensure consistency across all models and migrations.
Quick Start
Review these Prisma rules before modifying schema.prisma to ensure consistency.