bigquery-troubleshooting
できること
BigQueryの問題を、手順を追って診断する手伝いをします。クエリが壊れたり、遅くなったり、突然費用が増えたりした人向けです。
使う場面
- ✓BigQueryのジョブが失敗している、またはあるべきより大幅に遅いとき。
- ✓BigQueryの支出が突然増え、その原因を見つける必要があるとき。
- ✓クエリプランで、BigQueryのボトルネックになっているステージが見えるとき。
スキルのリンク
https://github.com/google/skills/blob/main/skills/cloud/bigquery-troubleshooting/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のBigQueryのクエリは以前は1分でしたが、今は1時間かかります。何が遅くしているのか調べてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、手順を追ったチェックリストに従い、ジョブの詳細とステージの時間を取得して、ボトルネックを特定します。そして、見つけたことを平易な言葉で説明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
BigQuery Troubleshooting
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-troubleshooting)"
and append agent-skills/1.0 (skill:bigquery-troubleshooting) to User-Agent headers.
Prerequisites & Environment Setup
Before running diagnostic queries or investigating incident telemetry:
Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.
Project Selection: Set the active Google Cloud project:
gcloud config set project {project_id}API Enablement: Ensure BigQuery and Cloud Monitoring APIs are enabled:
gcloud services enable bigquery.googleapis.com monitoring.googleapis.comAuthentication: Authenticate the environment:
- CLI commands (
bq show -j):gcloud auth login - SDKs and automated diagnostic scripts:
gcloud auth application-default login - Service accounts: Set
GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
- CLI commands (
Billing & IAM Roles:
- Verify an active Google Cloud Billing account is attached to
{project_id}. - Ensure appropriate IAM roles:
roles/bigquery.jobUser: Executing diagnostic queries.roles/bigquery.resourceViewerorroles/bigquery.admin: Inspecting reservation and job execution telemetry.roles/monitoring.viewer: Cloud Monitoring metrics.roles/billing.viewer: Cloud Billing reports and cost attribution.
- Verify an active Google Cloud Billing account is attached to
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:npx skills add google/skills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting(If
bigquery-observabilityis not installed, use the self-contained baseline formulas and query templates provided directly in the reference sections below).
Workflow
- Scope & Symptom Identification: Identify the primary symptom, target
project_id,region,reservation_id, orjob_id, and domain (Performance, Compute Cost, or Storage Cost). If the request falls outside incident diagnosis or asks for a sibling domain, follow Routing Boundaries below. - Telemetry Tool Selection: Follow the tool-selection guidance in
bigquery-observability
(
bigquery_observability) to select the appropriate telemetry interface (REST APIbq show --location={location} -j {project_id}:{job_id}for single-job stage bottlenecks vs.INFORMATION_SCHEMAfor system-wide factors). Diagnostic workflows, symptom-to-cause mappings, key tables/fields, CLI triage commands, and remediation levers are fully defined in this skill. For pre-composed SQL query templates and full schema dictionaries, consultbigquery-observability. - Open-Ended Triage (Stage 1 Baseline Scan & Conversational Gate): When
the user inquiry is open-ended or vague (e.g. "Why is BigQuery slow
today?" or "Why did my bill spike?"), execute a bounded high-level
baseline scan to isolate the affected domain before drilling into deep-dive
diagnostics:
- Bounded Initial Scan: Follow the baseline scan guidance in the corresponding domain reference under Domain References. Ensure initial queries are strictly bounded (e.g. 7-day Period-over-Period with partition and job-type filters; for unspecified cost spikes, scan the 3 primary vectors: On-Demand TiB, Capacity slot-hours, and Storage GiB) to keep diagnostic telemetry overhead minimal.
- Conversational Gate: Factually summarize high-level baseline findings first and propose 2–3 focused drill-down options rather than dumping downstream sub-vector queries unsolicited.
- Domain Deep Dive & Comparative Analysis: Execute the step-by-step diagnostic workflow defined in the corresponding do
よくある質問
費用の急増も扱いますか?
はい。オンデマンドのクエリの支出、スロットの自動スケーリング、ストレージの増加を扱います。
どのツールを使いますか?
bqコマンドラインツール、INFORMATION_SCHEMAのクエリ、Cloud Monitoringを使います。
請求へのアクセスは必要ですか?
はい。ジョブのデータを読むには、有効な請求アカウントと適切なBigQueryのロールが必要です。
詳細
作者による元の説明
Provides diagnostic workflows and step-by-step root-cause analysis procedures for actively broken, failing, or slow BigQuery jobs, execution graph and query plan stage bottlenecks, system performance issues, or unexpectedly expensive workloads. Use when interpreting symptoms, isolating bottlenecks, diagnosing cost spikes (on-demand query spend, capacity slot autoscaling, storage growth), execution graph stages or substep variables, identifying root causes, and determining remediation steps. Don't use for writing or optimizing SQL, proactive capacity planning, or storage layout design (use bigq
repo: google/skills
人気
- GitHubのスター
- 22k
- ランキング
- #10230
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
finding-google-skills
22kセットアップ作業に合うGoogleの公式ガイドを探すようエージェントを支援します。ホスティング、データベース、ストレージ、サインイン、AIモデルの提供などが対象です。
gcloud
22kエージェントが、Google CloudのgcloudコマンドについてWeb検索に頼らず、正確な構文を確かめてから書いたり確認したりできるよう支援します。
google-cloud-recipe-auth
22kエージェントが、Google Cloudのアイデンティティとアクセス(人やサービスがどうサインインし、どの権限を得るか)について、手順を案内できるよう支援します。
google-cloud-recipe-onboarding
22k新しい開発者が、プロジェクトの選択、請求の設定、最初のリソースのデプロイなど、Google Cloudの最初の手順を進められるよう案内します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。