prisma-cli

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

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/Sambhav242005/Major-Project --skill prisma-cli-sambhav242005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/Sambhav242005/Major-Project/tree/main/apps/web/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/Sambhav242005/Major-Project --skill prisma-cli-sambhav242005

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 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 resolution 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 asked to add a new field to a production-backed schema, the skill guides creating a named migration with prisma migrate dev, regenerating the client, and deploying with prisma migrate deploy in CI. ## Quick Start Ask the assistant to create and apply a new Prisma migration named add_users_table 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?

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

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

prisma db push syncs the schema directly without creating migration files or tracking history, making it suited for prototyping and MongoDB. prisma migrate dev creates versioned migration files with drift detection, which is required for team collaboration and production deployments.

How do I run Prisma CLI with Bun?

Use bunx --bun before Prisma commands, such as bunx --bun prisma init or bunx --bun prisma generate. Without the --bun flag, the CLI falls back to Node.js because of its shebang.

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

Prisma detects AI-agent environments and blocks destructive commands like migrate reset and db push --force-reset until the user gives explicit consent. The agent must explain the data-loss impact, obtain consent immediately before running, and pass the exact consent text via PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION.

Does prisma migrate dev automatically regenerate the client and seed data?

No. In current Prisma versions you must run prisma generate explicitly after schema-changing commands to refresh client output, and run prisma db seed explicitly when you need seed data after migrate dev or migrate reset.

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 instead for those scenarios.