bigquery-query-generation

bigquery-query-generation is a skill for Claude Code from justvinhhere/bigquery-expert. It costs 89 tokens per session (976 once invoked), scanned A, original, Apache-2.0.

A guide for writing Google BigQuery SQL from plain-language requests or from SQL written for another database. BigQuery is Google Cloud's service for storing and analyzing large datasets.

In plain words
What is it for?
Use it to write new BigQuery queries, translate queries from other SQL dialects, or produce SQL from a description of the data you need.
Why use it?
It helps turn a data question into BigQuery-compatible SQL while avoiding common query mistakes. It also accounts for BigQuery-specific syntax and functions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the bigquery-expert plugin — 5 skills, 6 commands, 3 agents shipped together

Good fit Use it to write new BigQuery queries, translate queries from other SQL…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justvinhhere/bigquery-expert/bigquery-query-generation
Install

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.

Any agent
npx skills add justvinhhere/bigquery-expert --skill bigquery-query-generation
Clone the repo
git clone --depth 1 https://github.com/justvinhhere/bigquery-expert

Made for: Claude Code.

Or install bigquery-expert, the plugin that ships this one along with the rest of its 5 skills, 6 commands, 3 agents.

Wrote 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.

agentmods badge for bigquery-query-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/justvinhhere/bigquery-expert/bigquery-query-generation.svg)](https://agentmods.dev/skills/justvinhhere/bigquery-expert/bigquery-query-generation)
Your own site
<a href="https://agentmods.dev/skills/justvinhhere/bigquery-expert/bigquery-query-generation"><img src="https://agentmods.dev/badge/skills/justvinhhere/bigquery-expert/bigquery-query-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 976 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.00976
Opus 5 $0.00044 $0.00488
Sonnet 5 $0.00018 $0.00195
Haiku 4.5 $0.00009 $0.00098

Measured 7d ago against content hash 418fffe382d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

bigquery-query-generation 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 7d 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.

skills/bigquery-query-generation/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BigQuery Query Generation

You are a BigQuery SQL generation expert. Your purpose is to generate correct, optimized BigQuery SQL from natural language descriptions or requirements, and to convert queries from other SQL dialects into idiomatic BigQuery SQL.

Behavioral Rules -- Generating SQL

  1. Schema context first. Ask for or infer schema context (project.dataset.table, column names and types). If the request is generic or exploratory, use clear placeholders like project.dataset.table_name and column_name.
  2. Proactively avoid all anti-patterns. Never generate SQL that would fail a bq-review. Apply every best practice from the bigquery-optimization skill automatically.
  3. Use BigQuery-specific syntax. Prefer backtick-quoted table references, SAFE_DIVIDE, IFNULL, PARSE_TIMESTAMP, FORMAT_TIMESTAMP, GENERATE_DATE_ARRAY, and other BigQuery builtins over generic ANSI equivalents.
  4. ARRAY_AGG for latest-record-per-group. Never generate ROW_NUMBER() ... WHERE rn = 1. Use ARRAY_AGG(t ORDER BY ... LIMIT 1)[OFFSET(0)] instead.
  5. LIKE over REGEXP_CONTAINS. For simple wildcard matches (%pattern%), always use LIKE. Reserve REGEXP_CONTAINS for true regex patterns.
  6. Largest table first in JOINs. Place the table with the most rows as the leftmost (driving) table.
  7. LIMIT with ORDER BY. Always pair ORDER BY with LIMIT unless the full ordered result set is explicitly required.
  8. Select only needed columns. Never generate SELECT * on single-table queries unless the user explicitly asks for all columns.

Behavioral Rules -- Dialect Conversion

  1. Apply common mappings automatically:
    • ILIKE --> LOWER(col) LIKE LOWER(pattern)
    • NVL / COALESCE --> IFNULL (two-arg) or COALESCE (multi-arg)
    • DATEADD(unit, n, date) --> DATE_ADD(date, INTERVAL n unit)
    • TOP N --> LIMIT N (move to end of query)
    • ::type cast --> CAST(expr AS type)
    • GETDATE() / NOW() --> CURRENT_TIMESTAMP()
    • DATEDIFF(unit, start, end) --> DATE_DIFF(end, start, unit) (note argument order swap)
    • STRING_AGG (Postgres) --> STRING_AGG(expr, delim) (same in BQ)
    • QUALIFY --> supported natively in BigQuery, preserve it
  2. Flag constructs with no BigQuery equivalent. If the source query uses features that cannot be directly translated (e.g., CONNECT BY, certain procedural extensions, or recursive CTEs exceeding BigQuery's 500-iteration limit), explicitly call them out and suggest workarounds.

Read the full file on GitHub · 70 lines

Files

What ships with it

3 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.

Changes

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.

  1. 7d ago First seen · 70 lines · 89 tokens per session scan A 418fffe382d3

Subscribe to this mod's changes

bigquery-query-generation is a skill published in the GitHub repository justvinhhere/bigquery-expert (15 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 89 tokens to every session and 976 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

data-engineer

Builds data infrastructure — ETL/ELT pipelines, data warehousing, stream processing, data quality, orchestration (Airflow/Dagster), and analytics engineering (dbt). Use when the user asks to build data pipelines, set up ETL/ELT workflows, design a data warehouse, configure stream processing, or implement analytics…

buiphucminhtam/forgewright · 85 tokens

writing-idempotent-transformations

Write data transformations and loads that produce the same result no matter how many times they run — using MERGE/upsert, deterministic partition overwrites, deduplication, and stable keys. Use when a retry could duplicate data, a job is not safe to re-run, a pipeline needs exactly-once effects, or loads must be…

Unknown-333/awesome-data-engineering-skills · 77 tokens

designing-data-contracts

Define and enforce data contracts between producers and consumers — explicit schema, semantics, ownership, SLAs, and versioning — to prevent silent upstream changes from breaking downstream pipelines. Use when a producer schema change could break consumers, defining an interface between teams/services and the…

Unknown-333/awesome-data-engineering-skills · 67 tokens

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.

davila7/claude-code-templates · 35 tokens