prisma

Automate Prisma schema changes, migrations, and client type regeneration across apps.

1.8k|375|Updated Jan 15, 2025
One-click install
npx skills add https://github.com/trycompai/comp --skill prisma-trycompai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma
Source: https://github.com/trycompai/comp/tree/main/.agents/skills/prisma
Command: npx skills add https://github.com/trycompai/comp --skill prisma-trycompai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prisma schema changes, migrations, and type regeneration across multiple apps are coordinated to keep your data layer consistent and up to date.

Core Features & Use Cases

  • Migration workflow: Edit schema in packages/db/prisma/schema/, create migrations, and propagate changes to dependent apps.
  • Type regeneration: Regenerate Prisma client types across apps to ensure type-safety.
  • Best practices: Enforce prefixed CUID IDs with generate_prefixed_cuid patterns and consistent schema organization.

Quick Start

Update your Prisma schema in packages/db/prisma/schema, create migrations, and regenerate types across apps using the standard migration workflow.

Frequently Asked Questions about prisma

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

FAQPage Schema
How do I automate Prisma schema migrations across multiple apps?

Automating Prisma schema migrations involves editing schemas in packages/db, running bunx prisma migrate dev, and regenerating client types across affected apps to maintain data layer consistency.

What is the best way to keep Prisma client types consistent after a schema update?

Keeping Prisma client types consistent requires regenerating types across all affected apps after updating the schema in packages/db to ensure end-to-end type-safety.

Does this Prisma migration workflow support monorepo architectures?

This Prisma migration workflow supports monorepo architectures by propagating schema edits from packages/db to dependent apps like apps/app, apps/api, and apps/portal.

How do I enforce consistent CUID IDs in Prisma schema designs?

Enforcing consistent CUID IDs in Prisma schemas uses generate_prefixed_cuid patterns to maintain standardized, prefixed identifiers across the database structure.

Why do I need to run bunx prisma migrate dev for schema changes?

Running bunx prisma migrate dev is required to create migrations from schema changes and trigger the regeneration of client types across all affected apps in the workflow.

What are the limitations of manually editing Prisma schemas without type regeneration?

Manually editing Prisma schemas without type regeneration breaks type-safety across dependent apps because the generated Prisma client types remain outdated and misaligned with the new schema.