SQL Database Assistant - POWERFUL Tier Skill

SQL Database Assistant is a skill for writing SQL queries, optimizing database performance, generating migrations, exploring schemas, and working with ORMs like Prisma, Drizzle, TypeORM, and SQLAlchemy. It provides tools and patterns for natural language to SQL translation, query optimization, schema introspection, and migration generation across multiple database dialects.

✨ What it does

  • Translates natural language to SQL with step-by-step patterns.
  • Provides introspection queries for schema exploration across multiple databases.
  • Offers query optimization workflows including EXPLAIN analysis and index recommendations.
  • Generates migration templates with zero-downtime and rollback strategies.
  • Includes dialect comparison tables and compatibility tips.
  • Covers ORM patterns for Prisma, Drizzle, TypeORM, and SQLAlchemy.

🎯 When to use it

  • When the user asks to write SQL queries from natural language requirements.
  • When the user needs to optimize slow queries or detect N+1 problems.
  • When the user needs to generate database migrations or explore a database schema.
  • When the user works with ORMs and needs patterns or escape hatches.
  • When the user needs dialect-specific SQL for PostgreSQL, MySQL, SQLite, or SQL Server.

🚀 How to use

Trigger the skill by asking for SQL help, query optimization, migration generation, schema exploration, or ORM assistance. Provide your database dialect, schema context, and the specific task. Example prompts:

Write a query to find the top 3 highest-paid employees per department.
Optimize this slow query: SELECT * FROM orders WHERE YEAR(created_at) = 2025;
Generate a migration to add a column 'email_verified' to the users table.

📄 Output: SQL queries, optimization recommendations, migration scripts, schema documentation, and ORM code snippets.

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/skills/sql-database-assistant .claude/skills/sql-database-assistant

Skill source: engineering/skills/sql-database-assistant/SKILL.md

⚠️ Good to know

The skill provides patterns and templates but does not execute queries or connect to live databases; users must run the provided SQL and scripts in their own environment.

❓ FAQ

What databases are supported?

The skill supports PostgreSQL, MySQL, SQLite, and SQL Server, with dialect-specific SQL and compatibility guidance.

Does the skill generate complete migrations?

It generates migration templates and patterns, but you must adapt them to your schema and test them before applying.

Can it detect N+1 queries?

Yes, it describes symptoms and fixes for N+1 problems, such as using eager loading or batch queries.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.