What problem does it solve? Cloudflare D1 is SQLite-based but behaves differently from standard SQLite: foreign keys are always enforced, there are no native BOOLEAN or DATETIME types, and queries are limited to 100 bound parameters. Using standard SQLite patterns with Drizzle ORM causes subtle bugs, failed bulk inserts, and broken migrations. This Skill generates schemas that are correct for D1 from the start. ## Core Features & Use Cases - D1-Correct Schema Generation: Produces Drizzle schema files using the right column patterns, such as integer with boolean mode for booleans, integer with timestamp mode for dates, and text with json mode for typed JSON. - Migration and Config Scaffolding: Outputs a drizzle.config.ts template, wrangler migration commands for local and remote databases, and batch insert logic that respects the 100 bound parameter limit. - Documentation Output: Generates a DATABASE_SCHEMA.md file documenting tables, relationships, indexes, and the migration workflow for future sessions. - Use Case: When adding a new table to a Cloudflare Workers project backed by D1, use this Skill to scaffold the table definition, relations, type exports, and migration scripts without hitting D1-specific pitfalls. ## Quick Start Ask the AI to generate a Drizzle schema for a new Cloudflare D1 database with users and posts tables, including migration commands and type exports.