Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

D1 Drizzle Schema Generator

Generates D1-correct Drizzle ORM schemas, migration scripts, and schema documentation for Cloudflare Workers projects.

Dev & CodingIntermediate★ 1,033⑂ 105AI score 8/10Last updated: Sep 26, 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 / $inferInsert type exports
  • Supplies a drizzle.config.ts template plus db:generate, db:migrate:local, db:migrate:remote scripts
  • Emits a DATABASE_SCHEMA.md file 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

  1. "Scaffold a D1 data layer with users, organisations and posts" → schema file, relations, and exported types
  2. "Add a comments table to my existing D1 project and generate the migration"
  3. "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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/jezweb/claude-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r claude-skills/plugins/cloudflare/skills/d1-drizzle-schema ~/.claude/skills/
  5. Confirm the references/ and assets/ folders came along.
  6. In your project, install npm i drizzle-orm drizzle-kit wrangler and add a D1 binding named DB in wrangler.toml.
  7. Restart Claude Code and ask it to "create a Drizzle schema for my D1 database" to trigger the skill.