D1 Drizzle Schema Generator
Generates D1-correct Drizzle ORM schemas, migration scripts, and schema documentation for Cloudflare Workers projects.
Dev & CodingIntermediate★ 975⑂ 102AI score 8/10Last updated: Jul 2, 2026
What it does
Produces Drizzle ORM schemas that respect Cloudflare D1's quirks instead of generic SQLite assumptions.
- Maps booleans and timestamps to
integer({ mode: 'boolean' })/integer({ mode: 'timestamp' }) - Accounts for always-enforced foreign keys and the 100 bound-parameter limit (batched bulk inserts)
- Writes tables, indexes, relations, and
$inferSelect/$inferInserttype exports - Supplies a
drizzle.config.tstemplate plusdb:generate,db:migrate:local,db:migrate:remotescripts - Emits a
DATABASE_SCHEMA.mdfile so future sessions know the data model
Who it's for
- Developers building backends on Cloudflare Workers + D1
- Teams adopting Drizzle ORM on D1 for the first time
- Anyone bitten by subtle bugs from copying standard SQLite patterns
Examples
- "Scaffold a D1 data layer with users, organisations and posts" → schema file, relations, and exported types
- "Add a comments table to my existing D1 project and generate the migration"
- "Load 5,000 CSV rows into D1" → batched insert code sized to the 100-parameter cap
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/jezweb/claude-skills/HEAD/plugins/cloudflare/skills/d1-drizzle-schema/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the plugins/cloudflare/skills/d1-drizzle-schema folder from the GitHub repo jezweb/claude-skills into my ~/.claude/skills/d1-drizzle-schema/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/jezweb/claude-skills.git /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/plugins/cloudflare/skills/d1-drizzle-schema ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/jezweb/claude-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r claude-skills/plugins/cloudflare/skills/d1-drizzle-schema ~/.claude/skills/ - Confirm the
references/andassets/folders came along. - In your project, install
npm i drizzle-orm drizzle-kit wranglerand add a D1 binding namedDBinwrangler.toml. - Restart Claude Code and ask it to "create a Drizzle schema for my D1 database" to trigger the skill.
View source on GitHub ↗License: MIT