prisma-cli

Document Prisma CLI commands for setup, migrations, and database operations.

41|6|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/mralexsaavedra/spotiarr --skill prisma-cli-mralexsaavedra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/mralexsaavedra/spotiarr/tree/main/skills/prisma-cli
Command: npx skills add https://github.com/mralexsaavedra/spotiarr --skill prisma-cli-mralexsaavedra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Users get stuck figuring out the exact Prisma CLI command, the right options, and the correct workflow for setup, migrations, database operations, and tooling.

Core Features & Use Cases

  • Command reference for Prisma CLI: Quickly find how to run each command and what options mean, for example when you need to initialize a project, generate Prisma Client, or apply migrations.
  • Workflow guidance by scenario: Covers common development and production patterns such as prisma init, prisma migrate dev/deploy, and following up with prisma generate and prisma db seed.
  • Operational details for debugging and tooling: Includes practical instructions for introspection (prisma db pull), schema sync (prisma db push), resets (prisma migrate reset), and recovery (prisma migrate resolve).

Quick Start

Use the prisma-cli skill to generate a precise command plan for getting from your Prisma schema to a working database by running the relevant Prisma CLI commands for initialization, migrations, and client generation.

Frequently Asked Questions about prisma-cli

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

FAQPage Schema
How do I run Prisma migrations and generate the client correctly?

To run Prisma migrations and generate the client, apply schema changes using `prisma migrate dev` or `prisma migrate deploy`, then execute `prisma generate` to synchronize your database schema and client types.

What is the best way to synchronize my Prisma schema with an existing database?

The best way to synchronize a Prisma schema with an existing database is using `prisma db pull` for introspection to extract the current schema, or `prisma db push` to apply schema changes directly without creating migration history, ideal for rapid prototyping.

How do I fix Prisma migration drift or reset my database state?

To fix Prisma migration drift or reset database state, use `prisma migrate reset` to drop and recreate the database from scratch, or apply `prisma migrate resolve` to mark failed migrations as rolled back or applied, recovering your workflow without manual SQL intervention.

Can I execute raw SQL or seed my database using Prisma CLI commands?

Yes, you can execute raw SQL and seed your database using Prisma CLI commands. The CLI supports raw SQL execution for direct database operations and provides `prisma db seed` to populate your database with initial data based on your seed script configuration.

When should I use prisma db push instead of prisma migrate dev?

You should use `prisma db push` instead of `prisma migrate dev` when you need to quickly synchronize schema changes during prototyping without generating migration files. Use `migrate dev` for production-like environments requiring versioned migration history and drift checking.

Does Prisma CLI support debugging and MCP commands for the 7.x version?

Yes, Prisma CLI supports debugging and MCP commands for the 7.x version. The command reference covers operational details for tooling, including introspection, schema synchronization, resets, recovery workflows, and Prisma MCP integration for advanced database operations.