Skip to content
alirezarezvani avatar

Sql Database Assistant

Dialect-aware SQL assistant covering query writing, EXPLAIN-driven tuning, and zero-downtime migrations.

CCM score
67 of 100
skills.sh installs
802
GitHub stars
30.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers natural-language-to-SQL translation, schema introspection for PostgreSQL, MySQL, SQLite, and SQL Server, query optimization, and migration generation
  • Includes query_optimizer.py, migration_generator.py, and schema_explorer.py, plus reference guides for query patterns and optimization
  • Provides expand-contract sequences for renames and NOT NULL additions, and CREATE INDEX CONCURRENTLY for non-blocking index builds
  • Designed for developers working on slow or incorrect queries, schema exploration, and migrations across SQL dialects and ORMs

Install

$ npx -y skills add alirezarezvani/claude-skills --skill sql-database-assistant -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

SQL Database Assistant - POWERFUL Tier Skill

Overview

The operational companion to database design. While database-designer focuses on schema architecture and database-schema-designer handles ERD modeling, this skill covers the day-to-day: writing queries, optimizing performance, generating migrations, and bridging the gap between application code and database engines.

Core Capabilities

  • Natural Language to SQL — translate requirements into correct, performant queries
  • Schema Exploration — introspect live databases across PostgreSQL, MySQL, SQLite, SQL Server
  • Query Optimization — EXPLAIN analysis, index recommendations, N+1 detection, rewrite patterns
  • Migration Generation — up/down scripts, zero-downtime strategies, rollback plans
  • ORM Integration — Prisma, Drizzle, TypeORM, SQLAlchemy patterns and escape hatches
  • Multi-Database Support — dialect-aware SQL with compatibility guidance

Tools

Details

Repository
github.com/alirezarezvani/claude-skills
Category
Databases
First seen
Jun 3, 2026

Questions

What does the sql-database-assistant skill do?

sql-database-assistant writes, fixes and speeds up SQL, covering slow queries, EXPLAIN plans, indexes and ORM migrations for Prisma, Drizzle, TypeORM and SQLAlchemy. It also translates plain requirements into SQL and explores database schemas across PostgreSQL, MySQL, SQLite and SQL Server.

How do I install the sql-database-assistant skill?

Run npx -y skills add alirezarezvani/claude-skills --skill sql-database-assistant -y in your project. Once installed, sql-database-assistant loads when you ask an agent to write a query, optimize a slow query or generate a migration.

Where does sql-database-assistant stand in the Databases category?

sql-database-assistant sits in the Databases category on Claude Marketplaces, next to supabase-postgres-best-practices, prisma-client-api, prisma-database-setup, prisma-cli and prisma-postgres. Its own focus is the day-to-day work of queries, query tuning and migrations rather than schema architecture.

Can sql-database-assistant generate zero-downtime migrations?

Yes, sql-database-assistant generates up and down migration scripts with zero-downtime strategies and rollback plans. Its skill text covers expand-contract column renames and non-blocking index creation on PostgreSQL.

Does sql-database-assistant help with N+1 query problems?

Yes, sql-database-assistant detects N+1 query patterns and recommends fixes such as eager loading with include in Prisma or joinedload in SQLAlchemy. It also suggests batching queries with WHERE id IN lists.

More from alirezarezvani/claude-skills

All 259

Similar to Sql Database Assistant

More Databases