prisma-cli

Reference Prisma ORM CLI commands for migrations, client generation, and database management.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/son1cleo/databrief --skill prisma-cli-son1cleo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/son1cleo/databrief/tree/main/frontend/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/son1cleo/databrief --skill prisma-cli-son1cleo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM often need to recall exact CLI command syntax, flags, and workflows for tasks like running migrations, generating the client, or seeding databases. This Skill provides an authoritative command reference so you get the right command and options without searching documentation. ## Core Features & Use Cases - Full CLI Command Coverage: Documents init, generate, migrate (dev, deploy, reset, status, diff, resolve), db (pull, push, seed, execute), dev, studio, validate, format, debug, and mcp commands with options and examples. - Workflow Guidance: Explains when to use db push versus migrate dev, production deployment with migrate deploy, and recovery from failed migrations with migrate resolve. - Use Case: You are setting up a new Next.js project with Postgres and need to initialize Prisma, create your first migration, generate the client, and seed test data — this Skill walks you through each command in the correct order. ## Quick Start Ask the assistant to show you how to create and apply a new Prisma migration for a schema change in your project.

Frequently Asked Questions about prisma-cli

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

FAQPage Schema
How do I create and apply a Prisma migration?

Run prisma migrate dev --name your_migration_name during development to create and apply a migration from your schema changes. For production, commit the migration files and run prisma migrate deploy, which applies pending migrations without prompts.

What is the difference between prisma db push and migrate dev?

db push syncs your schema directly to the database without creating migration files or tracking history, making it faster for prototyping. migrate dev creates versioned migration files with drift detection and rollback capability, which is better for team collaboration and production paths.

How do I fix a failed Prisma migration in production?

First resolve the underlying issue such as fixing the SQL or database state. Then run prisma migrate resolve --rolled-back <migration_name> to mark it as rolled back, and re-run prisma migrate deploy to apply it again.

Does prisma migrate dev automatically run generate and seed?

In current Prisma versions you should run prisma generate and prisma db seed explicitly after migrate dev when you need refreshed client output or seed data. Configure the seed command under migrations.seed in prisma.config.ts.

Can I use Prisma CLI with Bun instead of Node.js?

Yes, but always add the --bun flag via bunx, for example bunx --bun prisma generate. Without it, the CLI falls back to Node.js because of its shebang.

When should I not use prisma db push?

Avoid db push in production, in team environments needing trackable changes, and whenever you need rollback capability. Use migrate dev and migrate deploy instead, since db push creates no migration history.