Skip to main content
skill CX Codex

sql-query-optimizer · jeremylongshore — Claude Code skill for SQL query tuning

A skill that walks through SQL query optimization and writes the code for you. It turns on by itself when your prompt mentions sql query optimizer, sql optimizer, or just sql.

MIT 1 installs ★ 2,935 updated 2026-11-01

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jeremylongshore/tons-of-skills-marketplace --skill sql-query-optimizer -a claude-code
Open on GitHub

What sql-query-optimizer does

The skill gives step-by-step guidance for tuning SQL queries and generates code you can put into production. It follows common practices and checks the output against typical standards.

It belongs to the Data Analytics category, so it also covers sql queries, data visualization, statistical analysis, and business intelligence. You do not call it explicitly: mentioning sql query optimizer in a request is enough to trigger it.

Allowed tools are Read, Write, Edit, Bash(cmd:*), and Grep. You need a configured development environment and access to whatever tools you work with. The skill targets Claude Code, but installs into Codex, Cursor, Copilot, Gemini CLI, and OpenCode too.

What it helps with

  • Pick apart a slow SQL query and find what holds it back
  • Get a step-by-step optimization plan
  • Generate production-ready SQL and configuration code
  • Check queries against standard validation rules
  • Pull data analytics help without leaving the agent

Example prompts for the agent

  • Help me optimize this SQL query: SELECT ... FROM ...
  • Look at this query and suggest how to make it run faster
  • Check this SQL against common best practices

How to install sql-query-optimizer

1Skills CLI (Vercel)

npx skills add jeremylongshore/tons-of-skills-marketplace --skill sql-query-optimizer -a claude-code

2Manually: put the files in place

~/.claude/skills/sql-query-optimizer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sql-query-optimizer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sql-query-optimizer

How do I install sql-query-optimizer in Claude Code?

Run npx skills add jeremylongshore/tons-of-skills-marketplace --skill sql-query-optimizer -a claude-code. The skill lands in ~/.claude/skills/sql-query-optimizer/SKILL.md.

What does sql-query-optimizer do?

It gives step-by-step SQL optimization guidance, generates code and configurations, and validates results against common standards.

What tools does the skill have access to?

Read, Write, Edit, Bash(cmd:*), and Grep. It can read and write files, run commands, and search the project.

Source text

SKILL.md · MIT
---
name: sql-query-optimizer
description: 'Optimize sql query optimizer operations. Auto-activating skill for Data
  Analytics.

  Triggers on: sql query optimizer, sql query optimizer

  Part of the Data Analytics skill category. Use when working with sql query optimizer
  functionality. Trigger with phrases like "sql query optimizer", "sql optimizer",
  "sql".

  '
allowed-tools: Read, Write, Edit, Bash(cmd:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
tags:
- data
- analytics
compatibility: Designed for Claude Code
---
# Sql Query Optimizer

## Overview

This skill provides automated assistance for sql query optimizer tasks within the Data Analytics domain.

## When to Use

This skill activates automatically when you:
- Mention "sql query optimizer" in your request
- Ask about sql query optimizer patterns or best practices
- Need help with data analytics skills covering sql queries, data visualization, statistical analysis, and business intelligence.

## Instructions

1. Provides step-by-step guidance for sql query optimizer
2. Follows industry best practices and patterns
3. Generates production-ready code and configurations
4. Validates outputs against common standards

## Examples

**Example: Basic Usage**
Request: "Help me with sql query optimizer"
Result: Provides step-by-step guidance and generates appropriate configurations


## Prerequisites

- Relevant development environment configured
- Access to necessary tools and services
- Basic understanding of data analytics concepts


## Output

- Generated configurations and code
- Best practice recommendations
- Validation results


## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| Configuration invalid | Missing required fields | Check documentation for required parameters |
| Tool not found | Dependency not installed | Install required tools per prerequisites |
| Permission denied | Insufficient access | Verify credentials and permissions |


## Resources

- Official documentation for related tools
- Best practices guides
- Community examples and tutorials

## Related Skills

Part of the **Data Analytics** skill category.
Tags: sql, analytics, visualization, statistics, bi

© Jeremy Longshore · MIT · jeremylongshore/tons-of-skills-marketplace

Similar skills

All skills for Data and databases →

sql-query-optimizer by other authors comes first.

sql-query-optimizer patricio0312rev The sql-query-optimizer skill inspects SQL execution plans, suggests indexes, and rewrites queries. Use it when slow database queries need a concrete diagnosis. CX Codex +1 297installs sql-query-optimization aj-geddes sql-query-optimization is a Claude Code skill that analyzes slow SQL queries and suggests faster rewrites for PostgreSQL and MySQL. CX Codex +1 529installs sql-expert PCL Team sql-expert — a skill for expert SQL work: schema design, efficient queries, index optimization, and administration across PostgreSQL, MySQL, and SQL Server. CX Codex +1 1installs query-optimizer rohitg00 query-optimizer optimizes SQL queries and analyzes database execution plans. Runs when tuning slow queries or inspecting execution bottlenecks. ★ 2,858repo stars mongodb-query-optimizer mongodb mongodb-query-optimizer — a skill for analyzing slow MongoDB queries and recommending indexes. Works on Claude Code, Codex, Cursor, GitHub Copilot and more. Activates when you ask why a query is slow or how to speed it up. CX Codex +1 7,700installs sql-optimization-patterns Seth Hobson The sql-optimization-patterns skill helps inspect slow SQL, EXPLAIN plans, and index choices. Use it when a query scans too much data, JOINs poorly, or causes N+1 calls. CX Codex +1 19,717installs sql-pro https://github.com/Jeffallan sql-pro optimizes slow SQL queries, designs database schemas, and fixes performance bottlenecks. Built for EXPLAIN plan tuning and cross-dialect migrations. CX Codex +1 6,900installs

From the same set139

The whole set →
granola-core-workflow-a granola-core-workflow-a configures meeting templates, chat recipes, and pre-call context inside Granola. Helps structure agendas and summaries for standups and customer calls. CX Codex +1 1installs monitoring-cross-chain-bridges monitoring-cross-chain-bridges tracks bridge TVL, volume, fees, and transfer status across networks. Use it to compare routes or inspect a cross-chain transaction. CX Codex +1 1installs vercel-cost-tuning vercel-cost-tuning reads Vercel billing and finds where money leaks: function time, bandwidth, middleware calls. Use it before the next invoice. CX Codex +1 1installs linear-cost-tuning linear-cost-tuning analyzes Linear API consumption, trims GraphQL query complexity, and shifts redundant polling loops to push webhooks. CX Codex +1 1installs linear-prod-checklist linear-prod-checklist audits a Linear integration before launch, covering access, data, quotas, webhooks, recovery, and ownership. CX Codex +1 1installs linear-observability linear-observability collects metrics and alerts around a Linear integration: API calls, webhooks, queue, reconciliation. Tokens and issue text stay out of telemetry. CX Codex +1 1installs supabase-webhooks-events supabase-webhooks-events guides the setup of Supabase database webhooks, pg_net HTTP triggers, LISTEN/NOTIFY, and Edge Function handlers with HMAC signature verification. CX Codex +1 1installs supabase-cost-tuning The supabase-cost-tuning skill audits Supabase spending and points to waste in the database, storage, connections, and Edge Functions. CX Codex +1 1installs

Project sponsors

Companies that keep this analytics open