flux-query

Analyze SQL execution plans and generate index recommendations and rewritten queries.

69|8|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/tonone-ai/tonone --skill flux-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flux-query
Source: https://github.com/tonone-ai/tonone/tree/main/team/flux/skills/flux-query
Command: npx skills add https://github.com/tonone-ai/tonone --skill flux-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes slow database queries by analyzing execution plans, suggesting indexing strategies, and rewriting queries to improve performance.

Core Features & Use Cases

  • Analyze execution plans to identify bottlenecks in SQL or ORM-generated queries.
  • Recommend indexing strategies and provide CREATE INDEX statements to speed up lookups and joins.
  • Rewrite queries to reduce scanned rows and improve performance in common scenarios.

Quick Start

Provide a slow query and its EXPLAIN output to generate an optimized version and indexing recommendations.

Frequently Asked Questions about flux-query

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

FAQPage Schema
How do I speed up slow database queries using execution plans?

To speed up slow database queries, provide the query text and its EXPLAIN or EXPLAIN ANALYZE output to identify bottlenecks like missing indexes or full scans, which can then be resolved with indexing strategies and rewritten queries.

What is the best way to optimize inefficient joins in SQL?

The best way to optimize inefficient joins in SQL is to analyze the execution plan to pinpoint the bottleneck, apply suggested indexing strategies to speed up lookups, and rewrite the query to reduce the number of scanned rows.

Can I use query optimization for ORM-generated queries?

Yes, you can optimize ORM-generated queries by treating them as raw SQL, analyzing their execution plans to find bottlenecks like full scans, and applying index recommendations and rewritten queries to improve performance.

How do I create indexes to fix slow queries and full table scans?

To fix slow queries and full table scans, analyze the execution plan to identify missing indexes, then apply the recommended indexing strategies by executing the provided CREATE INDEX statements to speed up lookups and joins.

Why does my SQL query require EXPLAIN output for optimization?

Your SQL query requires EXPLAIN output because analyzing the execution plan is necessary to accurately identify performance bottlenecks like missing indexes and inefficient joins before generating index recommendations and rewritten queries.

Does this query optimizer work with all major database engines?

Yes, this query optimizer works with major database engines by analyzing execution plans and suggesting indexing strategies across various engines, provided you supply the query text and EXPLAIN or EXPLAIN ANALYZE outputs.