Google Cloud Platform

VérifiéSûr

Interroger des datasets BigQuery et gérer des buckets Cloud Storage. Utiliser les outils package pour toutes les opérations.

Spar Skills Guide Bot
Data & IAIntermédiaire
0023/07/2026
Claude Code
#google-cloud#bigquery#cloud-storage#sql#gcp

Recommandé pour

Notre avis

Permet d'interroger BigQuery et de gérer les buckets Cloud Storage via des outils dédiés en ligne de commande.

Points forts

  • Utilisation d'outils package sécurisés (gcloud_bigquery, gcloud_storage) sans dépendance à bq ou gsutil.
  • Échantillonnage préalable des données pour comprendre la structure avant d'écrire des requêtes complexes.
  • Sensibilisation aux coûts des analyses volumineuses sur BigQuery.
  • Gestion claire des confirmations pour les opérations de modification ou de création.

Limites

  • Nécessite une authentification gcloud préconfigurée.
  • Ne couvre que BigQuery et Cloud Storage, pas les autres services GCP.
  • Les opérations non supportées par les outils package doivent passer par le terminal avec gsutil (limité).
Quand l'utiliser

Utilisez cette compétence lorsque vous devez exécuter des requêtes SQL sur BigQuery, lister ou modifier des datasets, ou gérer des objets dans Cloud Storage.

Quand l'éviter

Évitez cette compétence si l'interaction concerne la console Google Cloud ou des services GCP autres que BigQuery et Cloud Storage.

Analyse de sécurité

Sûr
Score qualité92/100

The skill uses gcloud_bigquery and gcloud_storage package tools with REST API and gcloud auth tokens. No dangerous shell commands or exfiltration instructions are present. It includes approval prompts for mutations and cost awareness, making it safe.

Aucun point d'attention détecté

Exemples

List all datasets in BigQuery
List all datasets in my BigQuery project.
Run a sample query on a table
Show me the sample rows from the `my_dataset.my_table` table.
Upload a file to a Cloud Storage bucket
Upload the file 'data.csv' to the bucket 'my-bucket'.

name: google-cloud description: > Query BigQuery datasets and manage Google Cloud Storage buckets. Use when the user asks about BigQuery, SQL queries on cloud data, GCS buckets, or Google Cloud Platform resources. allowed-tools: gcloud_bigquery gcloud_storage execute_package_tool terminal

Google Cloud Platform

Critical Rules

  1. Always use the package tools (gcloud_bigquery, gcloud_storage) via execute_package_tool for ALL BigQuery and Cloud Storage operations. These tools use the REST API with gcloud auth tokens — they do NOT need bq or gsutil in PATH.
  2. NEVER use the browser to navigate Google Cloud Console. All operations must go through package tools or terminal CLI.
  3. NEVER use bq CLI through the terminal tool. The gcloud_bigquery package tool handles everything via REST API.
  4. Only use terminal for: checking gcloud auth status, setting project config, or operations not covered by the package tools.

BigQuery Operations (via gcloud_bigquery tool)

Use execute_package_tool with gcloud_bigquery and these actions:

  • list_datasets — List all datasets in the project
  • list_tables — List tables in a dataset (requires dataset_id)
  • describe_table — Get table schema (requires dataset_id + table_id)
  • query — Run SQL (requires sql). Use for both SELECT and CREATE TABLE/INSERT when mutating is enabled.
  • sample — Get sample rows from a table (requires dataset_id + table_id). Use FIRST to understand data shape before writing complex queries.
  • insert_rows — Insert rows (requires dataset_id + table_id + rows array)
  • create_dataset — Create a new dataset (requires dataset_id)

Example tool call:

execute_package_tool(tool_name="gcloud_bigquery", arguments={"action": "query", "sql": "SELECT * FROM dataset.table LIMIT 10"})

Query Best Practices

  • Sample first: Before writing complex queries, use the sample action to understand column types and data shape
  • Prefer aggregations: Use COUNT, SUM, AVG, GROUP BY for metrics. Only return full records when the user explicitly asks.
  • Always add LIMIT: Default to LIMIT 100 unless the user specifies otherwise
  • Format results: Present query results as markdown tables for readability
  • Cost awareness: Mention that large scans may incur costs on BigQuery

Approval & Confirmation

  • Ask before creating, deleting, or modifying data or resources
  • Once the user approves a task, execute all steps without re-asking for each sub-step
  • Example: If user says "create WMS tables with sample data", ask once for confirmation, then create all 7 tables and insert data without asking again for each table
  • If something fails, explain the issue and suggest alternatives — don't retry the same approach repeatedly

Cloud Storage (via gcloud_storage tool)

  • List bucket contents before reading/writing
  • Confirm before uploading or deleting objects
  • For bulk operations, use the terminal with gsutil only if the package tool doesn't support the operation

gcloud CLI via Terminal

If you need to use terminal for gcloud commands on Windows, use the full path:

& 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd' [command]

Common locations:

  • Windows: C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd
  • Mac: /usr/local/bin/gcloud or ~/google-cloud-sdk/bin/gcloud
  • Linux: /usr/bin/gcloud or /snap/bin/gcloud

Security

  • Auth uses gcloud CLI credentials — no keys stored by Chitty
  • Resource scoping: only operate on datasets/buckets the user has allowed in package config
  • Feature flags control mutating operations — check before attempting CREATE/INSERT/DELETE
Skills similaires