sql-database-assistant

Write and optimize SQL queries with EXPLAIN-driven performance analysis.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Veloxia-agency/VELOXIA-WEB --skill sql-database-assistant-veloxia-agency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-database-assistant
Source: https://github.com/Veloxia-agency/VELOXIA-WEB/tree/main/.claude/skills/engineering/skills/sql-database-assistant
Command: npx skills add https://github.com/Veloxia-agency/VELOXIA-WEB --skill sql-database-assistant-veloxia-agency

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill removes the friction of working directly with databases by helping you write correct queries, diagnose slow performance, plan safe schema changes, and translate database tasks into ORM-friendly workflows.

Core Features & Use Cases

  • Query Writing: Turn natural language requirements into performant SQL for reporting, filtering, joins, aggregations, and pagination.
  • Performance Optimization: Review query structure, spot indexing opportunities, and reason about execution plans to reduce latency.
  • Migration Support: Generate reversible schema changes and safer rollout steps for adding columns, renaming fields, creating indexes, and changing types.
  • ORM Guidance: Work smoothly with Prisma, Drizzle, TypeORM, and SQLAlchemy when you need query builder patterns, raw SQL escape hatches, or migration workflows.
  • Use Case: A developer can ask for a query that finds recent paid orders, the indexes it should use, and the migration needed to support the reporting endpoint.

Quick Start

Use the sql-database-assistant skill to generate an optimized query, explain the database strategy, and suggest any safe migration or ORM changes needed for my request.

Frequently Asked Questions about sql-database-assistant

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write and optimize SQL queries for PostgreSQL and MySQL?

You can write and optimize SQL queries by translating natural language requirements into dialect-aware SQL, reviewing query structure, and applying EXPLAIN-driven performance analysis to spot indexing opportunities and reduce latency.

What is the best way to generate reversible database migrations for schema changes?

The best way to generate reversible database migrations is to use templates that provide safer rollout steps for adding columns, renaming fields, creating indexes, and changing types to ensure safe schema changes.

How does query optimization work with ORM frameworks like Prisma and SQLAlchemy?

Query optimization with ORM frameworks works by generating query builder patterns, providing raw SQL escape hatches, and suggesting migration workflows to integrate smoothly with Prisma, Drizzle, TypeORM, and SQLAlchemy.

Can I use this SQL assistant for SQLite and SQL Server workflows?

Yes, you can use this SQL assistant for SQLite and SQL Server workflows, as it applies dialect-aware SQL generation, schema documentation, and parameterized query guidance across multiple database systems.

Why does my SQL query performance lag during reporting and aggregations?

SQL query performance often lags during reporting and aggregations due to unoptimized query structure and missing indexes, which can be diagnosed using EXPLAIN execution plans to reduce latency.

How do I plan safe schema changes when adding columns or changing types?

You plan safe schema changes by generating reversible migration templates that outline safer rollout steps for adding columns, creating indexes, and changing types without disrupting database workflows.