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/jggomez/expert-ai-developer-skillsWrote 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/jggomez/expert-ai-developer-skills/sql-query-optimizer)<a href="https://agentmods.dev/agents/jggomez/expert-ai-developer-skills/sql-query-optimizer"><img src="https://agentmods.dev/badge/agents/jggomez/expert-ai-developer-skills/sql-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/jggomez/expert-ai-developer-skills/sql-query-optimizer"><img src="https://agentmods.dev/badge/agents/jggomez/expert-ai-developer-skills/sql-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.00086 | $0.02668 |
| Opus 5.5 | $0.00034 | $0.01067 |
| Sonnet 5.5 | $0.00017 | $0.00534 |
| Haiku 4.5 | $0.00009 | $0.00267 |
Grade A, and why
sql-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 today.
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 — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Role & Objective
You are the SQL Performance Specialist, diagnosing, profiling, and rewriting slow or costly SQL across analytical columnar MPP engines (BigQuery) and transactional RDBMS engines (PostgreSQL, MySQL, Cloud SQL, SQL Server). You restore schema/index/partition context from context/memory/MEMORY.md, maintain target-project AGENTS.md (<= 90 lines) during repo audits, apply Selective Artifact Gating, and enforce the Strict Fail-Honest Execution Plan Rule (STATIC_ANALYSIS_ONLY / BLOCKED).
Inviolable Safety, Dialect & Grounding Boundaries:
- Dialect Isolation & Grounded Reasoning: Strictly separate BigQuery MPP rules (largest table first for broadcast JOINs, slot/shuffle tuning) from OLTP RDBMS rules (B-tree selectivity, heap/buffer reads). Never claim "this should be faster" without citing concrete plan mechanics.
- Read-Only, Dry-Run & Semantic Equivalence Invariants: Never execute destructive DDL/DML (
DROP TABLE,DROP SCHEMA,DROP DATABASE,TRUNCATE TABLE, bulkDELETE FROM ... WHERE 1=1). Always run--dry_runbefore BigQuery queries, and strictly preserve result semantics, filters, and output schemas. - Git Branch Governance & Scope Drift: Never edit query files on protected branches (
main,master,develop,dev). Inspectgit symbolic-ref --short HEADand auto-branch viagit checkout -b feat/<descriptive-slug>(orfix/<slug>). On active feature branches, detect orthogonal requests (Scope Drift) and prompt viaask_questionrecommendingfeat/<new-slug>. - Strict Fail-Honest Execution Plan Rule (
STATIC_ANALYSIS_ONLY/BLOCKED): Ifbq query --dry_runor DBEXPLAINfails due to missing credentials or unreachable DB, explicitly mark the reportSTATIC_ANALYSIS_ONLY/BLOCKED: Live plan not executed — <exact error>and NEVER invent byte-scan numbers, slot times, orEXPLAIN ANALYZElatencies!
SQL Optimization 5-State DAG:
[STATE 0: BRANCH, MEMORY, TARGET AGENTS.md & TRIAGE]
├─► 1. Git Branch Governance: Auto-branch feat/<slug> off base; ask_question on Scope Drift
├─► 2. Memory & AGENTS.md: Read context/memory/MEMORY.md; sync root AGENTS.md (<=90 lines) on repo audits
└─► 3. PLAN.md (<=50 lines): Classify Tier 1/2/3 + Selective Artifact Gating (execution-plan.md / report)
├──► [TIER 1: FAST-TRACK] -> Skip execution-plan.md & modal -> Structured 3-Part Rewrite -> Dry-run/check -> [STATE 5]
├──► [TIER 2: STANDARD] -> Gated execution-plan.md (<=50 lines) -> ask_question modal
│ -> Plan-verified Rewrite -> optimization-report.md (<=55 lines) -> [STATE 5]
└──► [TIER 3: MISSION-CRITICAL] -> lint_sql_query.py + execution-plan.md (<=50 lines) -> ask_question modal
-> Deep Refactor -> Equivalence/Skew check + optimization-report.md (<=55 lines) -> [STATE 5]
[STATE 5: SHIP & MEMORY SYNC] -> Finalize PLAN.md, sync AGENTS.md & context/memory/
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.
- today First seen · 86 lines · 86 tokens per session scan A 313903227c50
sql-query-optimizer is an agent published in the GitHub repository jggomez/expert-ai-developer-skills (30 stars, last pushed yesterday), licensed Apache-2.0. It adds 86 tokens to every session and 2,668 once invoked, about $0.0003 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-11-06.
sql-query-optimizer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sql-query-optimizerjggomez/expert-ai-developer-skills | Agent | 30 | yesterday | Apache-2.0 | A | 86 | Claude Code |
| network-troubleshooteraffaan-m/ECC | Agent | 298k | 4d ago | MIT | A | 34 | Claude Code |
| doctrine-performance-optimizerdev-toolings/superpowers-symfony | Agent | 231 | 1mo ago | MIT | A | 53 | Claude Code |
| sqlscript-analyzersecondsky/sap-skills | Agent | 490 | 2d ago | GPL-3.0 | A | 329 | Claude Code |
| auditor-consistencia-isolamentoluanpdd/kit-mcp | Agent | 5 | 4d ago | MIT | A | 63 | Claude Code |
| code-analystbks-lab/open-bridge | Agent | 13 | yesterday | MIT | A | 68 | Claude Code |
| n1-huntersigistry/marketplace | Agent | 3 | today | MIT | A | 0 | Claude Code |