google-cloud-auth-verification
/google-cloud-auth-verification
Wymusza krok zerowy przed pracą z Google Cloud: weryfikacja uwierzytelnienia ADC, gcloud, Spark, Dataproc, BigQuery, GCS i środowisk notebooków.
- Repozytorium
- data-agent-kit-starter-pack ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 13.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Wymusza krok zerowy przed pracą z Google Cloud: weryfikacja uwierzytelnienia ADC, gcloud, Spark, Dataproc, BigQuery, GCS i środowisk notebooków.
Oryginalny opis (EN)
Mandatory Step 0 pre-flight execution order and authentication verification for Google Cloud Platform (GCP), Application Default Credentials (ADC), gcloud CLI, Spark, Dataproc, BigQuery, GCS, and notebook runtimes. Use whenever interacting with GCP resources, running Spark/PySpark pipelines, BigQuery queries, GCS paths (gs://), or creating/running notebooks.
Jak działa
- Mandatory Pre-Flight Execution & Auth Hierarchy
- Common Error Messages
- Verification Step
- Corrective Action
- Post-Login Verification
Podgląd SKILL.md
---
name: google-cloud-auth-verification
description: >-
Mandatory Step 0 pre-flight execution order and authentication verification for Google Cloud Platform (GCP),
Application Default Credentials (ADC), gcloud CLI, Spark, Dataproc, BigQuery, GCS, and notebook runtimes.
Use whenever interacting with GCP resources, running Spark/PySpark pipelines, BigQuery queries, GCS paths (gs://), or creating/running notebooks.
license: Apache-2.0
metadata:
version: v3
publisher: google
---
# Google Cloud Authentication Guidelines
## Mandatory Pre-Flight Execution & Auth Hierarchy
> [!IMPORTANT] **Pre-Flight Execution Priority Order**: Before generating code,
> implementation plans, or executing tasks for any GCP or Notebook workload:
>
> 1. **Skip Pre-Flight Shell Probes When Live Notebook Execution or MCP Tools**
> **Are Available**:
> - When a live notebook cell execution tool (`execute_cell` /
> `notebook_execute_cell` / `notebook__execute_cell`) is available, or
> when the task is handled directly by a connected MCP tool
> (`bigquery__execute_sql`, `bigquery__get_table_info`,
> `bigquery__list_table_ids`, etc.), **do NOT run a pre-flight
> `gcloud auth list && gcloud config list` shell probe**. Instead,
> verify authentication reactively only if a cell execution or MCP tool
> call returns an authentication or credentials error (`401`, `403`,
> `DefaultCredentialsError`, `Reauthentication is needed`).
> - When `gcloud` or `bq` shell commands are required, or when generating
> standalone scripts or notebooks without a live cell execution tool
> (`execute_cell`), verify credentials upfront via the single bundled
> probe (`gcloud auth list && gcloud config list`) or Application
> Default Credentials (ADC).
> 2. **Distinguish Authentication vs. IAM Permissions**:
> - If `gcloud auth list` returns `No credentialed accounts`, **HARD
> STOP** immediately and instruct the user to run `gcloud auth login`
> and `gcloud auth application-default login`.
> - If Python throws `google.auth.exceptions.DefaultCredentialsError`,
> explicitly direct the user to run `gcloud auth application-default
> login`.
> - If `gcloud auth list` shows an active credentialed account but a
> BigQuery/GCP call returns `403 Forbidden: Access Denied`, **DO NOT**
> tell the user to log in again with `gcloud auth login`. Diagnose
> missing IAM roles (e.g., `roles/bigquery.dataEditor`) on the active
> account.
> 3. **HARD STOP if Unauthenticated**: If no active GCP credentials or valid
> `gcloud` authentication are detected, **STOP IMMEDIATELY**. Prompt the
> user to run `gcloud auth login` and `gcloud auth application-default
> login`. Do NOT attempt local virtualenv creation, package installation, or
> local binary/JDK setup loops as workarounds.
## Common Error Messages
1. **gcloud/bq CLI**:
- `ERROR: (bq) You do not currently have an active account selected.`
- `No credentialed accounts.`
- `Configuration error: No account is currently active.`
2. **Execution Failures (Python/Notebooks)**:
- `google.auth.exceptions.DefaultCredentialsError: Could not automatically
determine credentials.`
- `Forbidden: 403 Access Denied` (when it's clearly an auth issue).
## Verification Step
Before asking the user to log in, independently verify authentication status
using a single bundled probe command:
```bash
gcloud auth list --format="json" && gcloud config list --format="json"
```
* If the output contains `No credentialed accounts.` or missing active
account, proceed to **Corrective Action**.
* If an account *is* listed but the user still receives a `403 Access Denied`
error, the issue is likely **IAM permissions** (e.g., missing BigQuery
roles) on their active account, rather than missing authentication. In this
case, investigate permissions rather than asking them to log in again.
## Corrective Action
When missing credentials are confirmed, **DO NOT** attempt to fix credentials
via code or local virtualenv workarounds. Credentials must be established by the
user.
**Stop and ask the user to run the following commands in their terminal:**
1. **To authenticate the gcloud CLI**: `gcloud auth login`
2. **To set up Application Default Credentials (ADC)** (required for BQ CLI AND
most libraries/notebooks): `gcloud auth application-default login`
## Post-Login Verification
After the user confirms they have logged in, verify with: `gcloud auth list`
Then proceed with the original task.
Wersje
W bazie nie ma innych skilli o nazwie google-cloud-auth-verification.
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 28.10.2026 · wersja paczki 3e5f1677cf7d (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 85gcloud-auth-verification
Pomaga rozwiązać problemy z uwierzytelnieniem Google Cloud i Application Default Credentials przy błędach gcloud, bq lub bibliotek Python. - 90gcp-setup
Sprawdza środowisko Google Cloud na starcie sesji i ustawia uwierzytelnianie dla gcloud, ADC i kubectl. - 90resolving-mcp-region-configs
Sprawdza przed użyciem regionalne serwery MCP Google Cloud, np. Dataproc, i naprawia nierozwinięte symbole regionu w adresie. - 100using-cloud-cli
Podaje wzorce pracy z CLI chmur GCP i AWS: zapytania bq, polecenia gcloud i aws, optymalizacja kosztów BigQuery oraz dobre praktyki operacyjne. - 100gcp-spark
Tworzy, optymalizuje i uruchamia kod PySpark i Spark na Managed Spark w Google Cloud (klastry Dataproc i Serverless): notebooki, ETL, modele ML oraz optymalizacja pamięci i wydajności Spark SQL. - 100gcp-expert
Wspiera pracę z Google Cloud Platform i jego architekturą, w tym z Cloud Functions, BigQuery i Firestore.