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/samu412/Development_kisan_basket --skill prisma-cli-samu412
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/samu412/Development_kisan_basket/tree/main/category_kisan_basket/.agents/skills/prisma-cli
Command: npx skills add https://github.com/samu412/Development_kisan_basket --skill prisma-cli-samu412

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 operations, and this Skill provides a structured command reference that prevents misuse of destructive commands and confusion with the separate Prisma Platform CLI. ## 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. - 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 SQLite and generate 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. Afterwards, run prisma generate explicitly 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 the schema directly without creating migration files or tracking history, making it suited for prototyping and MongoDB. migrate dev creates versioned migration files with drift detection 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 to apply pending migrations without prompts or a shadow database. Check prisma migrate status first, and never run migrate dev in production.

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

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 and obtain consent immediately before running the command.

Does Prisma CLI work with the Bun runtime?

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.

How do I introspect an existing database into a Prisma schema?

Run prisma db pull after configuring the datasource URL in prisma.config.ts to generate Prisma models from existing tables. Use --print to preview the schema before overwriting, then run prisma generate.