What problem does it solve?
This Skill solves the problem of turning database requirements into correct, performant SQL while keeping schemas and migrations safe and reversible.
Core Features & Use Cases
- Natural Language to SQL & Query Patterns: Produce accurate queries using JOIN, CTEs, window functions, JSON operations, pagination, and UPSERT patterns across common database dialects.
- Schema Exploration: Generate introspection queries to document tables, columns, keys, indexes, and schema-level details for PostgreSQL, MySQL, SQLite, and SQL Server.
- Query Optimization & Migration Generation: Recommend performance improvements using EXPLAIN analysis signals and generate migration templates (up/down) with zero-downtime-friendly sequencing and rollback plans, plus ORM integration guidance for Prisma, Drizzle, TypeORM, and SQLAlchemy.
- Use Case Example: You need to implement a feature that lists each department’s top 3 highest-paid employees with pagination and then add the minimal indexes and migrations to keep it fast; use this Skill to draft the query, validate the strategy with an optimization checklist, and generate migration templates for the schema changes.
Quick Start
Run the SQL database assistant to generate a dialect-aware query, propose indexes, and draft migration up/down steps for an example change request like “show top 3 salaries per department and add the right index on (department_id, salary)”.