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 jggomez/expert-ai-developer-skills --skill bigquery-query-optimizationgit 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/skills/jggomez/expert-ai-developer-skills/bigquery-query-optimization)<a href="https://agentmods.dev/skills/jggomez/expert-ai-developer-skills/bigquery-query-optimization"><img src="https://agentmods.dev/badge/skills/jggomez/expert-ai-developer-skills/bigquery-query-optimization/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/jggomez/expert-ai-developer-skills/bigquery-query-optimization"><img src="https://agentmods.dev/badge/skills/jggomez/expert-ai-developer-skills/bigquery-query-optimization.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.00088 | $0.01212 |
| Opus 5.5 | $0.00035 | $0.00485 |
| Sonnet 5.5 | $0.00018 | $0.00242 |
| Haiku 4.5 | $0.00009 | $0.00121 |
Grade A, and why
bigquery-query-optimization 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 — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BigQuery Query Optimization Skill
Overview
Diagnoses and optimizes slow, expensive, or slot-constrained Google Cloud BigQuery SQL under the principle: less work → faster query. Reduces scanned bytes, stage shuffle, and slot CPU via partition/cluster pruning, broadcast JOIN ordering, and native SQL functions while enforcing concise artifact caps and fail-honest --dry_run reporting.
When to Use
Trigger Scenarios
- BigQuery queries hitting high byte scans, excessive slot time, shuffle bottlenecks, worker skew, or
Resources Exceeded. - Optimizing partition pruning, cluster filter alignment, and multi-table JOIN/window patterns.
- Scanning repositories (
.sql,.py,.js,.ts,.java,.go) for BigQuery SQL anti-patterns.
When NOT to Use
- Traditional OLTP databases (PostgreSQL, MySQL, SQL Server): Route to
sql-query-optimization. - Lakehouse architecture & service selection: Route to
gcp-data-engineering. - Datastream CDC & SCD Type 2 merges: Route to
cdc-scd-patterns.
Process
Phase 1: Static Linting & Fail-Honest Plan Diagnostics
- Static Scan: Run
python3 ./skills/bigquery-query-optimization/scripts/lint_sql_query.py [optional_path]across target directories. - Stage & Dry-Run Inspection: Check
bq query --use_legacy_sql=false --dry_runandINFORMATION_SCHEMA.JOBSfor max-vs-avg worker skew (APPROX_TOP_COUNT), intermediate shuffle volume, and CPU-heavy UDFs/distincts. - Fail-Honest Fallback (
STATIC_ANALYSIS_ONLY/BLOCKED): Ifbq query --dry_runfails due to missing GCP ADC credentials or permissions, explicitly mark the reportSTATIC_ANALYSIS_ONLY/BLOCKED: Live plan not executed — <exact error>and NEVER invent byte-scan numbers or slot times.
Phase 2: BigQuery Optimization Rules
- Column, Partition & Cluster Pruning: Replace
SELECT *with explicit columns; filter on partition columns and alignWHERE/JOINpredicates with clustered keys. - Broadcast JOIN Ordering & Early Filtering: Place the largest table first in
FROMfollowed by decreasing sizes; push filters into CTEs/subqueries before joining; model 1:N structures withARRAY<STRUCT>where appropriate. - Bounded Sorts, Approx Aggs & SQL UDFs: Always pair
ORDER BYwithLIMIT; useAPPROX_COUNT_DISTINCTwhen ~1% tolerance fits; replace JS UDFs with native SQL UDFs.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 60 lines · 88 tokens per session scan A 3b3573565ba3
bigquery-query-optimization is a skill published in the GitHub repository jggomez/expert-ai-developer-skills (30 stars, last pushed yesterday), licensed Apache-2.0. It adds 88 tokens to every session and 1,212 once invoked, about $0.0004 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.
bigquery-query-optimization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bigquery-query-optimizationjggomez/expert-ai-developer-skills | Skill | 30 | yesterday | Apache-2.0 | A | 88 | Claude Code, Codex |
| reproduce-buggoogleapis/mcp-toolbox | Skill | 17k | yesterday | Apache-2.0 | A | 130 | Claude Code, Codex |
| triage-issuesgoogleapis/mcp-toolbox | Skill | 17k | yesterday | Apache-2.0 | A | 164 | Claude Code, Codex |
| postgresql-indexingprowler-cloud/prowler | Skill | 15k | yesterday | Apache-2.0 | A | 108 | Claude Code |
| graphjin-evaldosco/graphjin | Skill | 3.2k | 5d ago | Apache-2.0 | A | 27 | Claude Code, Codex |
| axiom-audit-grdb-performanceCharlesWiltgen/Axiom | Skill | 1.3k | yesterday | MIT | A | 43 | Codex |
| django-perf-reviewgetsentry/skills | Skill | 1.1k | yesterday | Apache-2.0 | A | 55 | Claude Code |