What problem does it solve? Adding a database table in a TanStack Start + Cloudflare D1 project involves several error-prone steps: writing Drizzle schema definitions with SQLite-specific column types, deriving Zod validation schemas, and generating then applying migrations with wrangler. This Skill guides the entire workflow and prevents common mistakes like using Postgres column types on D1. ## Core Features & Use Cases - Schema Definition: Add tables to src/db/schema.ts using Drizzle's SQLite column builders with correct patterns for primary keys, timestamps, booleans, and JSON columns. - Type and Validation Exports: Generate inferred TypeScript types and drizzle-zod insert/select schemas with .pick() restrictions so callers cannot set server-managed fields. - Migration Workflow: Run db:generate and db:migrate in the correct order for local D1, and db:migrate:prod for remote databases. - Use Case: When a user says "I need a posts table with a title and author", the Skill produces the table definition, Zod schemas, migration commands, and example CRUD queries ready to use in server functions or API routes. ## Quick Start Ask the AI to add a new database table, for example: "Add a posts table with title, body, and authorId fields to the database."