Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By secondskyv3.12.0MITIn 1 marketplace
Write type-safe Cloudflare D1 schemas, queries and migrations with Drizzle ORM, including D1 batch API transactions instead of SQL BEGIN/COMMIT. Covers Drizzle Kit migrations and common D1_ERROR and foreign key failures.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
cloudflare-d1, orm, type-safe-sql, database-migrations, schema-design, d1-batch, drizzle-orm-d1, query ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Status: Production Ready ✅ Last Updated: 2025-10-24 Production Tested: Used across 2025 Cloudflare ecosystem, full D1 compatibility
Claude Code automatically discovers this skill when you mention:
Provides production-tested patterns for Drizzle ORM with Cloudflare D1 databases. Covers type-safe schema definition, migrations management, query building, relations, transactions using D1 batch API, and complete Cloudflare Workers integration.
✅ Type-Safe Queries - Full TypeScript inference for all queries ✅ Schema Definition - Complete D1 column types, constraints, and relations ✅ Migrations Management - Generate and apply migrations with Drizzle Kit + Wrangler ✅ Relations & Joins - One-to-many, many-to-many with type-safe queries ✅ D1 Batch API - Transactions using D1's batch API (not SQL BEGIN/COMMIT) ✅ Prepared Statements - Performance optimization for repeated queries ✅ Workers Integration - Complete Hono + Drizzle + D1 setup ✅ Error Prevention - Prevents 12 documented issues with production-tested solutions ✅ 10 Templates - Ready-to-use patterns for every use case
| Issue | Why It Happens | Source | How Skill Fixes It |
|---|---|---|---|
| D1 Transaction Errors | Drizzle tries to use SQL BEGIN TRANSACTION, D1 requires batch API | drizzle-orm#4212 | Use db.batch() instead |
| Foreign Key Failures | PRAGMA foreign_keys = OFF in migrations causes issues | drizzle-orm#4089 | Proper migration order + cascading |
| Module Import Errors | OpenNext bundler issues with Wrangler imports | drizzle-orm#4257 | Correct import paths documented |
| D1 Binding Not Found | Missing or incorrect wrangler.jsonc configuration | Common D1 issue | Verify binding names match |
| Migration Apply Failures | Syntax errors or conflicting migrations | Community reports | Test locally with --local first |
| Schema Inference Errors | Complex circular references in relations | TypeScript limitation | Explicit type annotations |
| Prepared Statement Caching | D1 doesn't cache like SQLite | D1 limitation | Use .all() method correctly |
| Transaction Rollback | D1 batch API doesn't support traditional rollback | D1 API design | Manual error handling patterns |
| TypeScript Strict Mode | Drizzle types can be loose | Type safety issue | Explicit return types |
| Config Not Found | Wrong drizzle.config.ts location or name | User error | Must be in project root |
| Remote vs Local Confusion | Applying to wrong database | Development workflow | Use --local consistently |
| TOML vs JSON Config | Mixing config formats | Wrangler versions | Use wrangler.jsonc consistently |
# Install Drizzle
bun add drizzle-orm drizzle-kit # preferred
# or: npm install drizzle-orm drizzle-kit
# Create drizzle.config.ts
cat > drizzle.config.ts << 'EOF'
import { defineConfig } from 'drizzle-kit';
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub secondsky/claude-skills --plugin drizzle-orm-d1Plugins from other owners that cover similar ground