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.
git 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/commands/armanzeroeight/fastagent-plugins/analyze-query)<a href="https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/analyze-query"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/analyze-query/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/commands/armanzeroeight/fastagent-plugins/analyze-query"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/analyze-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00009 | $0.00906 |
| Opus 5.5 | $0.00004 | $0.00362 |
| Sonnet 5.5 | $0.00002 | $0.00181 |
| Haiku 4.5 | $0.00001 | $0.00091 |
Grade A, and why
analyze-query 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 1mo 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 — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze Query
Analyze SQL query execution plan and suggest optimizations.
Your Task
Analyze the provided SQL query and provide optimization recommendations.
Arguments
$1: SQL query (inline) or file path containing query
Steps
-
Parse the query:
- Identify SELECT, FROM, WHERE, JOIN, ORDER BY, GROUP BY clauses
- Note any subqueries or CTEs
- Check for functions on columns
-
Analyze query structure:
Check for common issues:
- SELECT * (fetching unnecessary columns)
- Missing WHERE clause (full table scan)
- Functions on indexed columns
- Correlated subqueries
- Large OFFSET values
- No LIMIT clause
-
Provide EXPLAIN command:
EXPLAIN ANALYZE [user's query];Instruct user to run this and share results.
-
Analyze execution plan (if provided):
Look for:
- Seq Scan (sequential scan - bad for large tables)
- Index Scan (good)
- Nested Loop (can be slow for large datasets)
- Hash Join (good for large datasets)
- Sort operations (expensive)
- High cost values
-
Recommend indexes:
Based on WHERE, JOIN, ORDER BY clauses:
-- For WHERE user_id = ? CREATE INDEX idx_table_user_id ON table_name(user_id); -- For WHERE user_id = ? AND created_at > ? CREATE INDEX idx_table_user_created ON table_name(user_id, created_at); -- For JOIN CREATE INDEX idx_table_foreign_key ON table_name(foreign_key_column); -
Suggest query rewrites:
*Replace SELECT :
-- Instead of SELECT * FROM users; -- Use SELECT id, name, email FROM users;Add LIMIT:
-- Instead of SELECT * FROM posts ORDER BY created_at DESC; -- Use SELECT * FROM posts ORDER BY created_at DESC LIMIT 20;Optimize subqueries:
-- Instead of SELECT * FROM users WHERE id IN (SELECT user_id FROM posts); -- Use SELECT DISTINCT u.* FROM users u JOIN posts p ON u.id = p.user_id;
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.
- 1mo ago First seen · 155 lines · 9 tokens per session scan A 74a101ae912b
analyze-query is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 2mo ago), licensed MIT. It adds 9 tokens to every session and 906 once invoked, about $0.0000 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.
Other commands, from other repositories
bigquery-cost-check
Audit a BigQuery SQL query or dbt model for potential cost traps before it hits production.
semantic-change-check
Audit changes to dbt Semantic Layer definitions for breaking changes and aggregation risks.
aidd-churn
Rank files by hotspot score to identify prime candidates for refactoring before PR review.
trace-regression
Investigate a newly introduced bug or regression to identify the offending change and formulate a fix.
resume-session
Load the most recent session file from /.claude/session-data/ and resume work with full context from where the last session ended.
flutter-build
Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes.