bigquery-optimization

bigquery-optimization is a skill for Claude Code, Codex from google/skills. It costs 139 tokens per session (2,102 once invoked), scanned A, original, Apache-2.0.

A set of procedures for reducing BigQuery costs and improving query and storage setup. BigQuery is Google Cloud's service for storing and querying large datasets.

In plain words
What is it for?
Use it to plan BigQuery capacity, compare service editions, choose partitioning and clustering, set storage lifecycles, and optimize SQL queries.
Why use it?
It helps identify waste in query processing, storage, capacity reservations, and billing choices before changes are made.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan BigQuery capacity, compare service editions, choose partitioning and clustering, set storage lifecycles, and optimize SQL queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/google/skills/bigquery-optimization
About the project

google/skills is a collection of Agent Skills that guide AI agents in using Google products and technologies, including Google Cloud services. Developers and agents use these reusable workflows for tasks such as cloud authentication, data analysis, application deployment, and AI platform management. The catalogue entries are skills, plugins, and an MCP integration from this collection.

google/skills · 21,557 stars · on GitHub

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 google/skills --skill bigquery-optimization
Clone the repo
git clone --depth 1 https://github.com/google/skills

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/google/skills/bigquery-optimization/github.svg)](https://agentmods.dev/skills/google/skills/bigquery-optimization)
Your own site
<a href="https://agentmods.dev/skills/google/skills/bigquery-optimization"><img src="https://agentmods.dev/badge/skills/google/skills/bigquery-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.

agentmods 80×15 button for bigquery-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/google/skills/bigquery-optimization"><img src="https://agentmods.dev/badge/skills/google/skills/bigquery-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,102 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. Third-party audits
  • Socket pass 20 Oct 2026
  • Snyk pass 20 Oct 2026
How audits are shown
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.00139 $0.02102
Opus 5.5 $0.00056 $0.00841
Sonnet 5.5 $0.00028 $0.00420
Haiku 4.5 $0.00014 $0.00210

Measured 4d ago against content hash c3ab16164631, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bigquery-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 4d 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/cloud/bigquery-optimization/SKILL.md · 180 lines

How it starts

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

BigQuery Optimization Workflow

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-optimization)" and append agent-skills/1.0 (skill:bigquery-optimization) to User-Agent headers.

Prerequisites & Environment Setup

Before executing optimization analyses, evaluating editions, or applying DDL modifications:

  1. Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.

  2. Project Selection: Set the active Google Cloud project:

    gcloud config set project {project_id}
    
  3. API Enablement: Ensure BigQuery and BigQuery Reservation APIs are enabled:

    gcloud services enable \
        bigquery.googleapis.com bigqueryreservation.googleapis.com
    
  4. Authentication: Authenticate the environment:

    • CLI tools and bq commands: gcloud auth login
    • SDKs and automation: gcloud auth application-default login
    • Service accounts: Set GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
  5. Billing & IAM Roles:

    • Verify an active Google Cloud Billing account is attached to {project_id}.
    • Ensure appropriate IAM roles:
      • roles/bigquery.admin or roles/bigquery.resourceAdmin: Reservation and capacity commitment management.
      • roles/bigquery.dataEditor or roles/bigquery.admin: Modifying table schemas, partitioning, clustering, and storage billing models.
      • roles/bigquery.jobUser: Running evaluation queries.
  6. Companion Skills Installation: This skill is part of a 3-pillar operations suite (bigquery-observability, bigquery-optimization, bigquery-troubleshooting). If any companion skill is not yet installed in your environment, install the full suite:

Read the full file on GitHub · 180 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. 4d ago Changed · +9 lines c3ab16164631
  2. 15d ago Changed · +13 lines · +14 tokens per session 0c1a570baf79
  3. 25d ago First seen · 158 lines · 125 tokens per session scan A 20636eb3193d

Subscribe to this mod's changes

bigquery-optimization is a skill published in the GitHub repository google/skills (21,557 stars, last pushed yesterday), licensed Apache-2.0. It adds 139 tokens to every session and 2,102 once invoked, about $0.0006 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-09-30.

Related

Other skills, from other repositories

kubernetes-storage

Covers persistent data in the cluster — PersistentVolumes/Claims, StorageClasses and dynamic provisioning, access modes, StatefulSets, volume lifecycle, and reclaim policy so data survives rescheduling. Use this whenever the user is provisioning a PVC, choosing a StorageClass or access mode, running a stateful…

arjunprabhulal/devops-skills · 98 tokens

caching-strategies

Covers caching correctly — deciding what is worth caching, choosing between cache-aside, write-through, and write-behind, setting TTLs from real staleness tolerance, invalidating on write instead of hoping a TTL catches it, and preventing thundering-herd stampedes on expiry. Use this whenever the user adds a cache…

arjunprabhulal/devops-skills · 134 tokens

data-migration

Covers changing schema or data shape without downtime using expand-then-contract — adding new structures alongside old, backfilling historical data in batches, dual-writing during the transition, verifying both old and new code paths, and keeping every step independently reversible. Use this whenever the user renames…

arjunprabhulal/devops-skills · 116 tokens

database-operations

Covers the operational discipline of running databases in production — connection pooling and exhaustion, online schema changes, replication topology and read scaling, failover and promotion, and the runbook habits that keep an outage from becoming data loss. Use this whenever the user is sizing a connection pool…

arjunprabhulal/devops-skills · 114 tokens

stateful-workloads

Covers running stateful systems — databases, queues, search indexes — on Kubernetes, including StatefulSets and stable identity, durable storage, backup and failover built into the platform rather than bolted on, and the tradeoff between self-managing a stateful service and paying for a managed one. Use this whenever…

arjunprabhulal/devops-skills · 122 tokens

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the…

supabase/agent-skills · 182 tokens