Query Optimization
seb1n/awesome-ai-agent-skills
Diagnose and optimize existing slow SQL queries using execution plans, indexing strategies, query rewriting, and ORM tuning.
Optimize slow database queries — analyze execution plans, add indexes, rewrite queries.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-query --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .claude/skills/flux-query && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .claude/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-queryType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-query --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .agents/skills/flux-query && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .agents/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-query --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .cursor/skills/flux-query && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .cursor/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path plugins/ai-agency/tonone/skills/flux-query--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-query --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .gemini/skills/flux-query && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .gemini/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-queryInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .github/skills/flux-query && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .github/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace flux-query --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/ai-agency/tonone/skills/flux-query .opencode/skills/flux-query && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "flux-query" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/plugins/ai-agency/tonone/skills/flux-query into .opencode/skills/flux-query/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "flux-query", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
flux-queryOptimize slow database queries — analyze execution plans, add indexes, rewrite queries.
Flux Query is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize slow database queries — analyze execution plans, add indexes, rewrite queries. Use when asked about "slow query", "optimize SQL", "query performance", or "explain this query".
Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `.claude-plugin/plugin.json`).
It sits in Databases, covering Query optimization, SQL and ORMs and data access. It works with SQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditBashGlobGrepWebFetchWebSearchTaskTodoWrite…and 1 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Flux Query loads about 810 tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 355 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestionAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 355 words, ~810 tokens.
.claude/skills/flux-query/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.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.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in plugins/ai-agency/tonone/skills/flux-query of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Flux Query next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Flux Query this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~810 | Automated safety check: Notes | MIT | |
| Query Optimizationseb1n/awesome-ai-agent-skills | 206 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Dsqlawslabs/agent-plugins | 916 | — | ~7.1k | Automated safety check: Pass | Apache-2.0 | |
| Postgresdbericrisco/rsc-harness | 180 | — | ~4.4k | Automated safety check: Pass | MIT | |
| SQL ToolkitLeoYeAI/openclaw-master-skills | 2.2k | — | ~3k | Automated safety check: Pass | MIT | |
| Django Query Plan Readinghashgraph-online/awesome-codex-plugins | 1.3k | — | ~660 | Automated safety check: Pass | MIT |
seb1n/awesome-ai-agent-skills
Diagnose and optimize existing slow SQL queries using execution plans, indexing strategies, query rewriting, and ORM tuning.
awslabs/agent-plugins
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed…
ericrisco/rsc-harness
A skill your agent uses when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles…
LeoYeAI/openclaw-master-skills
Query, design, migrate, and optimize SQL databases. An agent skill from LeoYeAI/openclaw-master-skills.
hashgraph-online/awesome-codex-plugins
Read and compare Django/PostgreSQL query execution plans using QuerySet.explain(), EXPLAIN, EXPLAIN ANALYZE, scan types, joins, estimates, actual timing, buffers, and row counts.
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Optimize slow database queries — analyze execution plans, add indexes, rewrite queries. Flux Query is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize slow database queries — analyze execution plans, add indexes, rewrite queries.
Flux Query fits situations like: asked about slow query; query performance; explain this query.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a claude-code`. Or copy the skill folder (plugins/ai-agency/tonone/skills/flux-query in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/flux-query in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a codex`. Or copy the skill folder (plugins/ai-agency/tonone/skills/flux-query in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/flux-query in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill flux-query -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flux-query, .gemini/skills/flux-query, .github/skills/flux-query and .opencode/skills/flux-query in your project.
SKILL.md names no scripts, command-line tools or credentials: Flux Query is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Flux Query is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 810 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Flux Query: Query Optimization (seb1n/awesome-ai-agent-skills, 206 stars), Dsql (awslabs/agent-plugins, 916 stars), Postgresdb (ericrisco/rsc-harness, 180 stars) and SQL Toolkit (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.
Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.