prisma-cli

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

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-cli-shofikul-isl4m
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/Shofikul-Isl4m/trading-app/tree/main/packages/db/.agents/skills/prisma-cli
Command: npx skills add https://github.com/Shofikul-Isl4m/trading-app --skill prisma-cli-shofikul-isl4m

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, and this Skill provides that reference directly in the AI workflow. ## Core Features & Use Cases - Command Reference: Covers the full Prisma ORM CLI surface including init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, complete, and mcp. - Migration Workflows: Distinguishes development migrations (migrate dev) from production deployments (migrate deploy), including drift detection, baselining, and recovery with migrate resolve. - 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, ask the agent to initialize Prisma with PostgreSQL, create the first migration, generate the client, and seed the database using the correct current command sequence. ## Quick Start Ask the agent to initialize a new Prisma project with PostgreSQL and create the first migration using the prisma-cli reference.

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 Prisma migrations 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 explicitly afterward when you need refreshed client output.

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

db push syncs the schema directly without creating migration files or history, making it suited for prototyping and MongoDB. migrate dev creates tracked migration files with rollback capability and is the correct choice for team development and production-bound changes.

How do I apply Prisma migrations in production?

Use prisma migrate deploy in CI/CD or production environments to apply pending migrations from the prisma/migrations directory. It never creates migrations, prompts, or resets data, and you should run prisma migrate status first to verify state.

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 CLI work with Bun?

Yes, but you must run it with bunx --bun so Prisma uses the Bun runtime instead of falling back to Node.js due to the CLI shebang. This applies to commands like bunx --bun prisma init and bunx --bun prisma generate.

When should I use prisma db pull?

Use db pull to introspect an existing database and update your Prisma schema to match its structure, such as when adopting Prisma on a legacy database. Use --print to preview first, since pulling overwrites the schema file and any manual customizations.