sql-toolkit

Design and optimize SQLite, PostgreSQL, and MySQL schemas, queries, and migrations.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/billyfranklim1/claude-skills --skill sql-toolkit-billyfranklim1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-toolkit
Source: https://github.com/billyfranklim1/claude-skills/tree/main/plugins/sql-toolkit/skills/sql-toolkit
Command: npx skills add https://github.com/billyfranklim1/claude-skills --skill sql-toolkit-billyfranklim1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces the time and risk involved in designing schemas, writing complex queries, creating migrations, and diagnosing slow relational database performance across common engines.

Core Features & Use Cases

  • Schema Design & Migrations: Patterns for primary keys, foreign keys, JSON columns, and migration best practices for MySQL, PostgreSQL, and SQLite.
  • Query Writing: Examples for joins, aggregations, window functions, and CTEs to implement robust reporting and analytics queries.
  • Performance Tuning: EXPLAIN guidance, index strategies (single, composite, covering), and troubleshooting steps for high-cardinality filters and ORDER BY/GROUP BY issues.
  • Operations & Recovery: CLI-oriented backup and restore commands, CSV import/export, and quick SQLite exploration for ad-hoc analysis.

Quick Start

Run a schema and query review for the orders and users tables and recommend indexes and EXPLAIN-based changes to improve slow queries.

Frequently Asked Questions about sql-toolkit

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using EXPLAIN analysis?

Optimize slow PostgreSQL queries by running EXPLAIN to review execution plans, then applying single, composite, or covering index strategies to reduce operational friction and improve high-cardinality filter performance.

What's the best way to design a relational database schema with migrations for MySQL?

Design MySQL schemas by applying patterns for primary keys, foreign keys, and JSON columns, then following migration best practices to reduce risk and operational friction during structural changes.

How do I write complex SQL queries for aggregations and reporting?

Write complex SQL queries for reporting by using joins, aggregations, window functions, and CTEs to implement robust analytics across SQLite, PostgreSQL, and MySQL databases.

Can I use CLI commands to backup and restore a SQLite database?

You can backup and restore SQLite databases using CLI-oriented commands, which also support CSV import/export and quick ad-hoc exploration analysis for operational recovery.

When should I use composite indexes to troubleshoot ORDER BY performance issues?

Use composite indexes to troubleshoot ORDER BY performance issues when EXPLAIN analysis reveals inefficient sorting on high-cardinality columns, applying targeted index strategies to reduce slow query execution.

Does this SQL optimization approach work across SQLite, PostgreSQL, and MySQL?

This SQL optimization approach works across SQLite, PostgreSQL, and MySQL, providing engine-specific schema design, EXPLAIN analysis, indexing, and migration guidance for each platform.