bigquery-cost-optimization

bigquery-cost-optimization is a skill for Claude Code, Codex from justvinhhere/bigquery-expert. It costs 97 tokens per session (1,025 once invoked), scanned A, original, Apache-2.0.

A guide for reducing the cost of Google BigQuery, Google's service for analyzing large datasets. It covers query charges, processing capacity, storage, reservations, and cached results.

In plain words
What is it for?
Use it to review BigQuery pricing, bytes billed, slot usage, reservations, storage costs, streaming inserts, or query-cache behavior.
Why use it?
It helps determine which pricing model applies and identify ways to reduce billed data, compute use, or storage costs. The supplied prices are dated and should be verified before use.

Skill for Claude CodeCodex

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

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.

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

Made for: Claude Code, Codex.

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-cost-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/justvinhhere/bigquery-expert/bigquery-cost-optimization.svg)](https://agentmods.dev/skills/justvinhhere/bigquery-expert/bigquery-cost-optimization)
Your own site
<a href="https://agentmods.dev/skills/justvinhhere/bigquery-expert/bigquery-cost-optimization"><img src="https://agentmods.dev/badge/skills/justvinhhere/bigquery-expert/bigquery-cost-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00097 $0.01025
Opus 5 $0.00048 $0.00513
Sonnet 5 $0.00019 $0.00205
Haiku 4.5 $0.00010 $0.00103

Measured 5d ago against content hash c8c356f18228, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

bigquery-cost-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 5d 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-cost-optimization/SKILL.md · 99 lines

How it starts

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

BigQuery Cost Optimization

You are a BigQuery cost optimization expert. When you encounter BigQuery SQL or infrastructure questions, evaluate them against cost best practices documented in the references. When writing new SQL or advising on architecture, proactively minimize cost.

Pricing Quick Reference

Resource Price Notes
On-demand compute $6.25/TB First 1 TB/month free
Editions -- Standard $0.04/slot-hour Autoscale, no commitments required
Editions -- Enterprise $0.06/slot-hour Advanced features, 1-yr/3-yr commitments available
Editions -- Enterprise Plus $0.10/slot-hour 99.99% SLA, advanced DR, compliance
Active storage $0.02/GB/month Tables modified in last 90 days
Long-term storage $0.01/GB/month Auto-applied after 90 days unmodified
Streaming inserts $0.05/GB Per-row insertAll API

Prices as of 2025; verify at cloud.google.com/bigquery/pricing

Behavioral Rules

When Analyzing Costs

  1. Determine the pricing model first. On-demand and editions have fundamentally different optimization strategies. Ask if unknown.
  2. Calculate bytes billed, not bytes processed. Bytes billed accounts for minimum billing (10 MB) and caching. Use INFORMATION_SCHEMA.JOBS for actual figures.
  3. Prioritize cost reduction by impact. Focus on the largest line items first: compute > storage > streaming.
  4. Always mention --dry_run. Every query cost estimate should remind the user to validate with bq query --dry_run or the API equivalent before execution.

Cost Reduction Checklist

Compute Costs (On-Demand)

  • Eliminate SELECT * -- prune to needed columns
  • Add partition filters to every partitioned table reference
  • Use clustering keys in WHERE/ORDER BY clauses
  • Leverage cached results (identical queries within 24 hrs)
  • Use materialized views for repeated aggregations
  • Validate with --dry_run before running expensive queries

Read the full file on GitHub · 99 lines

Files

What ships with it

5 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. 5d ago First seen · 99 lines · 97 tokens per session scan A c8c356f18228

Subscribe to this mod's changes

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

sentence-transformers

Framework for state-of-the-art sentence, text, and image embeddings. Provides 5000+ pre-trained models for semantic similarity, clustering, and retrieval. Supports multilingual, domain-specific, and multimodal models. Use for generating embeddings for RAG, semantic search, or similarity tasks. Best for production…

davila7/claude-code-templates · 67 tokens

scanpy

Standard single-cell RNA-seq analysis pipeline. Use for QC, normalization, dimensionality reduction (PCA/UMAP/t-SNE), clustering, differential expression, and visualization. Best for exploratory scRNA-seq analysis with established workflows. For deep learning models use scvi-tools; for data format questions use…

synthetic-sciences/openscience · 68 tokens

agent-eval-workflow

This skill should be used when the user wants to evaluate an AI agent end-to-end: scaffold an evaluation, design metrics that test a real hypothesis, make an agent measurable, audit generated eval config, read evaluation results, or run an improvement ("hill climbing") loop. Covers evaluation methodology, metric…

GoogleCloudPlatform/professional-services · 123 tokens

agent-eval

Executes high-performance agent evaluations, multi-turn UserSim simulations, and declarative metric grading aligned with google/agents-cli and the Quality Flywheel. Publishes benchmark artifacts to the GCS Evaluation Registry, executes automated head-to-head delta comparisons (--compare-to), and optimizes system…

GoogleCloudPlatform/professional-services · 136 tokens

eval-breakdown

Performs an exhaustive, question-by-question narrative diagnostic breakdown of an agent-eval benchmark run by analyzing questionanswerlog.md, evalsummary.json, and raw trajectory traces. Use when diagnosing low score causes, investigating the Memory Reuse vs. Traceability rubric clash, performing pre-release failure…

GoogleCloudPlatform/professional-services · 100 tokens

data-parity

Validate that two tables or query results are identical — or diagnose exactly how they differ. Discover schema, identify keys, profile cheaply, then diff. Use for migration validation, ETL regression, and query refactor verification.

AltimateAI/altimate-code · 48 tokens