prisma-schema

Create multi-schema Prisma schema files with conventional column mappings.

4|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/widnyana/eyay-toolkits --skill prisma-schema-widnyana
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-schema
Source: https://github.com/widnyana/eyay-toolkits/tree/main/plugins/ts-backend-dev/skills/prisma-schema
Command: npx skills add https://github.com/widnyana/eyay-toolkits --skill prisma-schema-widnyana

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing Prisma schemas that work across multiple database schemas is error-prone, and teams often end up with inconsistent naming, wrong field types (especially for money), broken relations, and migrations that don’t match real query patterns.

Core Features & Use Cases

  • Multi-schema modeling by default: Defines schemas in the datasource and applies @@schema("...") to every model/enum to keep domains separated and portable.
  • Production-grade conventions: Enforces PascalCase models, camelCase fields, snake_case DB columns via @map, and consistent timestamp/soft-delete patterns.
  • Safe relational and indexing patterns: Supports cross-schema relations, disambiguates same table names with unique model names + @@map, and recommends indexes based on actual access patterns.
  • High-precision decimals for money: Uses Decimal @db.Decimal(36, 18) to prevent precision loss from Float for financial/crypto values.

Quick Start

Ask: Create a multi-schema Prisma schema for a billing and inventory domain with UUID primary keys, soft deletes, precise Decimal money fields, cross-schema relations, and the needed indexes for common queries.

Frequently Asked Questions about prisma-schema

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

FAQPage Schema
How do I model relations across multiple database schemas in Prisma?

To model cross-schema relations in Prisma, define schemas in the datasource block and apply @@schema("...") to every model and enum, ensuring relations map correctly across domains with valid indexes.

What is the best way to handle financial fields in a Prisma schema?

The best way to handle financial fields in a Prisma schema is using Decimal @db.Decimal(36, 18), preventing precision loss that occurs when using Float for crypto or monetary values.

How do I map camelCase fields to snake_case columns in Prisma?

You map camelCase fields to snake_case database columns in Prisma using the @map attribute, ensuring consistent database naming conventions alongside PascalCase model definitions.

Does Prisma support soft deletes and consistent timestamp patterns?

Prisma supports soft deletes and timestamp patterns by enforcing consistent id, createdAt, updatedAt, and deletedAt fields within your schema models for reliable data tracking.

How do I generate validation and migration commands after modifying a Prisma schema?

After modifying a Prisma schema, generate validation and migration commands by applying schema changes and executing the target database migration tools to validate formats and sync structures.

Why does Prisma migration fail with duplicate table names across schemas?

Prisma migration can fail with duplicate table names across schemas if models lack unique names and the @@map attribute, which are required to disambiguate identical table names in multi-schema setups.