mcpField
O
onboarding-preflight-check

onboarding-preflight-check

github.com/looker-open-sourceCloud & DevOps43102 installsUpdated 2w ago
Repository

About onboarding-preflight-check

A Looker developer onboarding skill that checks local prerequisites and Google Cloud IAM permissions before setup. It provides separate system and IAM pre-flight checks with guidance for resolving reported issues.

Key features

  1. 01Check required local tools
  2. 02Verify Google Cloud authentication
  3. 03Check Looker service account IAM roles
  4. 04Guide remediation of check failures

Use cases

  1. 01Check the workstation before Looker onboarding
  2. 02Confirm BigQuery access permissions during connection setup

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/looker-open-source/looker-skills --skill onboarding-preflight-check

After installing, type/onboarding-preflight-checkin Claude Code to confirm it loaded.

Bundled filesscripts/preflight_check_test.shscripts/preflight_check.sh

Details

From the project README

Looker Developer Onboarding: Pre-flight Check

This skill verifies that the local environment has the required tools and authentication configured before beginning onboarding.

Instructions

1. Run the System Pre-flight Check

Execute the pre-flight check script in system mode. Specify the path where you plan to install the Looker CLI (typically ~/.local/bin or a workspace path):

./skills/onboarding-preflight-check/scripts/preflight_check.sh --mode system --install-dir ~/.local/bin
2. Handle Check Failures

If the script returns a non-zero exit code, resolve the issues based on the error output:

Case A: gcloud CLI is not installed
  1. Install the Google Cloud SDK. If you are unable to install it automatically (e.g. due to missing system package manager or permissions), instruct the user to install the Google Cloud SDK.
Case B: gcloud is not authenticated
  1. Prompt the user to run the interactive login in their terminal:

    gcloud auth login
    
  2. Wait for the user to complete the login flow, then re-run the check.

Case C: bq CLI is not installed
  1. Install the bq component:

    gcloud components install bq
    
Case D: Installation directory ... is not writable
  1. Create the target installation directory if it does not exist. If permissions are restricted, run the installation using a subdirectory in the workspace (e.g., ./bin) and pass that path to --install-dir.
3. Run the IAM Pre-flight Check (During Connection Setup)

Execute the pre-flight check script in iam mode to verify that the Looker Core service account possesses the required least-privilege roles on the target GCP project (roles/bigquery.dataViewer, roles/bigquery.jobUser, and roles/serviceusage.serviceUsageConsumer):

./skills/onboarding-preflight-check/scripts/preflight_check.sh --mode iam --looker-project {looker_gcp_project_id} --bq-project {bigquery_gcp_project_id}

Important

Why roles/serviceusage.serviceUsageConsumer is required: When running queries through the BigQuery connection from the Looker instance, Google Cloud requires the Looker service account to have permission to compute/use resources within the billed project. Without the roles/serviceusage.serviceUsageConsumer role (which contains serviceusage.services.use), Looker cannot authenticate or dispatch query jobs to BigQuery, resulting in a 400 Bad Request permission error during execution.

If missing roles are reported, run the appropriate gcloud projects add-iam-policy-binding commands to grant roles/bigquery.dataViewer, roles/bigquery.jobUser, and roles/serviceusage.serviceUsageConsumer to the Looker service account (service-{project_number}@gcp-sa-looker.iam.gserviceaccount.com).

Comments

Markdown supported