prisma-cli

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

Updated Jul 21, 2026
One-click install
npx skills add https://github.com/8ReTid8/vitural_reality_test --skill prisma-cli-8retid8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/8ReTid8/vitural_reality_test/tree/main/my-app/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/8ReTid8/vitural_reality_test --skill prisma-cli-8retid8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM often struggle to remember the exact CLI commands, flags, and workflows for tasks like running migrations, generating the client, or seeding databases. This Skill provides a structured, up-to-date reference for the entire Prisma CLI surface so you get the right command with the right options every time. ## Core Features & Use Cases - Complete Command Reference: Covers init, generate, migrate (dev, deploy, reset, status, diff, resolve), db (pull, push, seed, execute), dev, studio, validate, format, debug, and mcp with detailed per-command documentation. - 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 with migrate resolve. - Current Configuration Patterns: Documents the prisma.config.ts setup, Bun runtime flags, and explicit follow-up steps like running prisma generate and prisma db seed after migrations. - Use Case: You are setting up a new project and need to initialize Prisma, create your first migration, generate the client, and seed the database. This Skill walks you through each command in the correct order with the right flags. ## 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. This creates a migration file in prisma/migrations and applies it to your database. Follow up with prisma generate to refresh the client and prisma db seed if you need seed data.

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

db push syncs your schema directly without creating migration files, making it faster for prototyping and the only option for MongoDB. migrate dev creates tracked migration files with history and rollback capability, which is required for team collaboration and production workflows.

How do I run Prisma migrations in production?

Use prisma migrate deploy in production, staging, and CI/CD pipelines. It applies pending migrations without prompts, drift detection, or a shadow database. Never use migrate dev in production since it can prompt for resets and cause data loss.

Does Prisma CLI work with Bun runtime?

Yes, but you must add the --bun flag so Prisma runs with the Bun runtime instead of falling back to Node.js due to the CLI shebang. Use bunx --bun prisma init and bunx --bun prisma generate for all commands.

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, or --applied if it actually succeeded. Re-run prisma migrate deploy afterward.

When should I not use this Prisma CLI skill?

Do not use it for Prisma Compute app deployment tasks like @prisma/cli app deploy, compute:deploy, or managing Compute apps, logs, and domains. Those workflows belong to the separate prisma-compute skill.