prisma-cli

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

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/vasuguptadot-jpg/Life-xp- --skill prisma-cli-vasuguptadot-jpg
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/vasuguptadot-jpg/Life-xp-/tree/main/attached_assets/LifeXP-Complete/apps/api/.agents/skills/prisma-cli
Command: npx skills add https://github.com/vasuguptadot-jpg/Life-xp- --skill prisma-cli-vasuguptadot-jpg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, up-to-date guidance on CLI commands for project setup, schema migrations, client generation, and database operations, without digging through scattered documentation. ## Core Features & Use Cases - Command Reference: Covers the full Prisma CLI surface including init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, and mcp. - Migration Workflows: Detailed guidance on development migrations (migrate dev), production deployments (migrate deploy), drift detection, baselining, and failure recovery with migrate resolve. - Use Case: When setting up a new project, follow the init reference to bootstrap prisma.config.ts, start a local Prisma Postgres with prisma dev, then run migrate dev and generate to get a working typed client. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration and then regenerate the Prisma Client.

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 in development?▼

Run prisma migrate dev --name your_migration_name to generate and apply a migration from schema changes. It uses a shadow database for drift detection, and you should run prisma generate afterward to refresh the client output.

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

db push syncs the schema directly without creating migration files or tracking history, making it ideal for prototyping and MongoDB. migrate dev creates versioned migration files with rollback capability, suited for team development and production paths.

How do I run Prisma migrations in production or CI/CD?▼

Use prisma migrate deploy, which applies pending migrations without prompts, drift detection, or a shadow database. Check prisma migrate status first, and never run migrate dev in production environments.

Does Prisma CLI work with the Bun runtime?▼

Yes, but you must add the --bun flag, for example bunx --bun prisma generate. Without it, the CLI falls back to Node.js because of its shebang, which can cause runtime mismatches in Bun projects.

How do I fix a failed Prisma migration in production?▼

Resolve the underlying issue, then run prisma migrate resolve --rolled-back <migration_name> to mark it as failed, or --applied to baseline it. After resolving, re-run prisma migrate deploy to continue applying migrations.

When should I not use prisma db push?▼

Avoid db push in production, in team environments needing trackable changes, and whenever rollback capability matters, since it creates no migration history. Use migrate dev and migrate deploy for those scenarios instead.