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

D1 Drizzle Schema

Generates D1-correct Drizzle ORM schemas, migrations, types, and schema docs for Cloudflare D1.

Dev & CodingIntermediate★ 1,034⑂ 105AI score 8/10Last updated: Sep 29, 2026

What it does

  • Produces Drizzle ORM schema files tailored to Cloudflare D1 (SQLite-based, but with quirks).
  • Encodes D1-specific rules: no native BOOLEAN/DATETIME (use integer({ mode: 'boolean' | 'timestamp' })), foreign keys always enforced, 100 bound-parameter cap, JSON stored as TEXT, single-writer concurrency.
  • Scaffolds relations, $inferSelect/$inferInsert type exports, drizzle.config.ts, migration npm scripts, and a DATABASE_SCHEMA.md reference doc.
  • Includes a bulk-insert batching formula and Worker runtime query patterns (.all(), .get(), count).

Who it's for

  • Developers building on Cloudflare Workers + D1.
  • Drizzle users who have hit subtle D1 bugs from standard SQLite assumptions.
  • Teams scaffolding a fresh data layer that needs documentation from day one.

Examples

  1. "Create a D1 schema for users, organisations, and posts" → schema.ts with UUID PKs, unique email index, cascade FKs.
  2. "My 5,000-row import fails with too many SQL variables" → rewritten as batched inserts using BATCH_SIZE = floor(100 / columnsPerRow).
  3. "Add an audit_log table and ship the migration" → table added, then drizzle-kit generate plus wrangler d1 migrations apply DB --local and --remote.

· · · 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/archive/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 archive/plugins/cloudflare/skills/d1-drizzle-schema folder from the GitHub repo jezweb/claude-skills into my ~/.claude/skills/jezweb-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/archive/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 directory: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r claude-skills/archive/plugins/cloudflare/skills/d1-drizzle-schema ~/.claude/skills/
  5. Install project prerequisites: npm i drizzle-orm && npm i -D drizzle-kit wrangler
  6. Restart Claude Code and ask something like "scaffold a D1 Drizzle schema for my app" to trigger the skill.