prisma-cli

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

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/NarixHine/uni-chem --skill prisma-cli-narixhine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/NarixHine/uni-chem/tree/main/.agents/skills/prisma-cli
Command: npx skills add https://github.com/NarixHine/uni-chem --skill prisma-cli-narixhine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM often struggle to remember the correct CLI commands, flags, and workflows for tasks like running migrations, generating the client, or seeding databases, especially with behavior changes in current Prisma releases. ## Core Features & Use Cases - Complete Command Reference: Covers init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, and mcp with options and examples. - Workflow Guidance: Explains when to use db push versus migrate dev, how to handle production deployments with migrate deploy, and how to recover from failed migrations. - Use Case: You are setting up a new project with Bun and Postgres. Use this Skill to initialize Prisma with the correct config, start a local Prisma Postgres instance, create your first migration, and generate the client without guessing flags. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration and then generate the client for 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 to create and apply a migration during development. Afterwards, run prisma generate explicitly to refresh the client and prisma db seed if you need seed data.

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

db push syncs the schema directly without creating migration files, making it faster for prototyping. migrate dev creates tracked migration files with history and rollback capability, which is better for team collaboration and production paths.

How do I run Prisma CLI with Bun?▼

Use bunx --bun before the command, for example bunx --bun prisma generate. Without the --bun flag, the CLI falls back to Node.js because of its shebang.

Does prisma migrate dev automatically generate the client?▼

In current Prisma 7.x behavior, you should run prisma generate explicitly after migrate dev when you need refreshed client output. The same applies to running prisma db seed explicitly after migrations or resets.

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 rolled back, and re-run prisma migrate deploy. Use migrate status first to inspect the current state.

When should I not use prisma db push?▼

Avoid db push in production, in team environments needing trackable changes, and when you need rollback capability. Use migrate dev and migrate deploy instead for those scenarios.