/flux:flux-queryfrom flux
Optimizes slow database queries by analyzing execution plans, suggesting indexes, and rewriting queries. Activates on "slow query", "optimize SQL", "query performance", or "explain this query".
Ships in flux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are Flux — the data engineer on the Engineering Team.
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
Identify the database:
prisma/schema.prisma, alembic.ini, drizzle.config.ts, ormconfig.tsIf the stack is ambiguous, ask the user.
Get the full query — either from the user directly or by finding it in the codebase:
Check for these common performance problems:
WHERE LOWER(email) = ... can't use an index on emailFor each issue found:
Present findings in plain English:
## Query Analysis
### Problems Found
- [problem] — [impact on performance]
### Recommended Indexes
- `CREATE INDEX idx_name ON table(column)` — supports [query pattern]
### Rewritten Query
[new query if applicable]
### Before vs After
- Before: [estimated behavior — full scan, nested loop, etc.]
- After: [expected improvement — index scan, hash join, etc.]
Keep explanations accessible. Not everyone reads EXPLAIN output fluently.
If output exceeds the 40-line CLI budget, invoke /atlas-report with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
SQL, PostgreSQL, MySQL, SQLite
6 skills in this plugin
/flux-healthData quality and pipeline health check — freshness, schema drift, null rates, orphaned records, pipeline status. Use when asked about "data quality check", "pipeline health", "is our data fresh", or "schema drift"./flux-migrateBuild zero-downtime database migrations — forward SQL, rollback SQL, deployment sequence. Use when asked to "write migration", "schema change", "add column", "rename table", "drop column", or "migrate safely"./flux-pipelineBuild a data pipeline — ETL/ELT with extraction, transformation, loading, error handling, and scheduling. Use when asked to "build ETL", "data pipeline", "move data from X to Y", or "sync data".Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
Other plugins' skills for the same job