Drizzle Migrations
bretzel-app/crumbs
Drizzle ORM schema management and SQLite migrations — adding tables, modifying columns, creating indexes, generating and running migrations, Drizzle query patterns.
Drizzle ORM targeting SQLite (better-sqlite3, libsql/Turso, bun:sqlite, Cloudflare D1, expo-sqlite, op-sqlite).
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pproenca/dot-skills drizzle-sqlite --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .claude/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .claude/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqliteType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pproenca/dot-skills drizzle-sqlite --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .agents/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .agents/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pproenca/dot-skills drizzle-sqlite --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .cursor/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .cursor/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pproenca/dot-skills.git --path skills/.experimental/drizzle-sqlite--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pproenca/dot-skills drizzle-sqlite --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .gemini/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .gemini/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pproenca/dot-skills drizzle-sqliteInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .github/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .github/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pproenca/dot-skills --skill drizzle-sqlite -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pproenca/dot-skills drizzle-sqlite --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.experimental/drizzle-sqlite .opencode/skills/drizzle-sqlite && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "drizzle-sqlite" agent skill from https://github.com/pproenca/dot-skills/tree/master/skills/.experimental/drizzle-sqlite into .opencode/skills/drizzle-sqlite/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "drizzle-sqlite", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
drizzle-sqliteDrizzle ORM targeting SQLite (better-sqlite3, libsql/Turso, bun:sqlite, Cloudflare D1, expo-sqlite, op-sqlite).
Drizzle Sqlite is an agent skill from pproenca/dot-skills. Drizzle ORM targeting SQLite (better-sqlite3, libsql/Turso, bun:sqlite, Cloudflare D1, expo-sqlite, op-sqlite). Covers schema definition (column modes, primary keys, foreign keys, indexes), drizzle-kit migrations (generate vs push, renames, custom SQL), the query builder (selects, upserts, returning, EXPLAIN), the relational query builder (relations(), with, partial columns), transactions and db.batch(), prepared statements with sql.placeholder(), connection pragmas (WAL, foreignkeys, busytimeout), and Drizzle…
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 52 other files, including reference files and assets (for example `AGENTS.md`, `assets/templates/_template.md` and `metadata.json`).
It sits in Databases, covering ORMs and data access. It works with SQLite, Drizzle ORM, Turso and SQL. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Drizzle Sqlite loads about 2.9k tokens when it runs, and up to ~35k if it reads all its reference files. Until then it costs about 247 tokens; SKILL.md has 892 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 892 words, ~2,940 tokens.
.claude/skills/drizzle-sqlite/SKILL.md (or your agent's skills folder). This skill also uses 49 other files; get the full folder from GitHub.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.
Reference these guidelines when:
sqliteTable schemas — choosing column types, primary keys, indexes, foreign keysdrizzle-kit generate / migrate / push, or hand-editing a migration SQL filedb.select(), db.insert(), db.update(), db.delete()db.query.* and the relational query builderdb.transaction() or db.batch() (libsql/Turso/D1).prepare() + sql.placeholder() or covering indexes$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.
SQLite is unusual among production databases:
INTEGER, REAL, TEXT, BLOB, or NULL — Drizzle column modes encode the rest.ALTER TABLE. Only RENAME COLUMN, ADD COLUMN, DROP COLUMN. Type changes and constraint additions need a table rebuild.PRAGMA foreign_keys = ON is per-connection and not persistent.Many rules in this skill exist because Drizzle's API abstracts over PostgreSQL/MySQL/SQLite uniformly — but the underlying SQLite engine has constraints that show up at runtime if you treat it like Postgres.
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Schema Definition | CRITICAL | schema- |
| 2 | Migrations & Drizzle Kit | CRITICAL | migrate- |
| 3 | Query Building | HIGH | query- |
| 4 | Relations | HIGH | rel- |
| 5 | Transactions & Batching | MEDIUM-HIGH | tx- |
| 6 | Prepared Statements & Hot Paths | MEDIUM-HIGH | perf- |
| 7 | Connection & Driver Setup | MEDIUM | conn- |
| 8 | Type Inference | MEDIUM | types- |
schema-integer-for-booleans — Use integer({ mode: 'boolean' }) so the inferred type is boolean, not 0 | 1schema-timestamp-mode-for-dates — Store dates as integer({ mode: 'timestamp_ms' }), not textschema-always-primary-key — Declare an explicit PK (single or composite); don't rely on hidden rowidschema-foreign-keys-with-actions — Specify onDelete/onUpdate on every .references()schema-index-foreign-keys-and-lookups — Index FK columns and frequent WHEREs — SQLite does not auto-index FKsschema-text-json-not-blob-json — Use text({ mode: 'json' }) so json_extract and JSON-path indexes workschema-unique-constraints-for-natural-keys — .unique() for email/slug/externalId so onConflict has a targetmigrate-generate-not-push-in-prod — Use generate + migrate; push drops columns it can't reconcilemigrate-explicit-renames — Answer the rename prompt — defaults treat renames as drop+addmigrate-config-dialect-and-out — Define drizzle.config.ts so commands work without flagsmigrate-apply-with-migrator — Apply via drizzle-kit migrate or the driver migrator module, not raw SQLmigrate-data-backfill-as-custom-sql — Hand-edit migration SQL to backfill atomically with the DDLmigrate-commit-migrations-to-git — Commit drizzle/ SQL and drizzle/meta/ snapshots — both are requiredquery-select-columns-not-star — Project to the columns you need with db.select({ ... })query-avoid-n-plus-one-with-inarray — Replace looped queries with inArray()query-always-limit-listings — Every listing query needs .limit() (and ideally a cursor)query-bind-parameters-not-concat — Use eq() / sql template — never string-concat valuesquery-upsert-with-onconflict — Atomic upserts via .onConflictDoUpdate(), not select-then-writequery-returning-instead-of-reselect — .returning() on insert/update/delete saves a round tripquery-toSQL-and-explain — Inspect generated SQL and EXPLAIN QUERY PLAN on hot pathsrel-declare-relations-for-rqb — relations() declarations unlock db.query.* and withrel-prefer-with-over-manual-joins — with for nested fetches; manual joins lose typing and add coderel-partial-columns-in-with — columns: { ... } inside with to limit payload and avoid leaksrel-filter-with-where-inside-with — Push related-row filters into with.where, not into JSrel-leftjoin-for-flat-aggregates — Drop to leftJoin + groupBy when you need aggregatestx-wrap-multi-statement-writes — Wrap related writes in db.transaction() for atomicity + throughputtx-batch-for-libsql-roundtrips — db.batch() on libsql/Turso/D1 collapses N round trips into 1tx-no-network-io-inside-transaction — No awaited HTTP / FS / Stripe calls inside a transactiontx-handle-busy-with-retry — Bounded retries on SQLITE_BUSY — only on transient errorstx-single-writer-no-parallel-writes — Promise.all of writes contends; serialize themperf-prepare-hot-paths — .prepare() + sql.placeholder() for queries running on every requestperf-bulk-insert-multi-row-values — One values([...rows]) instead of N looped insertsperf-avoid-count-star-on-large-tables — Counter rows or keyset pagination instead of count(*)perf-keyset-not-offset-for-deep-pages — Keyset pagination keeps cost constant across pagesperf-covering-index-for-hot-queries — Cover the projected columns so the planner skips the row readconn-enable-wal — journal_mode = WAL for concurrent reads + one writerconn-set-busy-timeout — busy_timeout = 5000 turns contention into a waitconn-foreign-keys-pragma — foreign_keys = ON per connection — off by defaultconn-singleton-client — Module-scope singleton; never per-request constructionconn-pick-driver-deliberately — Sync vs async vs HTTP — choose by deployment targettypes-infer-select-insert — Derive row types with $inferSelect / $inferInserttypes-narrow-json-with-dollartype — .$type<Shape>() to escape unknown on JSON columnstypes-getTableColumns-for-reuse — Share projections via getTableColumns() + spreadtypes-drizzle-zod-for-runtime-validation — createInsertSchema(table) derives a Zod validator from the schematypes-bigint-mode-for-large-integers — mode: 'bigint' for IDs over Number.MAX_SAFE_INTEGERRead the relevant category overview in references/_sections.md, then the specific rule files for detailed explanations and code examples. Each rule has incorrect-vs-correct examples — apply the correct pattern to the code under review.
For complex changes (schema redesign, migration strategy, performance work), read all rules in the affected category before deciding.
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
effect-ts — When the application is Effect-based; Drizzle integrates via Effect.tryPromise.nextjs-bundle-optimizer — For Next.js apps reaching for SQLite as the data layer.better-auth — Often paired with Drizzle SQLite for auth tables; see better-auth-scaffold for table generation.© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 49 other files (references, assets) in skills/.experimental/drizzle-sqlite of pproenca/dot-skills.
Open the folder on GitHubat commit cf93c57
Drizzle Sqlite next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Drizzle Sqlite this skillpproenca/dot-skills | 214 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Drizzle Migrationsbretzel-app/crumbs | 127 | 1 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Drizzle Orm Expertdavila7/claude-code-templates | 32k | 3 repos | ~2.6k | Automated safety check: Pass | MIT | |
| Drizzle OrmEpicenterHQ/epicenter | 4.8k | — | ~1.3k | Automated safety check: Pass | Custom licence | |
| Cloudflare D1alinaqi/maggy | 707 | — | ~4.1k | Automated safety check: Pass | MIT | |
| Drizzle Orm D1secondsky/claude-skills | 227 | — | ~2.4k | Automated safety check: Pass | MIT |
bretzel-app/crumbs
Drizzle ORM schema management and SQLite migrations — adding tables, modifying columns, creating indexes, generating and running migrations, Drizzle query patterns.
davila7/claude-code-templates
Expert in Drizzle ORM for TypeScript — schema design, relational queries, migrations, and serverless database integration.
EpicenterHQ/epicenter
Apply Drizzle ORM patterns for schemas, migrations, queries, branded types, and Postgres or D1 boundaries.
alinaqi/maggy
Cloudflare D1 SQLite database with Workers, Drizzle ORM, migrations
secondsky/claude-skills
| Type-safe ORM for Cloudflare D1 databases using Drizzle. An agent skill from secondsky/claude-skills.
ericrisco/rsc-harness
A skill your agent uses when deciding whether plain SQLite is enough, or wiring SQLite, Turso or libSQL for local-first, edge and embedded-replica apps — a local file DB, a remote Turso URL, or a…
pproenca/dot-skills
Audio forensics and voice recovery guidelines for CSI-level audio analysis.
pproenca/dot-skills
Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.
pproenca/dot-skills
Create well-structured RFCs and technical proposals for software projects.
pproenca/dot-skills
Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.
pproenca/dot-skills
Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…
pproenca/dot-skills
Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…
Works with
Categories
Drizzle ORM targeting SQLite (better-sqlite3, libsql/Turso, bun:sqlite, Cloudflare D1, expo-sqlite, op-sqlite). Drizzle Sqlite is an agent skill from pproenca/dot-skills. Drizzle ORM targeting SQLite (better-sqlite3, libsql/Turso, bun:sqlite, Cloudflare D1, expo-sqlite, op-sqlite).
Drizzle Sqlite fits situations like: refactoring Drizzle code for SQLite; even if the user doesnt say performance — schema/migration choices made now are expensive to reverse later; SQLite-specific traps (single-writer model; no native booleans/dates.
Run `npx skills add pproenca/dot-skills --skill drizzle-sqlite -a claude-code`. Or copy the skill folder (skills/.experimental/drizzle-sqlite in pproenca/dot-skills) into .claude/skills/drizzle-sqlite in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pproenca/dot-skills --skill drizzle-sqlite -a codex`. Or copy the skill folder (skills/.experimental/drizzle-sqlite in pproenca/dot-skills) into .agents/skills/drizzle-sqlite in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill drizzle-sqlite -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drizzle-sqlite, .gemini/skills/drizzle-sqlite, .github/skills/drizzle-sqlite and .opencode/skills/drizzle-sqlite in your project.
SKILL.md names no scripts, command-line tools or credentials: Drizzle Sqlite is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Drizzle Sqlite is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 32k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Drizzle Sqlite: Drizzle Migrations (bretzel-app/crumbs, 127 stars), Drizzle Orm Expert (davila7/claude-code-templates, 32k stars), Drizzle Orm (EpicenterHQ/epicenter, 4.8k stars) and Cloudflare D1 (alinaqi/maggy, 707 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.
Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.