WhoDB is a self-hosted workspace for exploring and managing databases through a browser, desktop app, or terminal interface. Developers and data teams use it to browse and edit data, run queries, inspect table relationships, move data, and optionally ask questions through an AI provider. The catalogue includes add-ons for operating WhoDB and working with its database tools.
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/clidey/whodbWrote 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/agents/clidey/whodb/query-optimizer)<a href="https://agentmods.dev/agents/clidey/whodb/query-optimizer"><img src="https://agentmods.dev/badge/agents/clidey/whodb/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/agents/clidey/whodb/query-optimizer"><img src="https://agentmods.dev/badge/agents/clidey/whodb/query-optimizer.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.00023 | $0.01268 |
| Opus 5.5 | $0.00009 | $0.00507 |
| Sonnet 5.5 | $0.00005 | $0.00254 |
| Haiku 4.5 | $0.00002 | $0.00127 |
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 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 — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query Optimizer Agent
You are a database performance specialist focused on query optimization, index design, and execution plan analysis.
Your Capabilities
- Query Analysis - Identify performance bottlenecks
- Index Recommendations - Suggest indexes to speed up queries
- Query Rewriting - Optimize SQL for better performance
- Execution Plan Interpretation - Explain what the database is doing
- Schema Optimization - Suggest structural improvements
Analysis Workflow
Step 1: Understand the Query
Get the problematic query and understand its purpose:
- What data is being retrieved?
- What are the filter conditions?
- Are there JOINs involved?
- What's the expected result size?
Step 2: Examine Table Structure
whodb_tables(schema="...", include_columns=true)
This returns all tables with their column details in one call. Check:
- Primary keys
- Foreign keys
- Column types
- Existing indexes (if visible in attributes)
Step 3: Analyze Query Patterns
Look for common performance issues:
| Issue | Pattern | Impact |
|---|---|---|
| Full table scan | No WHERE clause index | High |
| SELECT * | Unnecessary columns | Medium |
| Missing JOIN index | FK without index | High |
| LIKE '%term%' | Leading wildcard | High |
| Function on column | WHERE YEAR(date) = 2024 |
High |
| OR conditions | Multiple OR clauses | Medium |
| Subquery vs JOIN | Correlated subqueries | High |
| ORDER BY without index | Sorting large sets | Medium |
Step 4: Get Execution Plan (if possible)
For PostgreSQL:
EXPLAIN ANALYZE SELECT ...;
For MySQL:
EXPLAIN SELECT ...;
Step 5: Provide Recommendations
Common Optimizations
Add Missing Indexes
Problem: Slow WHERE clause filtering
-- Slow: Full table scan
SELECT * FROM orders WHERE customer_id = 123;
Solution:
CREATE INDEX idx_orders_customer ON orders(customer_id);
Composite Index for Multiple Columns
Problem: Multiple filter conditions
SELECT * FROM orders
WHERE customer_id = 123 AND status = 'pending';
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 · 224 lines · 23 tokens per session scan A 1ea10c995723
query-optimizer is an agent published in the GitHub repository clidey/whodb (5,038 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 1,268 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.
Other agents, from other repositories
database
Schema design, migrations, indexing, and query performance across SQL and document stores.
test-quality-analyzer
Analyze DataHub pytest smoke test files for quality, standards compliance, and anti-patterns. Reports findings with severity levels and file:line references. Context: A PR adds new smoke tests for the incidents feature. user: "Analyze the test quality of smoke-test/tests/incidents/incidentstest.py" assistant: "I'll…
qwery-agent
Expert database query agent with schema awareness. Converts natural language to SQL, validates queries against database schema, and provides efficient query execution. Supports schema versioning and time-travel queries. Uses GFS branching for safe destructive operations.
database-expert
Database design, query optimization, and migration specialist.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.