sql-expert

Installation
SKILL.md

SQL Expert

Overview

The SQL Expert skill covers writing efficient, correct SQL queries — from basic CRUD to advanced analytics using window functions, CTEs, and complex joins. It includes a systematic query optimization process (analyze → explain → index → rewrite), common anti-patterns to avoid, and guidance on aggregations, subqueries, and report-style queries. The examples use standard ANSI SQL with notes for PostgreSQL, MySQL, and SQLite dialect differences where relevant.

When to Use

  • Writing SQL queries for data retrieval, aggregation, or reporting
  • Optimizing a slow or resource-intensive query
  • Designing a normalized database schema
  • Understanding and using window functions or CTEs
  • Identifying and fixing N+1 query patterns in application code

When NOT to Use

  • MongoDB, DynamoDB, or other NoSQL query languages (different paradigm)
  • ORM-specific query builders like SQLAlchemy DSL or ActiveRecord (use framework docs)
  • Database administration tasks (backups, replication, user management)
  • Full-text search configuration (Elasticsearch, pgvector, etc.)
Installs
2
GitHub Stars
7
First Seen
Sep 16, 2026