How to Use

Try in Chat

Quick

Paste into any AI chat for instant expertise. Works in one conversation -- no setup needed.

Preview prompt
You are an expert Sql Database Assistant (Engineering domain).

Tools for analyzing SQL query performance, exploring database schemas from DDL files, and generating migration SQL from schema differences. Helps teams write efficient queries and manage database evolution safely.

> **Category:** Engineering > **Domain:** Database Development & Optimization The **SQL Database Assistant** skill provides tools for analyzing SQL query performance, exploring database schemas from DDL files, and generating migration SQL from schema differences. It helps teams write efficient queri

## Your Key Capabilities
- query_optimizer.py
- schema_explorer.py
- migration_generator.py
- Query Optimization Workflow
- Schema Documentation Workflow
- Migration Workflow

## How to Help
When the user asks for help in this domain:
1. Ask clarifying questions to understand their context
2. Apply the relevant framework or workflow from your expertise
3. Provide actionable, specific output (not generic advice)
4. Offer concrete templates, checklists, or analysis

For the full skill with Python tools and references, visit:
https://github.com/borghei/Claude-Skills/tree/main/sql-database-assistant

---
Start by asking the user what they need help with.
# Add to your project
cs install engineering/sql-database-assistant ./

# Or copy directly
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/sql-database-assistant your-project/
# The skill is available in your Codex workspace at:
.codex/skills/sql-database-assistant/

# Reference the SKILL.md in your Codex instructions
# or copy it into your project:
cp -r .codex/skills/sql-database-assistant your-project/
# The skill is available in your Gemini CLI workspace at:
.gemini/skills/sql-database-assistant/

# Reference the SKILL.md in your Gemini instructions
# or copy it into your project:
cp -r .gemini/skills/sql-database-assistant your-project/
# Add to your .cursorrules or workspace settings:
# Reference: engineering/sql-database-assistant/SKILL.md

# Or copy the skill folder into your project:
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/sql-database-assistant your-project/
# Clone and copy
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/sql-database-assistant your-project/

# Or download just this skill
curl -sL https://github.com/borghei/Claude-Skills/archive/main.tar.gz | tar xz --strip=1 Claude-Skills-main/engineering/sql-database-assistant

Run Python Tools

python engineering/sql-database-assistant/scripts/tool_name.py --help

Python Tools

query_optimizer.py

Analyzes SQL queries for performance issues and optimization opportunities.

schema_explorer.py

Generates documentation from SQL DDL (CREATE TABLE) files.

migration_generator.py

Generates migration SQL by comparing two schema DDL files.

Quick Start

# Analyze a SQL query for performance issues
python scripts/query_optimizer.py --file slow_query.sql

# Analyze inline SQL
python scripts/query_optimizer.py --query "SELECT * FROM users WHERE name LIKE '%john%'"

# Explore schema from DDL file
python scripts/schema_explorer.py --file schema.sql

# Generate migration from schema diff
python scripts/migration_generator.py --from old_schema.sql --to new_schema.sql

# JSON output
python scripts/query_optimizer.py --file query.sql --format json

Related Skills in Engineering

View on GitHub