Reach for this when you're staring at a slow query or need to write something gnarly with window functions and CTEs. It walks you through schema analysis, query optimization with EXPLAIN plans, and covering index design across PostgreSQL, MySQL, SQL Server, and Oracle. The workflow enforces a sub-100ms target and won't let you move on until you've eliminated sequential scans on large tables. What I like is the before/after examples showing correlated subquery rewrites and the quick reference for interpreting EXPLAIN ANALYZE output. It's opinionated about set-based operations and will push you toward EXISTS over COUNT, filtering before joins, and avoiding cursors when a single query will do.

skills.sh installs
6.8K
GitHub stars
12.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add jeffallan/claude-skills --skill sql-pro --agent claude-code

Installs into .claude/skills of the current project.

Files

SQL Pro

Core Workflow

  1. Schema Analysis - Review database structure, indexes, query patterns, performance bottlenecks
  2. Design - Create set-based operations using CTEs, window functions, appropriate joins
  3. Optimize - Analyze execution plans, implement covering indexes, eliminate table scans
  4. Verify - Run EXPLAIN ANALYZE and confirm no sequential scans on large tables; if query does not meet sub-100ms target, iterate on index selection or query rewrite before proceeding
  5. Document - Provide query explanations, index rationale, performance metrics

Reference Guide

Load detailed guidance based on context:

Sponsors

Details

Repository
github.com/jeffallan/claude-skills
Categories
Backend & APIs, Documentation, Debugging, Productivity & Planning, Marketing & SEO, Design & UI/UX, Databases

More from jeffallan/claude-skills

All 66
1clickhouse avatarclickhouse-managed-postgres-rcaclickhouse/agent-skillsMUST USE when investigating performance issues on a ClickHouse-managed Postgres instance. Provides an evidence-based RCA workflow that scrapes the Prometheus en6.8Kskills.sh installs
2wordpress avatarwp-performancewordpress/agent-skillsUse when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor v6.7Kskills.sh installs
3grafana avataropentelemetrygrafana/skillsInstrument any app with OpenTelemetry and ship metrics / logs / traces to Grafana Cloud or self-hosted Mimir / Loki / Tempo / Pyroscope. Covers SDK auto-instrum6.6Kskills.sh installs
4affaan-m avatarlaravel-securityaffaan-m/eccLaravel security best practices — authentication, authorization, Eloquent safety, CSRF, XSS prevention, API security, and secure deployment configurations.6.6Kskills.sh installs
5assistant-ui avatartoolsassistant-ui/skillsRegisters LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Covers the current authoring model: a "use generative" file exporting6.5Kskills.sh installs
6jeffallan avatarfastapi-expertjeffallan/claude-skillsUse when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentica6.4Kskills.sh installs