Guide · Agent skill
How to use the BigQuery Troubleshooting agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The BigQuery Troubleshooting agent skill is a diagnostic playbook that teaches an AI agent how to investigate BigQuery problems step by step: slow or failing jobs, stage bottlenecks, slot capacity contention and unexpected cost spikes. This guide explains what the skill does, how to install it, how to ask for help in plain language, and what you need in place before it can run. It is aimed at people who have never used agent skills.
Quick start
- 1Check prerequisites. Confirm you have a Google Cloud project with billing attached, plus the Google Cloud SDK installed.
- 2Download the ZIP. Download the bigquery-troubleshooting skill ZIP from this page.
- 3Unzip into the skills folder. Unzip into ~/.claude/skills/ for personal use or .claude/skills/ inside a project.
- 4Authenticate and set the project. Run gcloud config set project with your project ID, then sign in with gcloud auth login or application-default login.
- 5Enable the APIs. Enable BigQuery and Cloud Monitoring with gcloud services enable.
- 6Ask a natural question. Describe the slow job, cost spike or saturated reservation in plain language.
- 7Review the summary and drill down. Read the baseline findings, then choose one of the suggested focused next steps.
What is an agent skill and what does this one do?
An agent skill is a folder of instructions and reference files that an AI agent loads when a task matches the skill's description. This one, bigquery-troubleshooting, is published under the Apache-2.0 licence in the google/skills repository.
Once installed, the agent follows structured procedures for investigating BigQuery problems. It covers slow or failing jobs, stage bottlenecks in query execution graphs, cluster capacity contention, and cost spikes from on-demand queries, slot autoscaling, or storage growth. It starts with a bounded high-level scan, summarizes what it found, and offers focused drill-down options instead of running many queries at once.
The skill is a diagnostic playbook, not a SQL writing tool. It does not write or optimize your queries and does not plan capacity in advance. Those tasks belong to the companion skill bigquery-optimization.
Install the BigQuery Troubleshooting skill
Download the ZIP of the skill from this page and unzip it. You can install it in one of two places. For a personal setup, unzip it into ~/.claude/skills/. For a single project, unzip it into the .claude/skills/ folder inside that project.
If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.
The skill includes a SKILL.md file and reference files for each diagnostic area, so the folder should contain SKILL.md and a references folder after unzipping.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills (upload the ZIP)
Set up Google Cloud before you start
The diagnostics need live telemetry from your Google Cloud project, so the environment must be ready. The skill's setup steps tell the agent to set the active project, enable the APIs, and authenticate. You can run these yourself first.
Authentication depends on what you use. Command-line checks use gcloud auth login, while SDKs and automated diagnostic scripts use gcloud auth application-default login. Service accounts can instead set GOOGLE_APPLICATION_CREDENTIALS to the path of a key file.
- Google Cloud SDK (gcloud) installed and configured
- BigQuery and Cloud Monitoring APIs enabled in the project
- An active Google Cloud Billing account attached to the project
- IAM roles such as roles/bigquery.jobUser, roles/bigquery.resourceViewer, roles/monitoring.viewer and roles/billing.viewer
gcloud config set project {project_id}
gcloud services enable bigquery.googleapis.com monitoring.googleapis.com
gcloud auth login
gcloud auth application-default loginAsk for help with natural requests
You do not need to name the skill or any command. Describe the symptom and include what you know, such as the project, region, reservation or job ID. The skill is designed for open-ended questions too, so a vague question like why BigQuery is slow today is enough to start.
Expect the agent to first run a bounded baseline scan, then report what it found and suggest two or three focused next steps. For performance problems it compares a slow run against a fast one, looking at data processed, system contention and configuration changes. For cost problems it looks at on-demand TiB, capacity slot-hours and storage GiB.
- Why did my nightly BigQuery jobs slow down this week?
- Our Google Cloud bill spiked last month. Find out whether queries, slots or storage caused it.
- Job bqjob_123 in region us is failing. Find the stage that is the bottleneck.
- Our reservation looks saturated. Check whether slot contention is the cause.
Examples of what the agent investigates
The reference files cover distinct problems, and the agent picks the matching one based on your symptom. Performance work covers resource contention, slot saturation and configuration changes. Cost work covers on-demand query spend, capacity slot usage and storage growth.
Each investigation ends with a summary and remediation options such as partition filter enforcement, query caps, commitment purchases or reduced Time Travel, depending on what the evidence shows.
- Single-job stage bottlenecks such as slot contention or spill to disk
- Runaway on-demand queries that scan large amounts of data
- Autoscaling slot bursts and uncovered baseline slots
- Storage growth from Time Travel and Fail-Safe retention
Safety notes: scripts and network access
This skill runs scripts and uses the network. Its diagnostics call Google Cloud APIs with your credentials, so the agent can read job, reservation, monitoring and billing data in your project. Only install it if you are comfortable with that access.
The skill asks the agent to tag its gcloud commands with a usage attribution variable, set inline on each command rather than saved with gcloud config set. Review the IAM roles you grant, because roles such as those for cost and job data expose sensitive information.
- Runs scripts: yes
- Uses network: yes
- Use least-privilege IAM roles where you can
Tips for better results
Give the agent the project ID, region and any reservation or job ID up front. The more precise the scope, the smaller the initial scan. If you only want a ready-made monitoring query, ask for the bigquery-observability skill instead, since this skill does not focus on that.
- Name the time window when you know it, such as the last seven days versus the previous week.
- Install the companion skills bigquery-observability and bigquery-optimization if you want query templates or SQL help.
- Expect a summary before deep dives; reply with the drill-down option you want.
npx skills add google/skills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshootingWhat people use it for
- A data engineer finds that a nightly job suddenly takes twice as long and needs a root-cause check.
- A team sees its Google Cloud bill jump and wants to know whether queries, slots or storage drove it.
- A platform admin investigates reservation or slot saturation across a region.
- An engineer diagnoses a single failing job by reviewing its execution graph stages.
Frequently asked questions
How do I install the BigQuery Troubleshooting agent skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project. In the Claude apps you can upload it under Settings → Capabilities → Skills instead.
What are the requirements for the bigquery-troubleshooting skill?
You need the Google Cloud SDK (gcloud), the BigQuery and Cloud Monitoring APIs enabled, Google Cloud authentication, and an active Billing account on the project. The IAM roles listed include roles/bigquery.jobUser, roles/bigquery.resourceViewer, roles/monitoring.viewer and roles/billing.viewer.
Is the BigQuery Troubleshooting skill free?
The skill is published under the Apache-2.0 licence. Google Cloud usage, including BigQuery and billing, is billed by Google Cloud under your own account, and this page does not state any prices.
Does this skill write or optimize SQL?
No. The skill is a diagnostic playbook and says SQL writing and optimization belong to the bigquery-optimization companion skill. Use bigquery-observability if you only want a ready-made monitoring query.
What should I use instead of this skill?
Use bigquery-optimization for SQL tuning and capacity planning, or bigquery-observability if you already know which telemetry you want and just need the query. Anyone without a Google Cloud project and billing access will not be able to use the diagnostics.
Why does the agent run a small scan before answering?
The skill starts with a bounded high-level scan to keep telemetry overhead low, then summarizes findings and offers two or three focused drill-down options instead of running many queries at once.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits data engineers, cost owners and platform admins who have a Google Cloud project with billing and want a structured, read-oriented root-cause investigation of slow jobs, slot contention or cost spikes. If you need SQL help, planning, or a simple monitoring query, pick bigquery-optimization or bigquery-observability instead.
Download the skill