prisma-sqlite-expert

Guide Prisma ORM schema design and operations for SQLite databases.

37|6|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/carrotwaxr/peek-stash-browser --skill prisma-sqlite-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-sqlite-expert
Source: https://github.com/carrotwaxr/peek-stash-browser/tree/main/.claude/skills/prisma-sqlite-expert
Command: npx skills add https://github.com/carrotwaxr/peek-stash-browser --skill prisma-sqlite-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides authoritative, production-oriented guidance to avoid common pitfalls when using Prisma with SQLite, including unsafe default PRAGMA settings, migration drift with FTS virtual tables, write contention, and inefficient query patterns that lead to full-table scans or SQLITE_BUSY errors.

Core Features & Use Cases

  • Expert recommendations for connection PRAGMA configuration to improve concurrency and reliability.
  • Schema design patterns, indexing rules, and migration workflows (including manual migrations for FTS5 and the copy-table pattern).
  • Query optimization, transaction strategies, FTS5 setup and triggers, backup and WAL checkpoint guidance, and BigInt/JSON serialization best practices.
  • Use case: convert a development Prisma schema into a production-safe SQLite deployment with FTS-backed search, reliable migrations, and monitoring procedures.

Quick Start

Use the prisma-sqlite-expert skill to audit a Prisma schema, recommend production PRAGMA settings, and outline a safe migration plan to add FTS5 and required triggers.

Frequently Asked Questions about prisma-sqlite-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Prisma with SQLite for production to avoid write contention?

Configuring Prisma with SQLite for production requires setting connection PRAGMAs like WAL mode to improve concurrency. This prevents write contention and SQLITE_BUSY errors under load.

Why does my Prisma migration drift when using SQLite FTS5 virtual tables?

SQLite FTS5 virtual tables cause migration drift because Prisma cannot natively manage them. You must use manual migration SQL and the copy-table pattern to safely synchronize your schema.

What's the best way to set up FTS5 full-text search in a Prisma SQLite schema?

The best way to set up FTS5 full-text search is by writing manual migration SQL to create virtual tables and triggers. This ensures your Prisma schema safely supports search functionality.

How do I optimize Prisma queries against SQLite to prevent full-table scans?

To optimize Prisma queries against SQLite, apply specific schema indexing rules and query optimization patterns. This prevents inefficient full-table scans and improves database performance.

Does Prisma support safe BigInt and JSON serialization with SQLite?

Yes, Prisma supports SQLite BigInt and JSON handling, but you must follow specific serialization best practices to ensure data integrity. This prevents type conversion errors during operations.

When should I run WAL checkpoints for a SQLite database managed by Prisma?

You should run SQLite WAL checkpoints as part of your production maintenance routine to manage transaction logs. This ensures reliable backups and prevents database file bloat.