# Configure Prisma for Your Database

Prisma setup varies by database provider and major version. This skill provides provider-specific schemas, connection guidance, adapters, client generation, and troubleshooting steps.

## Install

```bash
npx skillstore add prisma/prisma-database-setup
```

## Metadata

- Status: approved
- Slug: prisma-prisma-database-setup
- Version: 7.6.0
- Author version: 7.6.0
- Skillstore revision: r2
- Version status: valid
- Tree hash: 4ddcb6c640908f949d993edd1b7abd13a8d356bb9cc3011fd590da2306a40076
- Author: prisma
- GitHub username: prisma
- License: MIT
- Repository: https://github.com/prisma/skills/tree/1a9f427e9fe2137298abbcc1a6f372db92e8c40d/prisma-database-setup
- Ref: ebdfe608f5de2b66ff37ab4af12af8ac4f5e8006
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: filesystem, env\_access, external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/prisma-prisma-database-setup
- Manifest: https://skillstore.pages.dev/api/skills/prisma-prisma-database-setup/manifest

## Capabilities

- Configures Prisma schemas for PostgreSQL, MySQL, SQLite, MongoDB, SQL Server, CockroachDB, and Prisma Postgres.
- Explains Prisma 7 SQL configuration through prisma.config.ts and database-specific driver adapters.
- Keeps MongoDB projects on the supported Prisma 6 workflow.
- Shows environment variable and connection string formats using placeholder values.
- Guides Prisma Client installation, generation, imports, and single-instance reuse.
- Troubleshoots provider-specific connection, schema, ID, and compatibility issues.

## Use Cases

- Start a SQL project: Configure a new Prisma project with the correct provider, adapter, connection variables, and generated client.
- Build with local SQLite: Create a lightweight local database setup and understand SQLite paths, adapters, and feature limits.
- Standardize database configuration: Compare provider requirements before changing databases or deploying Prisma across runtime environments.

## Prompt Templates

### Initialize Prisma

```
Configure Prisma for {database} in my {runtime} project. Show required packages, schema settings, environment variables, client generation, and a basic client instance.
```

### Add the correct adapter

```
Review my Prisma {database} setup for {runtime}. Identify the required driver adapter, packages, generated client import, and connection settings.
```

### Switch database providers

```
Move this Prisma project from {current_database} to {target_database}. Review the schema and configuration, then list required changes and compatibility concerns.
```

### Diagnose deployment connections

```
Diagnose this Prisma connection issue for {database} on {runtime}: {error_message}. Check URL format, adapter choice, pooling, environment values, and provider settings.
```

## Limitations

- Provides guidance but does not verify that your database server is available.
- Uses placeholder credentials that must be replaced with secure values.
- Does not cover production migration planning, backups, or disaster recovery.
- MongoDB guidance targets Prisma 6 because the documented Prisma 7 SQL workflow does not apply.

## Best Practices

- Keep real database credentials outside source control and use separate values for each environment.
- Confirm the Prisma major version and database provider before applying adapter guidance.
- Regenerate Prisma Client after every schema change and reuse one client instance per process.

## Anti Patterns

- Do not copy SQL driver adapter instructions into a MongoDB project.
- Do not commit environment files or real connection strings.
- Do not run production migrations without backups, review, and an approved deployment plan.

## Security Audit

- Audited at: 2026-07-23T17:40:38.636\+00:00
- Summary: The skill contains documentation and examples for Prisma configuration. The flagged paths, environment variables, credentials, and backticks are fixed examples with no prompt injection, secret exfiltration, or executable audit payload.

## Stats

- Views: 0
- Downloads: 6
- Favorites: 0
- Popularity score: 0
