Official agent skill

Bigquery Optimization

by google in google/skills

Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries.

OfficialApache-2.0Auto-check passedDatabases

Install Bigquery Optimization

skills CLI
$ npx skills add google/skills --skill bigquery-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills bigquery-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/bigquery-optimization .claude/skills/bigquery-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bigquery-optimization
GitHub stars
21k
Token cost
~2k tokens
SKILL.md length
801 words
Files
6 (incl. references)
Skills in repo
145
Repo updated
First seen
Licence
Apache-2.0

At a glance

Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries.

  • Works in 6 steps: Google Cloud SDK: Ensure the → Project Selection: Set the active Google… → API Enablement: Ensure BigQuery and… → …
  • Optimizing cost
  • SKILL.md covers Prerequisites & Environment…, Workflows and Execution Guardrails
  • Calls gcloud; needs GOOGLE_APPLICATION_CREDENTIALS

What it does

Bigquery Optimization is an agent skill from google/skills, published by the product's own GitHub organization. Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries. Use when optimizing cost, modeling Edition migrations, rightsizing reservations, evaluating logical vs. physical storage, designing table partitioning/clustering, generating table DDL, migrating unpartitioned tables, managing partition expiration, or optimizing individual SQL queries. Do not use for raw usage reporting (use…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/capacity_planning_editions.md`, `references/sql_optimization.md` and `references/storage_billing_models.md`).

It sits in Databases, covering Data warehousing, SQL and Observability. It works with Google BigQuery, SQL and Google Cloud. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Optimizing cost
  • Modeling Edition migrations
  • Rightsizing reservations
  • Evaluating logical vs

Example prompts

  • “Use the bigquery-optimization skill to provide workflows to optimize BigQuery environments (capacity planning, editions), storage assets…”
  • “/bigquery-optimization”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Google Cloud SDK: Ensure the
  2. Project Selection: Set the active Google Cloud project
  3. API Enablement: Ensure BigQuery and BigQuery Reservation APIs are
  4. Authentication: Authenticate the environment
  5. Billing & IAM Roles
  6. Companion Skills Installation

What it can do on your machine

Read from SKILL.md and the folder at commit 8a1ac05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GOOGLE_APPLICATION_CREDENTIALS

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bigquery Optimization loads about 2k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 170 tokens; SKILL.md has 801 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~170
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 8a1ac05, republished under its Apache-2.0 licence (© google). 801 words, ~2,026 tokens.

Download SKILL.mdSave it as .claude/skills/bigquery-optimization/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
bigquery-optimization
description
Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries. Use when optimizing cost, modeling Edition migrations, rightsizing reservations, evaluating logical vs. physical storage, designing table partitioning/clustering, generating table DDL, migrating unpartitioned tables, managing partition expiration, or optimizing individual SQL queries. Do not use for raw usage reporting (use bigquery-observability), query execution plan analysis, error troubleshooting, or diagnosing why a specific job was slow (use bigquery-troubleshooting).
metadata.version
1.0.0
metadata.category
BigDataAndAnalytics

BigQuery Optimization Workflow

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:

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

    bash
    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:

    bash
    npx skills add google/skills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting

    (If bigquery-observability is not installed, use the self-contained baseline formulas and query templates provided directly in the reference sections below).

Workflows

Determine the optimization focus of the user's request and follow the relevant workflow:

  • Telemetry & Observability Baseline: For direct raw usage telemetry, INFORMATION_SCHEMA queries, and baseline metric calculations, consult bigquery-observability (bigquery_observability). If the bigquery-observability companion skill is not available in the active environment, all optimization guidelines, DDL templates, and decision models across this skill and its reference guides are fully self-contained.
  • Capacity & Editions Modeling: Evaluate the cost-efficiency of migrating workloads from On-Demand to Editions, as well as rightsizing active Edition reservations, baseline commitments, and autoscaling caps.
    • Instructions: Read references/capacity_planning_editions.md to provide deep links to BigQuery's built-in recommendation UIs (e.g., Slot Estimator) and guide the user through UI navigation: 1. navigate to the Slot Estimator tab, 2. select 'On-Demand' as the source to analyze historical query volume, and 3. review the Cost-Optimized Recommendations and Slot Usage Chart.
  • Table & Storage Optimization: Optimize storage costs from a billing model, physical layout, and lifecycle perspective.
    • Billing Architecture: Read references/storage_billing_models.md for guidance on evaluating aggregate compression ratios (e.g. >2:1 threshold in US) to recommend Physical vs. Logical billing, noting that the break-even ratio depends on specific regional rates and custom enterprise contracts. When providing TABLE_STORAGE queries, always scope with WHERE table_schema = '{dataset_id}', use the regional dataset view, and warn that 0 rows indicates a region mismatch or lack of native tables rather than zero billable usage.
    • Partitioning & Clustering Strategy: Read references/table_partitioning_clustering.md to generate production DDL templates (CREATE TABLE, CTAS migrations for unpartitioned tables, and modifying clustering specifications), enforce pruning with require_partition_filter = true, and manage partition limits (up to 10,000 partitions/table).
    • Lifecycle Management: Read references/storage_lifecycle_management.md to pinpoint inactive data and define precise Time-to-Live (TTL) partition expirations, dataset expirations, and Time Travel window reductions.
  • SQL Optimization: Optimize individual SQL queries to reduce slot-time and the amount of data read.
    • Instructions: Follow the instructions in references/sql_optimization.md to provide recommendations to the user on how to rewrite their SQL query to reduce slot-time and the amount of data read.
Show full SKILL.md (291 more words)Show less

Execution Guardrails

  • Terminology & Cost Framing: Never promise or guarantee "cost-reduction" or "reducing expenditure." Always frame recommendations using the terminology "optimizing your bill" or "improving cost-efficiency."
  • Explicit Scope Framing & Region Resolution: Always state the target project_id and region at the very top of your response so the user immediately knows the exact scope being evaluated. Follow this 3-tier resolution hierarchy:
    1. Explicit Region: Use the region specified in the user's prompt (e.g., europe-west1).
    2. Contextual Region: Resolve the region from the specific dataset or resource mentioned in the context.
    3. Unspecified Fallback: Default to us / region-us, explicitly state that us was assumed as the default, and instruct the user to substitute their region if their resources reside elsewhere. Region Formatting: In Cloud Console deep links, use the region identifier directly (e.g., region=us, region=europe-west1). In SQL queries against INFORMATION_SCHEMA, use the regional dataset qualifier (e.g., region-us, region-europe-west1).
  • Zero-Row Result Guard: If querying TABLE_STORAGE with WHERE table_schema = '{dataset_id}' returns 0 rows, do not proceed with an empty or zero-usage evaluation. Treat this as an indicator that the dataset may reside in a different region or have no native tables; stop and prompt the user to confirm the dataset's regional location.
  • Populate Concrete Parameters: When generating URLs and SQL queries, always substitute known project_id and region values directly into the code and links. Never leave literal {project_id} or {location} placeholders for the user to manually edit.
  • No Autonomous Purchasing or Financial Mutations: Never provide the user with executable scripts (e.g., gcloud or bq shell commands like bq update --storage_billing_model=...) designed to autonomously purchase annual commitments, alter edition tier bindings, or mutate storage billing models. Always guide the user to execute commitment purchases, reservation changes, and storage billing model updates manually via the Cloud Console UI.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/cloud/bigquery-optimization of google/skills.

  • SKILL.md
  • references/capacity_planning_editions.md
  • references/sql_optimization.md
  • references/storage_billing_models.md
  • references/storage_lifecycle_management.md
  • references/table_partitioning_clustering.md

Open the folder on GitHubat commit 8a1ac05

Compare with similar skills

Bigquery Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bigquery Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bigquery Optimization this skillgoogle/skills21k—~2kAutomated safety check: PassApache-2.0
Imaging Data CommonsK-Dense-AI/scientific-agent-skills48k1 repos~7.8kAutomated safety check: PassMIT
Cxas Configurable DashboardsGoogleCloudPlatform/cxas-scrapi106—~1.8kAutomated safety check: PassApache-2.0
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0
Analysis Artifactswarpdotdev/oz-skills825—~1.1kAutomated safety check: PassMIT
Bigquery Graphgoogle/adk-python22k—~4.8kAutomated safety check: PassApache-2.0

Similar skills

  • Imaging Data Commons

    K-Dense-AI/scientific-agent-skills

    Queries and downloads public cancer imaging data from NCI Imaging Data Commons.

    48k GitHub starsUsed in 1 repo~7.8k tokens
    DatabasesAuto-check passed
  • Cxas Configurable Dashboards

    GoogleCloudPlatform/cxas-scrapi

    Author, validate, and manage Contact Center AI (CCAI) Insights Configurable Dashboards.

    106 GitHub stars~1.8k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated today
    DatabasesAuto-check passed
  • Analysis Artifacts

    warpdotdev/oz-skills

    Generate reproducible analysis artifacts — SQL queries, Python visualizations, and summary tables — as you work through a BigQuery data analysis.

    825 GitHub stars~1.1k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Bigquery Graph

    google/adk-python

    Official

    Skill for Graph Query Language (GQL) or SQL/PGQ queries against a property graph.

    22k GitHub stars~4.8k tokensUpdated today
    DatabasesAuto-check passed
  • SQL Queries

    w95/awesome-claude-corporate-skills

    Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.).

    235 GitHub starsUsed in 3 repos~2.8k tokens
    DatabasesAuto-check passed

More from google/skills

All 145 skills in this repo
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Official

    Analyzes BigQuery slot use, query costs and execution bottlenecks from INFORMATION_SCHEMA to diagnose slow queries, slot contention and unpartitioned scans.

    21k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Bigquery Optimization

What does Bigquery Optimization do?

Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries. Bigquery Optimization is an agent skill from google/skills, published by the product's own GitHub organization. Provides workflows to optimize BigQuery environments (capacity planning, editions), storage assets (partitioning, clustering, storage lifecycles, billing models), and SQL queries.

When should I use Bigquery Optimization?

Bigquery Optimization fits situations like: optimizing cost; modeling Edition migrations; rightsizing reservations; evaluating logical vs.

How do I install Bigquery Optimization in Claude Code?

Run `npx skills add google/skills --skill bigquery-optimization -a claude-code`. Or copy the skill folder (skills/cloud/bigquery-optimization in google/skills) into .claude/skills/bigquery-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Bigquery Optimization in Codex?

Run `npx skills add google/skills --skill bigquery-optimization -a codex`. Or copy the skill folder (skills/cloud/bigquery-optimization in google/skills) into .agents/skills/bigquery-optimization in your project. Codex loads it when a task matches its description.

Can I use Bigquery Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill bigquery-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bigquery-optimization, .gemini/skills/bigquery-optimization, .github/skills/bigquery-optimization and .opencode/skills/bigquery-optimization in your project.

What does Bigquery Optimization need to run?

Going by SKILL.md and its folder, Bigquery Optimization needs the command-line tools its instructions call (gcloud) and credentials named GOOGLE_APPLICATION_CREDENTIALS. Our summary lists: Node.js.

Does Bigquery Optimization access the network?

SKILL.md names 1 domain. As links in the text: cloud.google.com. This is read from the text; nothing was executed.

Is Bigquery Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bigquery Optimization use?

Bigquery Optimization is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bigquery Optimization use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Bigquery Optimization?

Skills that share tags, products or a category with Bigquery Optimization: Imaging Data Commons (K-Dense-AI/scientific-agent-skills, 48k stars), Cxas Configurable Dashboards (GoogleCloudPlatform/cxas-scrapi, 106 stars), Semantic Analyst (sidequery/sidemantic, 129 stars) and Analysis Artifacts (warpdotdev/oz-skills, 825 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bigquery Optimization?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 20,994 GitHub stars. The repository holds 145 skills in this directory. The repository was last updated on October 6, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.