skillfed

drizzle-sqlite-scaffold

Drizzle SQLite Scaffold automates project initialization and table scaffolding for Drizzle + SQLite, emitting driver-specific config, singleton client, schema files with inferred types, and CRUD repository modules. Supports better-sqlite3, libsql/Turso, and bun:sqlite with built-in conventions for pragmas, relations, timestamps, and soft deletes.

Drizzle SQLite Scaffold generates production-ready Drizzle ORM + SQLite boilerplate with config, client, and schema templates for any supported driver.

AI-generated summary based on this skill's SKILL.md

182 14 MIT updated by pproenca

Install

pproenca/dot-skills/drizzle-sqlite-scaffold · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/pproenca/dot-skills
cp -r dot-skills/skills/.experimental/drizzle-sqlite-scaffold ~/.claude/skills/drizzle-sqlite-scaffold

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I scaffold a drizzle sqlite project?

Drizzle SQLite Scaffold automates initialization by generating driver-specific config, a singleton client, and schema files with inferred types. It supports better-sqlite3, libsql/Turso, and bun:sqlite, each with pre-configured pragmas and conventions for timestamps and soft deletes.

Can I add a table to my existing Drizzle project?

Yes. Drizzle SQLite Scaffold generates new table definitions with schema and a complete CRUD repository module for any existing Drizzle project. It infers types from your schema and scaffolds validators alongside the repository.

What does Drizzle SQLite Scaffold emit for a new project?

Drizzle SQLite Scaffold outputs driver-specific config, a singleton client, schema files with inferred types, and optional CRUD repository modules. It includes built-in conventions for pragmas, relations, timestamps, and soft deletes tailored to your chosen SQLite driver.

Which SQLite drivers does Drizzle SQLite Scaffold support?

Drizzle SQLite Scaffold supports better-sqlite3, libsql/Turso, and bun:sqlite. Each driver receives its own configuration and client setup, with pragmas and conventions optimized for that driver's runtime environment.

How does Drizzle SQLite Scaffold generate CRUD and validators?

Drizzle SQLite Scaffold generates CRUD repository modules and Zod validators from your existing table schema. It infers types directly from Drizzle definitions, ensuring validators and repository methods stay synchronized with schema changes.

Can I set up better-sqlite3 with Drizzle using this scaffold?

Yes. Drizzle SQLite Scaffold includes dedicated better-sqlite3 setup with pre-configured pragmas, connection pooling conventions, and a singleton client pattern optimized for synchronous SQLite access in Node.js environments.

SKILL.md

rendered from the published skill — quoted content, verbatim

Drizzle SQLite Scaffold

Parameterized templates for bootstrapping Drizzle + SQLite in a fresh project, or adding a new table/repository to an existing one. Every output bakes in the conventions documented in references/conventions.md — explicit primary keys, indexed foreign keys, relations() declarations,

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
skills/.experimental/drizzle-sqlite-scaffold/SKILL.md
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/client.better-sqlite3.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/client.bun-sqlite.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/client.libsql.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/drizzle.config.local.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/drizzle.config.turso.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/gitignore.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/repository.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/schema-index.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/table.ts.template
skills/.experimental/drizzle-sqlite-scaffold/assets/templates/validators.ts.template
skills/.experimental/drizzle-sqlite-scaffold/config.json
skills/.experimental/drizzle-sqlite-scaffold/gotchas.md
skills/.experimental/drizzle-sqlite-scaffold/metadata.json
skills/.experimental/drizzle-sqlite-scaffold/references/conventions.md

Related skills

Tags

orm-scaffolding database-initialization crud-generation schema-templating driver-agnostic convention-enforced type-inference migration-ready multi-driver-support validator-generation