prisma

Enforce consistent Prisma schema conventions for PostgreSQL projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/flesler/dotfiles --skill prisma-flesler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma
Source: https://github.com/flesler/dotfiles/tree/main/home/.cursor/skills/prisma
Command: npx skills add https://github.com/flesler/dotfiles --skill prisma-flesler

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about prisma

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the standard naming conventions for a Prisma schema in PostgreSQL?

Standard Prisma schema conventions require TitleCase for table names, camelCase for columns, and singular model names to ensure consistency and reduce maintenance risks across PostgreSQL projects.

How do I structure relations and cascades in a Prisma schema?

Prisma relations should include standard id, createdAt, and updatedAt fields, plus userId or orgId relations with proper onDelete cascade behavior and @unique constraints where applicable to maintain referential integrity.

When should I add indexes and enums to my Prisma models?

Add Prisma indexes for foreign keys and status fields to optimize queries, and use the EntityNameStatus enum pattern with @default to automatically set initial status values for new records.

Can I use GraphQL built-in type names as Prisma model names?

No, you should avoid GraphQL built-in type names as Prisma table names to prevent conflicts and ensure safe schema modifications across models, relations, enums, and indexing in Prisma v2 workflows.

How do I enforce consistent Prisma schema changes before migration?

Review established Prisma rules for structural and naming constraints before modifying schema.prisma to enforce consistency across all models, relations, enums, and indexing during PostgreSQL migrations.

What is the best way to define default statuses for Prisma models?

The best way to define default statuses in a Prisma schema is using the EntityNameStatus enum pattern combined with the @default attribute to automatically assign initial values to new database records.