drizzle-sqlite
Installation
SKILL.md
dot-skills Drizzle SQLite Best Practices
Library-reference skill for Drizzle ORM with SQLite-family backends. 45 rules across 8 categories, ordered by execution-lifecycle impact: schema → migrations → query → relations → transactions → performance → connection → types.
When to Apply
Reference these guidelines when:
- Defining
sqliteTableschemas — choosing column types, primary keys, indexes, foreign keys - Running
drizzle-kit generate/migrate/push, or hand-editing a migration SQL file - Writing queries with
db.select(),db.insert(),db.update(),db.delete() - Reaching for nested data with
db.query.*and the relational query builder - Wrapping multi-statement writes in
db.transaction()ordb.batch()(libsql/Turso/D1) - Optimizing a hot-path query with
.prepare()+sql.placeholder()or covering indexes - Setting up the Drizzle client (pragmas, driver choice, singleton lifecycle)
- Wiring database types into application code (
$inferSelect, drizzle-zod, JSON shapes)
The skill is not specific to one driver — it covers behavior shared across better-sqlite3, libsql, bun:sqlite, expo-sqlite, op-sqlite, and Cloudflare D1, calling out driver-specific deviations where they exist.