Cloud Run is a managed application platform for running code, functions, or containers. It allows users to deploy scalable applications without managing infrastructure.
$ npx skills add https://github.com/google/skills --skill cloud-run-basicsCloud Run Basics is an agent skill that enables developers to deploy code, functions, and containers on Google's managed application platform. It abstracts away infrastructure management, allowing teams to focus on application logic while Google Cloud handles scaling, security, and operational overhead. This skill integrates with AI agents like Claude Code and Cursor, providing automated deployment and management capabilities. It's ideal for teams building microservices, APIs, background jobs, or event-driven applications who want to reduce DevOps complexity. The skill is part of Google's official Agent Skills repository and supports rapid iteration and production-ready deployments.
Install using npm with the command provided.
Deploy stateless web applications that scale automatically.
Run scheduled jobs that complete tasks automatically.
Manage background workloads from pull-based systems like Kafka.
Execute parallel tasks on a flexible schedule.
$ npx skills add https://github.com/google/skills --skill cloud-run-basicsgit clone https://github.com/google/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
I need help deploying a [FRAMEWORK/TECHNOLOGY, e.g., Flask, Django, Node.js] application to Google Cloud Run. The app uses [SPECIFIC DEPENDENCIES, e.g., PostgreSQL, Redis, Firebase]. Can you provide a step-by-step guide to containerize and deploy it? Include commands for Dockerfile creation, gcloud CLI setup, and deployment. Assume [COMPANY] is using a CI/CD pipeline and wants to minimize downtime during deployment.
# Cloud Run Deployment Guide for [COMPANY]'s E-Commerce API
## Prerequisites
- Google Cloud account with billing enabled
- `gcloud` CLI installed and authenticated
- Docker installed locally
- GitHub Actions or Cloud Build configured for CI/CD
## Step 1: Containerize the Application
```dockerfile
# Dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "app:app"]
```
## Step 2: Build and Test Locally
```bash
docker build -t ecommerce-api .
docker run -p 8080:8080 ecommerce-api
```
## Step 3: Deploy to Cloud Run
```bash
gcloud builds submit --tag gcr.io/[PROJECT-ID]/ecommerce-api
gcloud run deploy ecommerce-api \
--image gcr.io/[PROJECT-ID]/ecommerce-api \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--memory 512Mi
```
## Step 4: Set Up Auto-Scaling
```bash
gcloud run services update ecommerce-api \
--min-instances 1 \
--max-instances 10 \
--cpu-throttling
```
## Step 5: Configure CI/CD (GitHub Actions Example)
```yaml
name: Deploy to Cloud Run
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: google-github-actions/[email protected]
with:
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- run: gcloud builds submit --tag gcr.io/${{ secrets.GCP_PROJECT }}/ecommerce-api
- run: gcloud run deploy ecommerce-api --image gcr.io/${{ secrets.GCP_PROJECT }}/ecommerce-api --region us-central1
```
## Monitoring
- View logs: `gcloud logging read "resource.type=cloud_run_revision" --limit 50`
- Check metrics: Cloud Console > Cloud Run > [SERVICE_NAME] > MetricsTake a free 3-minute scan and get personalized AI skill recommendations.
Take free scan