56 results available
Sign in
Skills directory

google-cloud-recipe-onboarding

google

·

Last changed
Hardened

This skill has been hardened by Chainguard

Last changed

This version passed the hardening gate. The skill content was retained without changes. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 1. Review findings remaining: 14.


Open before hardening

1

Low
Open after hardening

1

Low

Expand
File
Group
Subtype
Severity
Status
SKILL.md

Prompt Injection

Third-party content as instructions

Low
Open

1 finding


SKILL.md

Onboarding to Google Cloud

This skill provides a streamlined, non-interactive "happy path" for a singleton developer to get started with Google Cloud. It covers everything from environment verification and authentication to project selection, billing account linkage, and downstream safety chaining.

Attribution

For all gcloud CLI, REST API, and MCP attribution requirements when executing commands with this skill, follow the instructions in Usage Attribution.


Overview

For an individual developer, onboarding to Google Cloud involves verifying local terminal tools, establishing an authenticated session, selecting or instantiating a workspace (Project), and linking it to an active billing account. Google Cloud offers a Free Tier and a Free Trial with $300 in credits for first-time users. Learn more here.


Prerequisites

  • A personal Google Account (e.g., @gmail.com) or Google Workspace / Cloud Identity account.
  • A valid payment method (credit card or bank account) required for identity verification and to activate the $300 Free Trial credit introduced in the Overview.

Steps

Section 1: Verify Host Tooling Setup

Before soliciting input or proposing mutations, silently audit the host system's active tooling and environment status.

  1. Check if the gcloud CLI binary is installed and accessible:

    which gcloud
  2. Check if there is an active authenticated identity session:

    gcloud auth list --format="json"
  3. If the pre-execution audit for which gcloud returns a valid path, proceed directly to Section 2: Authenticate and Route Session.

  4. If the binary is missing, halt execution and direct the agent to install gcloud using the gcloud skill. Provide the official Google Cloud CLI Installation Guide to the developer for steps to set up authentication.


Section 2: Authenticate and Route Session

Authorize the gcloud CLI to access Google Cloud using the developer's Google Account, and verify that the account is appropriate for standalone developer onboarding.

  1. Execute Credentials Authentication:

    gcloud auth login
  2. Verify Active Identity:

    gcloud config get-value account --format="json"
  3. Programmatic Enterprise Routing Guardrail: Before proceeding, verify if the account is bound to a corporate organization, as enterprise setups must follow a different architecture:

    gcloud organizations list --format="json"
    • Note that new Free Trial accounts automatically receive a Self-Owned Organization (SOO). To distinguish between a personal Free Trial account and an enterprise organization, inspect the JSON output:
      • Enterprise Organization (Halt Execution): If the output list contains an organization node where owner.directoryCustomerId is present (confirming a domain-verified Google Workspace or Cloud Identity organization), or if the user's prompt explicitly mentions corporate landing zones or multi-tenant project structures:
      • Personal Account / Free Trial SOO (Proceed): If the output list is empty [], or if it contains a Self-Owned Organization (where owner.directoryCustomerId is absent and displayName is not a verified domain name), proceed to Section 3: Select or Instantiate Your Google Cloud Project.

Section 3: Select or Instantiate Your Google Cloud Project

Google Cloud resources are organized into Projects. When developers sign up for a Free Trial via the console, Google Cloud automatically creates a default project (e.g., "My First Project"). Always audit the active environment first to reuse existing projects and prevent token-burning collision errors.

  1. Silent Project Discovery: List active, accessible projects (limited to prevent context window overflow):

    gcloud projects list --filter="lifecycleState=ACTIVE" --limit=20 --format="json"
  2. Reuse Existing Project (Recommended): If the list returns an active project, present it to the developer and propose setting it as the default working project:

    gcloud config set project {PROJECT_ID} --quiet
  3. Create Custom Project: If no projects exist, or if the developer explicitly requests a brand new workspace:

    • Solicit a custom PROJECT_ID and PROJECT_NAME from the developer (Single-Question Policy).

    • Structured Confirmation & Consent Gate (Mandatory): Before running any project creation or billing linkage commands, the agent must present a structured markdown table summarizing the target parameters:

      ParameterValue

      Target Project ID

      {PROJECT_ID}

      Target Project Name

      {PROJECT_NAME}

      Active Identity Account

      {ACCOUNT}

      Target Billing Account ID

      {BILLING_ACCOUNT_ID}

      Ask the user the exact consent query: "I am ready to initialize your Google Cloud project and link billing. Do you want me to proceed?"

      CRITICAL: The agent MUST NOT execute any gcloud projects create or billing link commands during this turn. You must display this table, ask the exact consent query, and strictly stop to wait for the user's positive affirmation.

    • Project ID Collision Suffix Recovery: If the project creation command fails because the PROJECT_ID is already taken globally (returning a PROJECT_ID_COLLISION or ALREADY_EXISTS error):

      • Automatically append a random 4-digit suffix (e.g., changing my-project to my-project-8472).
      • Propose this new available project ID to the developer and re-solicit consent before retrying.
    • Execute Project Creation: Once explicit user consent is confirmed:

      gcloud projects create {PROJECT_ID} --name="{PROJECT_NAME}" --quiet --format="json"
    • Set the active working project:

      gcloud config set project {PROJECT_ID} --quiet

To deploy resources on Google Cloud, your project must be linked to an active Cloud Billing account.

  1. Audit Billing Status: Check if the active project is already linked to a billing account:

    gcloud billing projects describe {PROJECT_ID} --format="json"
  2. If the output contains "billingEnabled": true, skip linkage and proceed immediately to Section 5: Skill Chaining (Spend Controls & Workloads).

  3. Discover Available Billing Accounts: If the project is unlinked, query the available billing account handles linked to the authenticated user identity:

    gcloud billing accounts list --format="json"
  4. Link Billing Account: Propose linking the project to the discovered Billing Account ID, and execute:

    gcloud billing projects link {PROJECT_ID} --billing-account={BILLING_ACCOUNT_ID} --format="json"

Section 5: Skill Chaining (Spend Controls & Workloads)

Onboarding setup is now complete. To safeguard your environment and deploy workloads, you can chain to downstream specialized skills:

  1. Billing Spend Controls: To avoid accidental cost overruns, consider setting up a programmatic control to automatically disable billing. When billing is disabled, all Google Cloud services and usage in the project are terminated to stop further costs:
  1. Deploy Workloads: To deploy your first resource, trigger the downstream specialized skill matching your target application (e.g., cloud-run-basics or bigquery-basics). If the specialized skill is not locally available, direct the developer to the corresponding official quickstart, such as the Cloud Run Container Deployment Quickstart. Note: Those downstream specialized skills are individually responsible for dynamically enabling their own required service APIs (e.g., run.googleapis.com) inline during execution.

Validation Logic

After completing the onboarding steps, programmatically verify the completed environment state using these diagnostic commands:

  1. Verify CLI Installation:

    which gcloud
  2. Verify Authenticated Identity:

    gcloud config get-value account
  3. Verify Project Workspace Existence:

    gcloud projects describe {PROJECT_ID} --format="json"
  4. Verify Billing Linkage (Ensure the JSON output contains "billingEnabled": true):

    gcloud billing projects describe {PROJECT_ID} --format="json"

Additional Resources

Install

Install with chainctl
chainctl skill install public/google/google-cloud-recipe-onboarding:latest
Get started with chainctl
View source

Harden your own skills

Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.

Provenance

Upstream sourcehttps://github.com/google/skills
Upstream commit28fc8b986e3bec1a2a91709a972d748293de02c9
OCI reference

skills.cgr.dev/public/github.com/google/skills/cloud/google-cloud-recipe-onboarding:latest

License

Apache-2.0

Files

HARDENING.md

LICENSE

SKILL.md

references/attribution.md


The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.