prisma-expert

Diagnose Prisma schema, migration, and query performance issues.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prisma schema design, migrations, and query performance issues often cause runtime errors, slow endpoints, or broken deployments when relations, indexing, or migration workflows are incorrect.

Core Features & Use Cases

  • Schema design and validation to diagnose relation mistakes, type mismatches, enum drift, and missing indexes, then recommend minimal-to-complete fixes.
  • Migration safety and troubleshooting to inspect migration status, resolve conflicts, and deploy changes safely using Prisma Migrate best practices.
  • Query optimization and connection/transaction guidance to prevent N+1 patterns, reduce over-fetching, handle pooling issues, and structure transactions to avoid deadlocks and contention.

Example use case: your REST API endpoint using Prisma is slow and intermittently failing after a schema change—use this skill to validate the schema, inspect migrations, and refactor queries and indexes to restore stable performance.

Quick Start

Ask the AI: "I’m getting errors or slow performance with Prisma—validate my prisma/schema.prisma, check migrations, and propose the minimal schema and query changes to fix relations, indexing, and any transaction issues."

Frequently Asked Questions about prisma-expert

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

FAQPage Schema
How do I fix slow Prisma queries and N+1 issues in my API endpoints?

Fix slow Prisma queries by refactoring N+1 patterns using select and include to optimize data fetching. This reduces over-fetching and restores endpoint performance by restructuring relation loads and adding missing indexes.

How do I resolve Prisma migration failures and deploy schema changes safely?

Resolve Prisma migration failures by inspecting migration status and diagnosing conflicts using Prisma Migrate best practices. This ensures safe deployments by validating schema changes and applying minimal fixes before executing migrations.

Why does my Prisma schema throw relation errors after updating models?

Prisma relation errors occur due to schema design mistakes, type mismatches, or enum drift. Validate your prisma/schema.prisma file to diagnose relation mistakes and apply minimal-to-complete schema fixes to resolve runtime errors.

How do I prevent deadlocks and contention when using Prisma transactions?

Prevent deadlocks in Prisma transactions by structuring transaction guidance to avoid contention and handle connection pooling issues. This ensures stable database operations by optimizing connection behavior and transaction execution order.

Does this Prisma optimization approach work with PostgreSQL, MySQL, and SQLite?

Yes, Prisma query optimization and schema validation apply to PostgreSQL, MySQL, and SQLite relational databases. This covers debugging runtime relation errors, migration failures, and connection behavior across all three supported database platforms.

What is the best way to diagnose missing indexes and enum drift in a Prisma schema?

Diagnose missing indexes and enum drift through schema validation that inspects your Prisma schema for type mismatches and indexing gaps. This identifies performance bottlenecks and recommends minimal schema changes to restore stability.