About drizzle-orm
The drizzle-orm skill supports developers using Drizzle 1.0 release candidates, including drizzle-kit, drizzle-seed, validators, and Effect drivers. It covers version alignment, schemas and queries, migrations, and verification, with guidance specific to the RC line.
Key features
- 01Check ORM, Kit, and Seed versions
- 02Guide schema definitions and SQL queries
- 03Explain RQBv2 relational queries
- 04Guide migrations, generation, and seeding
- 05Cover validators and Effect drivers
Use cases
- 01Set up Drizzle 1.0 RC for a new project
- 02Upgrade a 0.x project to an RC
- 03Generate migrations and verify on a test database
- 04Run Kit commands in CI
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ dobroslavradosavljevic/ skills --skill drizzle-ormAfter installing, type/drizzle-ormin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/drivers-upgrade.mdeffect-integration.mdkit-migrations.mdrelations-rqb.mdschema-queries.mdseed-validators.mdsource-map.mdusage-guide.mdDetails
From the project READMEDrizzle ORM (1.0 RC)
Use this skill for Drizzle 1.0 release candidates (drizzle-orm@rc, currently 1.0.0-rc.4), plus drizzle-kit, drizzle-seed, in-tree validators, Studio, and official Effect drivers.
Do not treat npm latest (0.45.x / kit 0.31.x) as current for new work. Pin the rc channel for ORM + Kit + Seed together. Stable 1.0.0 has not shipped yet; rc5-style dist-tags are commit previews, not the RC line.
Workflow
- Inspect the local Drizzle surface:
- Exact versions / dist-tags for
drizzle-orm,drizzle-kit,drizzle-seed,eslint-plugin-drizzle. - Dialect + driver entrypoints (
postgres-js,neon-http,bun-sql,libsql,effect-postgres, …). - Schema files,
defineRelations,drizzle.config.ts, migrations folder shape (v3 folders vs legacy journal). - Whether Effect (
effect4.x +drizzle-orm/effect-*) or Promise drivers are in use.
- Exact versions / dist-tags for
- For install, day-to-day usage, baselines, and troubleshooting, follow usage-guide.md first.
- Refresh docs when versions drift or the task touches RQBv2, kit v3 migrations, codecs, or Effect. Start from source-map.md.
- Route deeper detail:
- Schema + SQL query builder: schema-queries.md.
- RQBv2
defineRelations/db.query: relations-rqb.md. - Kit CLI, config, generate/migrate/push/pull/studio: kit-migrations.md.
- Seed + Zod/Valibot/TypeBox/ArkType/Effect Schema: seed-validators.md.
- Effect drivers vs
@effect/sql-drizzle: effect-integration.md. - Driver matrix + 0.x → RC upgrade: drivers-upgrade.md.
- Preserve the project's dialect and driver unless the user asks to switch.
- Verify with the narrowest useful query,
bunx drizzle-kit check/generate --explain-style dry runs, or a focused migrate against a disposable DB.
Core Judgment
- Always install
@rcfor new Drizzle 1.0 work:bun add drizzle-orm@rcandbun add -D drizzle-kit@rc. Never mix RC ORM with Kit0.31.x. - RQBv1 is gone. Use
defineRelations(schema, …)and pass{ relations }intodrizzle()— not per-tablerelations()+{ schema }fordb.query. - Prefer SQL query builder for joins/aggregations; prefer RQB for nested graphs.
- Casing is on tables (
snakeCase.table/camelCase.table), notdrizzle({ casing }). - Production schema changes: generate → migrate. Use push only for local prototyping (
--explainfirst). - After leaving 0.x: run
bunx drizzle-kit uponce to convert migration folders to v3 (nojournal.json). - Validators live in-tree:
drizzle-orm/zod,…/valibot,…/typebox,…/arktype,…/effect-schema. Avoid standalone[email protected]with RC. - Effect on RC: use
drizzle-orm/effect-*+ Effect v4 (effect4.0 stable onlatest, matching@effect/sql-*4.x). Theeffect@betatag is now an old prerelease — do not install it. Do not pair RC with@effect/sql-drizzle(Effect v3 / drizzle<0.50only). - Non-interactive / CI / agent runs of Kit: use
--output jsonand pass rename/data-loss decisions via--hints/--hints-fileinstead of answering prompts; for code, call thedrizzle-kit/cliSDK. - Prefer
$inferSelect/$inferInsert(aliases:InferSelectModel/InferInsertModel).
Verification
Prefer repository-owned commands. For meaningful Drizzle RC work, cover the relevant subset:
- Typecheck schema + relations + client factory.
- Focused insert/select/update/delete or
db.query.*.findManyagainst a real or test DB. bunx drizzle-kit generatethen review SQL;migrateon disposable DB;checkfor branch conflicts.- Seed:
reset+seedon a non-prod database only. - Effect path: provide
PgClient(or dialect) layer and run one Effect program end-to-end. - After 0.x upgrades: confirm RQBv2 rewrite, casing builders, migrator folder v3, and codec-sensitive columns (arrays, timestamps, JSON).
Report which checks ran, which did not, and any @rc vs latest assumptions that remain.