database-modeling

Official

Ensure robust Prisma schemas for data integrity

AuthorFivents
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides guidance and validation rules to design Prisma and PostgreSQL schemas that maintain relational integrity, prevent duplicate or inconsistent records, and improve query performance in production systems.

Core Features & Use Cases

  • Constraint Enforcement: Define and validate unique constraints, composite keys, and foreign keys to prevent inconsistent data (e.g., unique(email, organizationId) on Person and unique(personId, eventId) on EventParticipant).
  • Soft Delete Conventions: Standardize deletedAt handling across models and highlight anti-patterns such as ignoring soft delete in queries.
  • Indexing & Performance: Recommend indexes for frequently queried fields and patterns to avoid full-table scans.
  • Use Case: Review and harden the schema for an event-management backend to ensure participant lookups and multi-tenant person records remain correct and performant.

Quick Start

Validate the Prisma schema to enforce composite unique keys for person and event participant, add soft-delete handling, and create indexes for common query fields.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: database-modeling
Download link: https://github.com/Fivents/one-id/archive/main.zip#database-modeling

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.