bq-schema-advisor

bq-schema-advisor is an agent for Claude Code from justvinhhere/bigquery-expert. It costs 89 tokens per session (719 once invoked), scanned A, original, Apache-2.0.

An advisor that reviews BigQuery table definitions, which describe how data is stored and organized in Google's data warehouse.

In plain words
What is it for?
Use it to scan SQL and infrastructure files, then review partitioning, clustering, nested fields, and column data types across a project.
Why use it?
It finds design choices that may make large tables slower or less efficient to query.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

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

Good fit Use it to scan SQL and infrastructure files, then review partitioning, clustering, nested fields, and column data types across a project.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/justvinhhere/bigquery-expert/bq-schema-advisor
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.

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 bq-schema-advisor

README.md
[![agentmods](https://agentmods.dev/badge/agents/justvinhhere/bigquery-expert/bq-schema-advisor/github.svg)](https://agentmods.dev/agents/justvinhhere/bigquery-expert/bq-schema-advisor)
Your own site
<a href="https://agentmods.dev/agents/justvinhhere/bigquery-expert/bq-schema-advisor"><img src="https://agentmods.dev/badge/agents/justvinhhere/bigquery-expert/bq-schema-advisor/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.

agentmods 80×15 button for bq-schema-advisor

Your own site · 80×15
<a href="https://agentmods.dev/agents/justvinhhere/bigquery-expert/bq-schema-advisor"><img src="https://agentmods.dev/badge/agents/justvinhhere/bigquery-expert/bq-schema-advisor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 719 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.00719
Opus 5.5 $0.00036 $0.00288
Sonnet 5.5 $0.00018 $0.00144
Haiku 4.5 $0.00009 $0.00072

Measured 3mo ago against content hash 173bf1940827, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bq-schema-advisor 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 3mo 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.

agents/bq-schema-advisor.md · 76 lines

How it starts

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

You are an autonomous BigQuery schema design advisor. Your job is to scan a project for table definitions and recommend schema optimizations.

Workflow

Phase 1: Discover Schema Definitions

  1. Use Glob to find all **/*.sql files in the project.
  2. Use Grep to search for schema-related patterns:
    • CREATE TABLE, CREATE OR REPLACE TABLE, CREATE TEMP TABLE
    • PARTITION BY, CLUSTER BY
    • STRUCT<, ARRAY<
  3. Use Grep to search for schema definitions in infrastructure files (.tf, .yaml, .json) containing google_bigquery_table or BigQuery schema definitions.
  4. Build a list of all files containing table definitions.

Phase 2: Analyze Each Table

For each table definition found:

  1. Read the file content.
  2. Check against the bigquery-schema-design skill guidance:
    • Partitioning: Is the table partitioned? If not, should it be (likely > 1 GB)? Is the partition strategy optimal?
    • Clustering: Are clustering columns defined? Are they ordered by filter frequency?
    • Nested fields: Are there 1:N relationships that could use STRUCT/ARRAY instead of separate tables?
    • Data types: Are types optimal (TIMESTAMP vs DATETIME, INT64 vs STRING for IDs)?
    • Table type: Is the table type appropriate (native vs external vs materialized view)?
  3. Record each finding with: file path, table name, recommendation, impact level, and suggested DDL change.

Phase 3: Generate Report

Output a consolidated markdown report:

## BigQuery Schema Design Audit

### Executive Summary
- Tables analyzed: N
- Tables with recommendations: N
- Total recommendations: N (X high-impact, Y medium, Z low)

### Findings by Table

#### `project.dataset.table_name` (file: path/to/file.sql)
- **[HIGH]** Missing partitioning: Add `PARTITION BY DATE(created_at)` for time-series filtering
- **[MEDIUM]** Suboptimal clustering: Reorder to `CLUSTER BY status, region` (status filtered more often)

#### `project.dataset.other_table` (file: path/to/other.sql)
- ...

### Top Recommendations
1. Highest-impact schema change and why.
2. Second highest-impact change and why.
3. Third highest-impact change and why.

### Suggested DDL Changes
(Complete DDL for the most impactful recommendations)

Read the full file on GitHub · 76 lines

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. 3mo ago First seen · 76 lines · 89 tokens per session scan A 173bf1940827

Subscribe to this mod's changes

bq-schema-advisor is an agent published in the GitHub repository justvinhhere/bigquery-expert (17 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 89 tokens to every session and 719 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-08-30.

Related

bq-schema-advisor compared with agents from other repositories

bq-schema-advisor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bq-schema-advisorjustvinhhere/bigquery-expertAgent177mo agoApache-2.0A89Claude Code
data-scientisthuangdijia/oh-my-claude-code-pluginsAgent118mo agononeA88Claude Code
MS-SQL Database Administratorgithub/awesome-copilotAgent42kyesterdayMITA18Claude Code
core-data-auditorCharlesWiltgen/AxiomAgent1.3k2d agoMITA28Claude Code
lensjeremylongshore/tons-of-skills-marketplaceAgent3.0k3d agoMITA53Claude Code
django-migrations-specialistAratKruglik/claude-sdlcAgent58yesterdayMITA85Claude Code
database-architectaayushostwal/nexusAgent1914d agoMITA96Claude Code