/cloud-run-basics
Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).
$ npx -y skills add google/skills --skill cloud-run-basics --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/cloud-run-basics
Context preview
The summary Claude sees to decide when to auto-load this skill.
Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).
SKILL.md
cloud-run-basics.SKILL.mdname: cloud-run-basics
metadata:
category: Serverless
description: >-
Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications
responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs),
or handle always-on pull-based background processing (worker pools).
Cloud Run Basics
Cloud Run is a fully managed application platform for running your code, function, or container on top of Google's highly scalable infrastructure. It abstracts away infrastructure management, providing three primary resource types:
1. **Services:** Responds to HTTP requests sent to a unique and stable endpoint, using stateless instances that autoscale based on a variety of key metrics, also responds to events and functions. 2. **Jobs:** Executes parallelizable tasks that are executed manually, or on a schedule, and run to completion. 3. **Worker pools:** Handles always-on background workloads such as pull-based workloads, for example, Kafka consumers, Pub/Sub pull queues, or RabbitMQ consumers.
Prerequisites
1. Enable the Cloud Run Admin API and Cloud Build APIs:
gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quiet
1. If you are under a domain restriction organization policy [restricting](https://docs.cloud.google.com/organization-policy/restrict-domains.md.txt) unauthenticated invocations for your project, you will need to access your deployed service as described under [Testing private services](https://docs.cloud.google.com/run/docs/triggering/https-request.md.txt).
Required roles
You need the following roles to deploy your Cloud Run resource:
- Cloud Run Admin (`roles/run.admin`) on the project
- Cloud Run Source Developer (`roles/run.sourceDeveloper`) on the project
- Service Account User (`roles/iam.serviceAccountUser`) on the service
identity
- Logs Viewer (`roles/logging.viewer`) on the project
Cloud Build automatically uses the Compute Engine default service account as the default Cloud Build service account to build your source code and Cloud Run resource, unless you override this behavior.
For Cloud Build to build your sources, grant the Cloud Build service account the Cloud Run Builder (`roles/run.builder`) role on your project:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \
--role=roles/run.builder \
--quietReplace `PROJECT_ID` with your Google Cloud project ID and `SERVICE_ACCOUNT_EMAIL_ADDRESS` with the email address of the Cloud Build service account.
Deploy a Cloud Run service
You can deploy your service to Cloud Run by using a container image or deploy directly from source code using a single Google Cloud CLI command.
> **CRITICAL RULE:** Any deployed code MUST listen on 0.0.0.0 (not 127.0.0.1) > and use the injected $PORT environment variable (defaults to 8080), or it will > crash on boot.
Deploy a container image to Cloud Run
Cloud Run imports your container image during deployment. Cloud Run keeps this copy of the container image as long as it is used by a serving revision. Container images are not pulled from their container repository when a new Cloud Run instance is started.
Supported container images
You can directly use container images stored in the [Artifact Registry](https://docs.cloud.google.com/artifact-registry/docs/overview.md.txt), or [Docker Hub](https://hub.docker.com/). Google recommends the use of Artifact Registry since Docker Hub images are [cached](https://docs.cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images.md.txt) for up to one hour.
You can use container images from other public or private registries (like JFrog Artifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact Registry remote repository](https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo.md.txt).
You should only consider [Docker Hub](https://hub.docker.com/) for deploying popular container images such as [Docker Official Images](https://docs.docker.com/docker-hub/official_images/) or [Docker Sponsored OSS images](https://docs.docker.com/docker-hub/dsos-program/). For higher availability, Google recommends deploying these Docker Hub images using an [Artifact Registry remote repository](https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo.md.txt).
To deploy a container image, run the following command:
gcloud run deploy SERVICE_NAME \
--image IMAGE_URL \
--region us-central1 \
--allow-unauthenticated \
--quietReplace the following:
- SERVICE_NAME: the name of the service you want to deploy to. Service names
must be 49 characters or less and must be unique per region and project. If the service does not exist yet, this command creates the service during the deployment. You can omit this parameter entirely, but you will be prompted for the service name if you omit it.
- IMAGE_URL: a reference to the container image, for example,
`us-docker.pkg.dev/cloudrun/container/hello:latest`. If you use Artifact Registry, the repository REPO_NAME must already be created. The URL follows the format of `LOCATION-docker.pkg.dev/PROJECT_ID/REPO_NAME/PATH:TAG`. Note that if you don't supply the `--image` flag, the deploy command will attempt to deploy from source code.
Deploy from source code
There are two different ways to deploy your service from source:
- Deploy from source with build (default): This option uses Google Cloud's
buildpacks and Cloud Build to automatically build container images from your source code without having to install Docker on your machine or set up buildpacks or Cloud Build. By default, Cloud Run uses the default machine type provided by Cloud Build.
- To deploy from source with automatic base image u
Read more
name: cloud-run-basics metadata: category: Serverless description: >- Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).
Cloud Run Basics
Cloud Run is a fully managed application platform for running your code, function, or container on top of Google's highly scalable infrastructure. It abstracts away infrastructure management, providing three primary resource types:
1. **Services:** Responds to HTTP requests sent to a unique and stable endpoint, using stateless instances that autoscale based on a variety of key metrics, also responds to events and functions. 2. **Jobs:** Executes parallelizable tasks that are executed manually, or on a schedule, and run to completion. 3. **Worker pools:** Handles always-on background workloads such as pull-based workloads, for example, Kafka consumers, Pub/Sub pull queues, or RabbitMQ consumers.
Prerequisites
1. Enable the Cloud Run Admin API and Cloud Build APIs:
gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quiet
1. If you are under a domain restriction organization policy [restricting](https://docs.cloud.google.com/organization-policy/restrict-domains.md.txt) unauthenticated invocations for your project, you will need to access your deployed service as described under [Testing private services](https://docs.cloud.google.com/run/docs/triggering/https-request.md.txt).
Required roles
You need the following roles to deploy your Cloud Run resource:
- Cloud Run Admin (`roles/run.admin`) on the project
- Cloud Run Source Developer (`roles/run.sourceDeveloper`) on the project
- Service Account User (`roles/iam.serviceAccountUser`) on the service
identity
- Logs Viewer (`roles/logging.viewer`) on the project
Cloud Build automatically uses the Compute Engine default service account as the default Cloud Build service account to build your source code and Cloud Run resource, unless you override this behavior.
For Cloud Build to build your sources, grant the Cloud Build service account the Cloud Run Builder (`roles/run.builder`) role on your project:
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \
--role=roles/run.builder \
--quietReplace `PROJECT_ID` with your Google Cloud project ID and `SERVICE_ACCOUNT_EMAIL_ADDRESS` with the email address of the Cloud Build service account.
Deploy a Cloud Run service
You can deploy your service to Cloud Run by using a container image or deploy directly from source code using a single Google Cloud CLI command.
> **CRITICAL RULE:** Any deployed code MUST listen on 0.0.0.0 (not 127.0.0.1) > and use the injected $PORT environment variable (defaults to 8080), or it will > crash on boot.
Deploy a container image to Cloud Run
Cloud Run imports your container image during deployment. Cloud Run keeps this copy of the container image as long as it is used by a serving revision. Container images are not pulled from their container repository when a new Cloud Run instance is started.
Supported container images
You can directly use container images stored in the [Artifact Registry](https://docs.cloud.google.com/artifact-registry/docs/overview.md.txt), or [Docker Hub](https://hub.docker.com/). Google recommends the use of Artifact Registry since Docker Hub images are [cached](https://docs.cloud.google.com/artifact-registry/docs/pull-cached-dockerhub-images.md.txt) for up to one hour.
You can use container images from other public or private registries (like JFrog Artifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact Registry remote repository](https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo.md.txt).
You should only consider [Docker Hub](https://hub.docker.com/) for deploying popular container images such as [Docker Official Images](https://docs.docker.com/docker-hub/official_images/) or [Docker Sponsored OSS images](https://docs.docker.com/docker-hub/dsos-program/). For higher availability, Google recommends deploying these Docker Hub images using an [Artifact Registry remote repository](https://docs.cloud.google.com/artifact-registry/docs/repositories/remote-repo.md.txt).
To deploy a container image, run the following command:
gcloud run deploy SERVICE_NAME \
--image IMAGE_URL \
--region us-central1 \
--allow-unauthenticated \
--quietReplace the following:
- SERVICE_NAME: the name of the service you want to deploy to. Service names
must be 49 characters or less and must be unique per region and project. If the service does not exist yet, this command creates the service during the deployment. You can omit this parameter entirely, but you will be prompted for the service name if you omit it.
- IMAGE_URL: a reference to the container image, for example,
`us-docker.pkg.dev/cloudrun/container/hello:latest`. If you use Artifact Registry, the repository REPO_NAME must already be created. The URL follows the format of `LOCATION-docker.pkg.dev/PROJECT_ID/REPO_NAME/PATH:TAG`. Note that if you don't supply the `--image` flag, the deploy command will attempt to deploy from source code.
Deploy from source code
There are two different ways to deploy your service from source:
- Deploy from source with build (default): This option uses Google Cloud's
buildpacks and Cloud Build to automatically build container images from your source code without having to install Docker on your machine or set up buildpacks or Cloud Build. By default, Cloud Run uses the default machine type provided by Cloud Build.
- To deploy from source with automatic base image u
This repository contains Agent Skills for Google products and technologies, including Google Cloud. This repository is under active development.
Repo: google/skills
Other skills on google-skills.
- /data-manager-api-audience-ingestion
Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client libraries. Use this skill when the user wants to upload audience members, remove specific users, or clear/replace an
Open skill - /data-manager-api-event-ingestion
Guides developers through implementing event and conversion ingestion to Google products using the Data Manager API /v1/events/ingest endpoint and its associated client libraries. Use this skill when the user wants to upload offline conversions, enhanced conversions for leads,
Open skill - /data-manager-api-setup
Guides developers through client library installation and authentication setup steps for the Data Manager API. Use this skill when a user is getting started with the Data Manager API and needs to setup their local environment, install the client library, or setup access to the
Open skill - /google-ads-api-account-diagnostics
Diagnoses Google Ads account performance issues such as conversion loss (value or volume), low lead flow/volume, and lost impression share (opportunities) due to ad rank, bids, or budgets. Use when troubleshooting sudden performance drops, analyzing campaign impression share
Open skill - /google-ads-api-mcp-setup
Guides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server. Use this skill when a user wants to connect their AI assistant (such as Gemini, Claude Code, or Cursor) to their Google Ads account to query campaigns or retrieve
Open skill - /google-ads-api-quickstart
Guides developers through Google Ads API quickstart: credential setup, choosing from 6 client libraries/REST, configuring environments, and running a "retrieve campaigns" script. Troubleshoots common setup errors: USER_PERMISSION_DENIED, login_customer_id issues, and
Open skill

