prisma-cli

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

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/team-zerolatency/cfta --skill prisma-cli-team-zerolatency
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/team-zerolatency/cfta/tree/main/packages/database/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/team-zerolatency/cfta --skill prisma-cli-team-zerolatency

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 like init, generate, migrate, and db push, including correct flags, follow-up steps, and safety rules for destructive operations. ## Core Features & Use Cases - Command Reference: Covers the full Prisma ORM CLI surface including init, generate, migrate dev/deploy/reset/status/diff/resolve, db pull/push/seed/execute, dev, studio, validate, format, debug, complete, and mcp. - 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 guidance to run prisma init, configure prisma.config.ts, start a local database with prisma dev, apply migrations with prisma migrate dev, and generate the client with prisma generate. ## 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 with an optional --name flag 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 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, which applies pending migrations without prompts or a shadow database, making it safe for CI/CD pipelines. Run prisma migrate status first to verify the database state.

Why is prisma migrate reset blocked when run by an AI agent?▼

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 pass the exact consent text via PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION.

Does prisma generate run automatically after migrations?▼

No, in current Prisma versions you must run prisma generate explicitly after migrate dev, db push, or other schema syncs when you need refreshed client output. The same applies to prisma db seed after migrations.

Can I use the Prisma CLI with Bun?▼

Yes, but always add the --bun flag, for example bunx --bun prisma generate, so Prisma runs with the Bun runtime instead of falling back to Node.js due to the CLI shebang.