finding-google-skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Analyzes Google Cloud BigQuery slot consumption, query costs, and execution bottlenecks using INFORMATION_SCHEMA. Use when diagnosing slow BigQuery queries, slot starvation, high on-demand query costs, unpartitioned table scans, or join performance issues. Don't use for generic
$ npx -y skills add google/skills --skill bigquery-slot-cost-optimizer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/bigquery-slot-cost-optimizerContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyzes Google Cloud BigQuery slot consumption, query costs, and execution bottlenecks using INFORMATION_SCHEMA. Use when diagnosing slow BigQuery queries, slot starvation, high on-demand query costs, unpartitioned table scans, or join performance issues. Don't use for generic
name: bigquery-slot-cost-optimizer
description: >-
Analyzes Google Cloud BigQuery slot consumption, query costs, and execution
bottlenecks using INFORMATION_SCHEMA. Use when diagnosing slow BigQuery queries,
slot starvation, high on-demand query costs, unpartitioned table scans, or join
performance issues. Don't use for generic BigQuery administration (use
bigquery-basics), BigQuery ML (use bigquery-ai-ml), or DataFrame operations
(use bigquery-bigframes).
metadata:
version: 1.0.0
publisher: google
category: BigDataAndAnalytics
tags:
- bigquery
- performance
- cost-optimization
- slot-analysis
- sqlThis skill equips AI agents and cloud engineers with procedural heuristics to analyze BigQuery resource consumption, calculate slot hours, identify slot contention and queueing, mitigate Cartesian joins, and optimize unpartitioned table scans.
Activate this skill whenever the user asks to:
Before executing this skill, ensure the environment is configured with the necessary SDKs, permissions, and billing:
1. **Cloud SDK and client library installation**:
pip install google-cloud-bigquery
1. **Project, billing, and regional selection**:
gcloud config set project <PROJECT_ID>
1. **API enablement**:
gcloud services enable bigquery.googleapis.com
1. **Authentication setup**:
gcloud auth login
gcloud auth application-default login1. **IAM roles and permissions**:
1. **Pricing reference**:
Run `scripts/slot_analyzer.py` to pull and analyze historical query telemetry from `INFORMATION_SCHEMA.JOBS_BY_PROJECT`, passing the runtime-retrieved pricing rates for your specific region, edition, and commitment tier:
# General analysis passing live regional pricing rates fetched from BigQuery pricing python3 scripts/slot_analyzer.py --project-id <PROJECT_ID> --days 7 \ --ondemand-rate <USD_PER_TIB> --slot-hour-rate <USD_PER_SLOT_HOUR> --format table # Output structured JSON for programmatically parsing recommendations python3 scripts/slot_analyzer.py --project-id <PROJECT_ID> --days 7 \ --ondemand-rate <USD_PER_TIB> --slot-hour-rate <USD_PER_SLOT_HOUR> --format json # Offline verification mode using synthetic or extracted telemetry python3 scripts/slot_analyzer.py --mock-data-file path/to/extracted_telemetry.json \ --ondemand-rate <USD_PER_TIB> --slot-hour-rate <USD_PER_SLOT_HOUR> --format table # Dry-run mode to inspect regional SQL query python3 scripts/slot_analyzer.py --project-id <PROJECT_ID> --region region-us --dry-run
Run `python3 scripts/slot_analyzer.py --help` to inspect all supported CLI flags, focus modes (`--mode`), and required pricing rate arguments (`--ondemand-rate` per TiB and `--slot-hour-rate` per slot-hour).
Evaluate the telemetry output using the following decision rules. **CRITICAL MANDATE: After classifying the query issue using the decision tree below, you MUST immediately call `view_file` on [references/remediation_playbooks.md](references/remediation_playbooks.md) to read and execute the corresponding remediation playbook (`Rule SLOT-001`, `Rule JOIN-001`, or `Rule PART-001`) and include all mandatory diagnostic SQL queries and 4-step checklists in your response.**
[Query Telemetry Analyzed]
|
+---> IfThis repository contains Agent Skills for Google products and technologies, including Google Cloud.
Repo: google/skills
Locates and loads the right Google product skill on demand from a remote catalog index, instead of preloading every skill. Use at the START of any request…
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.…
Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default…
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new…
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client…