using-gcloud-bq-cli

Diagnose and fix gcloud and BigQuery authentication and permission issues.

4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/johnnymo87/workstation --skill using-gcloud-bq-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-gcloud-bq-cli
Source: https://github.com/johnnymo87/workstation/tree/main/assets/claude/skills/using-gcloud-bq-cli
Command: npx skills add https://github.com/johnnymo87/workstation --skill using-gcloud-bq-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps diagnose and fix gcloud and BigQuery authentication and permission issues.

Core Features & Use Cases

  • Credential troubleshooting: Validate and activate service accounts, correct credential sources, and fix GOOGLE_APPLICATION_CREDENTIALS vs gcloud credentials confusion.
  • Permission verification: Verify IAM permissions and test permissions against BigQuery resources.
  • Operational guidance: Clean up after service accounts and understand how new fields in nested schemas affect operations.

Quick Start

Activate the service account with: gcloud auth activate-service-account --key-file=/path/to/key.json Test access to BigQuery: bq query "SELECT 1" Verify permissions: TOKEN=$(gcloud auth print-access-token) curl -s -H "Authorization: Bearer ${TOKEN}"
-H "Content-Type: application/json"
"https://bigquery.googleapis.com/bigquery/v2/projects/PROJECT/datasets/DATASET/tables/TABLE:testIamPermissions"
-d '{"permissions": ["bigquery.tables.get"]}'

Frequently Asked Questions about using-gcloud-bq-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose BigQuery authentication errors with gcloud and bq?

Diagnose BigQuery authentication errors by activating your service account with gcloud auth activate-service-account, then test access using bq query "SELECT 1". Verify permissions with gcloud auth print-access-token and curl to check IAM permissions against BigQuery resources.

What's the difference between GOOGLE_APPLICATION_CREDENTIALS and gcloud credentials?

GOOGLE_APPLICATION_CREDENTIALS points to a service account key file for application-level authentication, while gcloud credentials are user credentials stored by the gcloud CLI. Confusion between the two is a common source of access failures; activate the correct credential source for your use case.

How do I verify IAM permissions on BigQuery datasets and tables?

Verify IAM permissions by extracting your access token with gcloud auth print-access-token, then call BigQuery's testIamPermissions endpoint via curl with specific permissions like bigquery.tables.get. This confirms whether your current credentials have required permissions.

Can I troubleshoot service account credential issues without redeploying?

Yes. Activate a service account with gcloud auth activate-service-account --key-file=/path/to/key.json to test credentials locally. After troubleshooting, clean up by switching back to your original credentials or user account without redeploying applications.

Why does my service account lose access to BigQuery after adding nested schema fields?

Adding nested fields to schemas may require additional IAM permissions or affect existing role bindings. Verify your service account's permissions remain valid using testIamPermissions after schema changes, and re-apply any necessary role assignments.