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 agentmods add commands/armanzeroeight/fastagent-plugins/analyze-querygit clone --depth 1 https://github.com/armanzeroeight/fastagent-pluginsWhat 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 | $0.00009 | $0.00906 |
| Opus 5 | $0.00005 | $0.00453 |
| Sonnet 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 2d 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.
- 2d 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 1mo ago), licensed MIT. It adds 9 tokens to every session and 906 once invoked, about $0.0000 per session on Opus 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
end-session
Wrap up the work session with read-only evidence gathering, owner-classified documentation handoffs, gated issue sync, Kano refinement, and git hygiene checks.
test-feature
Test a React Native feature on the running simulator/emulator. Verifies UI, user flows, and internal state. Generates a persistent Maestro test file.
aidd-churn
Rank files by hotspot score to identify prime candidates for refactoring before PR review.
aidd-parallel
Generate /aidd-fix delegation prompts for a list of tasks and optionally dispatch them to sub-agents in dependency order.
aidd-pr
Review a PR, resolve addressed comments, and generate /aidd-fix delegation prompts for remaining issues.
OPSX: Sync
Sync delta specs from a change to main specs.