prisma-cli

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

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/mousetailor/doker_and_cd_pipeline --skill prisma-cli-mousetailor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/mousetailor/doker_and_cd_pipeline/tree/main/packages/db/.agents/skills/prisma-cli
Command: npx skills add https://github.com/mousetailor/doker_and_cd_pipeline --skill prisma-cli-mousetailor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, current guidance on CLI commands for project setup, schema migrations, client generation, and database management, including safe handling of destructive operations. ## Core Features & Use Cases - Command Reference: Covers init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, complete, and mcp with options and examples. - Migration Workflows: Distinguishes development workflows (migrate dev) from production deployments (migrate deploy) with drift detection and recovery guidance. - AI Safety Checkpoint: Enforces explicit user consent before destructive commands like migrate reset or db push --force-reset when an AI agent is detected. - Use Case: When setting up a new project, follow the init reference to create prisma.config.ts, start a local database with prisma dev, then run migrate dev and generate to get a working Prisma 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 create 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.

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

db push syncs the schema directly without creating migration files, making it faster for prototyping and required for MongoDB. migrate dev creates tracked migration files with history and rollback capability, suited for team development.

How do I apply Prisma migrations in production?

Use prisma migrate deploy in production or CI/CD pipelines. It applies pending migrations without prompts, drift detection, or a shadow database, and never use migrate dev in production environments.

Why is prisma migrate reset blocked when an AI agent runs it?

Prisma detects AI agent environments and blocks destructive commands like migrate reset until the user gives explicit consent. The agent must explain the data-loss impact and obtain consent immediately before running the command.

Does Prisma CLI work with 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 the CLI shebang.

When should I not use prisma db push?

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