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).

Review SQL queries for index and scan problems, document schemas from DDL, and generate migrations with rollback and destructive-change flags. Use when tuning a query, documenting a schema, or diffing two schemas.

> **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 Optimization Workflow
- Schema Documentation Workflow
- Migration Workflow
- CI Integration
- Query Anti-Patterns
- Index Guidelines

## 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

Quick Start

# Review a file of queries (bundled sample: 8 findings; --strict exits 1 on any finding)
python scripts/query_optimizer.py --file examples/queries.sql --strict

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

# Document a schema
python scripts/schema_explorer.py --file examples/schema.sql --format markdown

# Diff two schemas: additive change exits 0, drops exit 1 until reviewed
python scripts/migration_generator.py --from examples/schema.sql --to examples/schema_additive.sql
python scripts/migration_generator.py --from examples/schema.sql --to examples/schema_v2.sql

Related Skills in Engineering

View on GitHub