What problem does it solve?
This Skill resolves Prisma ORM schema errors caused by circular relations between models, which block Prisma Client generation and database schema pushes, wasting developer time debugging ambiguous error messages.
Core Features & Use Cases
- Common Error Diagnosis: Identifies and explains the two most frequent causes of Prisma circular relation errors: direct multi-model links that bypass intermediate session models, and bidirectional relations missing explicit field declarations.
- Corrected Schema Examples: Provides side-by-side incorrect and correct Prisma schema snippets for common misconfigurations, such as improper User to ChatMessage direct relations.
- Use Case: If you are building a chat application with User, ChatSession, and ChatMessage models and encounter a "relation would create a cycle" error when running bun prisma generate, this Skill guides you to restructure your relations to follow Prisma's best practices.
Quick Start
Use the prisma-circular-relation-debug skill to fix the circular relation error you are encountering when generating your Prisma Client for your chat app schema.