Skip to main content
skill CX Codex

gcp-cloud-run — Claude Code skill: what it does, how to install

Guides container deployments to Google Cloud Run with gcloud CLI and Terraform. Useful when releasing stateless HTTP backends.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a claude-code
Open on GitHub

What gcp-cloud-run does

This skill supplies prompts and deployment patterns for running stateless HTTP containers on Google Cloud Run. It helps configure container builds, memory limits, and IAM bindings for public access.

Inside are reference materials covering gcloud commands and Terraform resources. It guides the model to set up graceful shutdown handling alongside startup probes.

Local file persistence will fail. Cloud Run instances scale down to zero when traffic stops, so storing state inside the container filesystem leads to lost data.

What it helps with

  • Deploy container images to Google Cloud Run using gcloud
  • Generate Terraform files for Cloud Run resources
  • Containerize Node.js applications with Docker
  • Configure IAM role bindings for public service invocation

Example prompts for the agent

  • Write a gcloud run deploy command for an app with 512Mi memory and 1 CPU
  • Generate a Terraform configuration to deploy a stateless service on Cloud Run
  • How do I configure graceful shutdown and health probes for Cloud Run?

How to install gcp-cloud-run

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a claude-code

2Manually: put the files in place

~/.claude/skills/gcp-cloud-run/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gcp-cloud-run/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gcp-cloud-run

How to install gcp-cloud-run in Claude Code?

Run npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a claude-code. The file will be placed in ~/.claude/skills/gcp-cloud-run/SKILL.md.

What does gcp-cloud-run do?

It gives your AI coding assistant deployment recipes, resource flags, and Terraform templates for Google Cloud Run.

Can I use this for stateful workloads?

No, the skill explicitly warns against keeping files or state on the container filesystem because Cloud Run instances are strictly stateless.

Source text

SKILL.md · MIT
---
name: gcp-cloud-run
description: >
  Deploy containerized applications on Google Cloud Run with automatic scaling,
  traffic management, and service mesh integration. Use for container-based
  serverless computing.
---

# GCP Cloud Run

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Google Cloud Run enables deployment of containerized applications at scale without managing infrastructure. Run stateless HTTP containers with automatic scaling from zero to thousands of instances, paying only for compute time consumed.

## When to Use

- Microservices and APIs
- Web applications and backends
- Batch processing jobs
- Long-running background workers
- CI/CD pipeline integration
- Data processing pipelines
- WebSocket applications
- Multi-language services

## Quick Start

Minimal working example:

```bash
# Build container image
gcloud builds submit --tag gcr.io/MY_PROJECT_ID/my-app:latest

# Deploy to Cloud Run
gcloud run deploy my-app \
  --image gcr.io/MY_PROJECT_ID/my-app:latest \
  --platform managed \
  --region us-central1 \
  --memory 512Mi \
  --cpu 1 \
  --timeout 3600 \
  --max-instances 100 \
  --min-instances 1 \
  --no-allow-unauthenticated \
  --set-env-vars NODE_ENV=production,DATABASE_URL=postgresql://...

# Allow public access
gcloud run services add-iam-policy-binding my-app \
  --platform managed \
  --region us-central1 \
  --member=allUsers \
  --role=roles/run.invoker

# Get service URL
gcloud run services describe my-app \
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Cloud Run Deployment with gcloud CLI](references/cloud-run-deployment-with-gcloud-cli.md) | Cloud Run Deployment with gcloud CLI |
| [Containerized Application (Node.js)](references/containerized-application-nodejs.md) | Containerized Application (Node.js) |
| [Terraform Cloud Run Configuration](references/terraform-cloud-run-configuration.md) | Terraform Cloud Run Configuration |
| [Docker Build and Push](references/docker-build-and-push.md) | Docker Build and Push |

## Best Practices

### ✅ DO

- Use container health checks
- Set appropriate CPU and memory
- Implement graceful shutdown
- Use service accounts with least privilege
- Monitor with Cloud Logging
- Enable Cloud Armor for protection
- Use revision management for blue-green deployments
- Implement startup and liveness probes

### ❌ DON'T

- Store secrets in code
- Use default service account
- Create stateful applications
- Ignore health checks
- Deploy without testing
- Use excessive resource limits
- Store files in container filesystem

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set143

semantic-versioning A skill for automated SemVer versioning: conventional commits, semantic-release and changelog generation. CX Codex +1 542installs browser-debugging A skill for chasing client-side bugs: JavaScript errors, broken layouts, slow pages. Useful when something misbehaves and the cause isn't obvious. CX Codex +1 540installs mobile-offline-support A skill for designing offline-first mobile apps with local caching, sync queues, and conflict resolution. It handles connection drops and background sync. CX Codex +1 540installs design-system-creation A skill that lays out a design system: tokens, components, docs and governance. Useful once you have more than one interface or team. CX Codex +1 537installs Causal Inference A skill that walks your agent through causal effect estimation: propensity scores, instrumental variables, causal graphs. Useful when a randomized experiment isn't an option. CX Codex +1 534installs code-generation-template A skill for generating code from templates: project scaffolding, boilerplate, AST-based generation and template engines. Useful when you need to produce repetitive code fast. CX Codex +1 532installs grpc-service-development This skill walks your agent through gRPC service work: Protocol Buffers contracts, four call patterns, servers in Node.js and Python. CX Codex +1 527installs gap-analysis Compares your current state with the desired one and lists what is missing. Useful before big investments or a roadmap rewrite. CX Codex +1 526installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor