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.
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/gcp-cloud-run/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gcp-cloud-run/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a codex2Manually: put the files in place
.agents/skills/gcp-cloud-run/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a cursor2Manually: put the files in place
.cursor/skills/gcp-cloud-run/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts gcp-cloud-run2Manually: put the files in place
.github/skills/gcp-cloud-run/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/gcp-cloud-runManually: put the files in place
.devin/skills/gcp-cloud-run/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gcp-cloud-run -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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