What problem does it solve? Writing correct, performant SQL and safe schema migrations is error-prone, especially when switching between database dialects or ORMs. This Skill translates natural-language requirements into dialect-aware SQL, statically analyzes queries for performance anti-patterns, and generates reversible migration scripts with rollback plans. ## Core Features & Use Cases - Natural Language to SQL: Translates requirements into queries using JOINs, CTEs, window functions, UPSERTs, and pagination patterns across PostgreSQL, MySQL, SQLite, and SQL Server. - Query Optimization: Static analysis detects SELECT *, non-sargable predicates, cartesian joins, N+1 risks, and missing LIMITs, with EXPLAIN plan reading and index-type guidance. - Migration Generation: Produces up/down migration scripts in SQL, Prisma, or Alembic formats with zero-downtime patterns like expand-contract renames and concurrent index creation. - ORM Integration: Side-by-side patterns for Prisma, Drizzle, TypeORM, and SQLAlchemy covering CRUD, eager loading, transactions, and migration workflows. - Use Case: Ask for a migration to add an email_verified column to a users table, and receive a dialect-specific up/down script with warnings about irreversible operations. ## Quick Start Ask the assistant to generate a PostgreSQL migration that adds an index on orders(status, created_at) and to review your existing query for performance issues.