What problem does it solve? Adding persistent, server-side data storage to a TanStack Start app requires provisioning a database, managing connection strings, writing migrations, and keeping the dev preview consistent with production. This Skill provides a prewired dual-mode database integration that handles all of that. ## Core Features & Use Cases - Dual-mode database access: Uses real Neon Postgres when DATABASE_URL is set at deploy time, and automatically falls back to an embedded PGLite (WASM Postgres) in the sandbox preview, both through the same @/lib/db API. - Server-only queries: Exposes getSql() with a tagged-template and .query() interface, callable only from createServerFn handlers or server loaders, with optional authMiddleware scoping for per-user data. - Ordered SQL migrations: Applies migrations/*.sql to Neon on deploy via npm run build and to the PGLite preview automatically on startup, keeping dev and prod schemas in sync. - Use Case: You are building a todos app and need tasks to persist across sessions. Enable the database flag, add a 0002_schema.sql migration with a todos table, and query it from a server function — the preview works immediately on PGLite and the deploy runs on Neon with no extra setup. ## Quick Start Ask the AI to add a database-backed feature, such as "create a todos table with a migration and a server function that lists and adds todos using the Neon database skill."