Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add armanzeroeight/fastagent-plugins --skill query-optimizergit clone --depth 1 https://github.com/armanzeroeight/fastagent-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/armanzeroeight/fastagent-plugins/query-optimizer)<a href="https://agentmods.dev/skills/armanzeroeight/fastagent-plugins/query-optimizer"><img src="https://agentmods.dev/badge/skills/armanzeroeight/fastagent-plugins/query-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/armanzeroeight/fastagent-plugins/query-optimizer"><img src="https://agentmods.dev/badge/skills/armanzeroeight/fastagent-plugins/query-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00036 | $0.02215 |
| Opus 5.5 | $0.00014 | $0.00886 |
| Sonnet 5.5 | $0.00007 | $0.00443 |
| Haiku 4.5 | $0.00004 | $0.00221 |
Grade A, and why
query-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 435 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query Optimizer
Optimize SQL queries for better performance through indexing, rewriting, and analysis.
Quick Start
Use EXPLAIN to analyze queries, add indexes on WHERE/JOIN columns, avoid SELECT *, limit results.
Instructions
Query Analysis with EXPLAIN
Basic EXPLAIN:
EXPLAIN SELECT * FROM users WHERE email = '[email protected]';
EXPLAIN ANALYZE (actual execution):
EXPLAIN ANALYZE SELECT * FROM users WHERE email = '[email protected]';
Key metrics to check:
- Seq Scan (bad) vs Index Scan (good)
- Rows: Estimated vs actual
- Cost: Lower is better
- Execution time
Common Performance Issues
1. Missing Indexes
Problem:
-- Seq Scan on users (cost=0.00..1234.56)
SELECT * FROM users WHERE email = '[email protected]';
Solution:
CREATE INDEX idx_users_email ON users(email);
-- Now: Index Scan using idx_users_email
**2. SELECT ***
Problem:
SELECT * FROM posts; -- Fetches all columns
Solution:
SELECT id, title, created_at FROM posts; -- Only needed columns
3. N+1 Queries
Problem:
-- Fetches posts
SELECT * FROM posts;
-- Then for each post:
SELECT * FROM users WHERE id = ?;
Solution:
-- Single query with JOIN
SELECT posts.*, users.name
FROM posts
JOIN users ON posts.user_id = users.id;
4. No LIMIT
Problem:
SELECT * FROM posts ORDER BY created_at DESC; -- Returns all rows
Solution:
SELECT * FROM posts ORDER BY created_at DESC LIMIT 20;
Indexing Strategies
Single column index:
CREATE INDEX idx_users_email ON users(email);
Composite index (order matters):
-- For: WHERE user_id = ? AND created_at > ?
CREATE INDEX idx_posts_user_created ON posts(user_id, created_at);
Covering index (includes all needed columns):
-- For: SELECT id, title FROM posts WHERE user_id = ?
CREATE INDEX idx_posts_user_id_title ON posts(user_id) INCLUDE (title);
Partial index (filtered):
CREATE INDEX idx_active_users ON users(email) WHERE is_active = true;
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 435 lines · 36 tokens per session scan A d16e23bac9c5
query-optimizer is a skill published in the GitHub repository armanzeroeight/fastagent-plugins (30 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 2,215 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
query-optimizer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| query-optimizerarmanzeroeight/fastagent-plugins | Skill | 30 | 4mo ago | MIT | A | 36 | Claude Code |
| bigquery-graphgoogle/adk-python | Skill | 22k | 2d ago | Apache-2.0 | A | 52 | Claude Code, Codex |
| bigquery-ai-mlgoogle/adk-python | Skill | 22k | 2d ago | Apache-2.0 | A | 131 | Claude Code, Codex |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | yesterday | MIT | A | 115 | Claude Code, Codex |
| dingtalk-ai-tablewecode-ai/Wegent | Skill | 895 | today | Apache-2.0 | A | 36 | Claude Code, Codex |
| sql-styleeverruns/everruns | Skill | 72 | today | MIT | A | 17 | Claude Code, Codex |
| database-operationsmetaspartan/cybara | Skill | 41 | 6d ago | MIT | A | 22 | Claude Code, Codex |