cloudrun-agent
A Claude Code agent that analyzes your Google Cloud Run services and generates a visual dashboard with actionable findings.
Analyzes 6 dimensions: resource waste, performance bottlenecks, pricing, traffic & latency, security posture, and recommendations.
Part of Engineering Team — your engineering team on call.
Quick Start
pip install cloudrun-agent
cloudrun-agent install
This installs the agent definition and skills into ~/.claude/ so they're available in every Claude Code session.
Prerequisites
- Claude Code installed
- gcloud CLI installed and authenticated
- Python 3.10+
- GCP permissions: Cloud Run Viewer, Monitoring Viewer
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
Usage
In Claude Code (recommended)
Just ask Claude:
> analyze my cloud run services
> show me a dashboard of my cloud run fleet
> which services are wasting resources?
> are there security issues in my cloud run setup?
Claude will use the cloudrun-analyzer agent automatically.
Slash Commands
After install, these slash commands are available in Claude Code:
| Command | What it does |
|---|---|
/cloudrun-dashboard |
Visual fleet report in browser |
/cloudrun-check |
Quick health check in terminal |
/cloudrun-inspect |
Deep dive into a specific service |
/cloudrun-history |
Compare changes over time |
Standalone CLI
# HTML dashboard (opens in browser)
cloudrun-agent analyze --html
# JSON output
cloudrun-agent analyze
# Single service deep dive
cloudrun-agent analyze --service my-api --region us-central1
# Filter by project/region
cloudrun-agent analyze --html --project my-project --region europe-west1
# Skip metrics (faster, config-only analysis)
cloudrun-agent analyze --no-metrics
# View snapshot history
cloudrun-agent analyze --history
# Troubleshooting
cloudrun-agent analyze --verbose
What It Analyzes
Dashboard
The HTML dashboard includes:
- Health score — weighted 0-100 score based on finding severity
- KPI cards — service count, estimated monthly cost, daily requests, finding counts
- Services table — per-service CPU, memory, utilization, latency, cost, health status
- Findings by category — collapsible groups for Security, Resources, Performance, Traffic, Pricing
- Historical charts — time-series for request count, CPU utilization, latency (P50/P99), instance count
- Interactive filtering — click any service row to filter all charts
- Snapshot comparison — delta banner showing changes since last analysis
Finding Categories
| Category | What it checks |
|---|---|
| Security | Plaintext secrets in env vars, default service accounts, public ingress, IAM policies, VPC connectors |
| Resources | CPU/memory over-provisioning, utilization rates, min-instance idle costs |
| Performance | Cold start risk, concurrency settings, latency percentiles, error rates |
| Traffic | Request volume patterns, scaling behavior, billable instance time, traffic splits |
| Pricing | Cost breakdown (CPU, memory, requests, idle), optimization opportunities |
Severity Levels
- Critical — security risks or significant waste requiring immediate action
- Warning — optimization opportunities or potential issues
- Info — informational findings, architectural observations
How It Works
- Discovery — lists all Cloud Run services via
gcloud run services list - Configuration — fetches detailed config for each service (CPU, memory, scaling, IAM, env vars)
- Metrics — queries Cloud Monitoring API for the last 24h (requests, CPU, memory, latency, instances)
- Analysis — runs 5 analyzers against config + metrics to produce findings
- Dashboard — generates a self-contained HTML file with Chart.js visualizations
No data leaves your machine. All analysis runs locally using your gcloud credentials.
Development
git clone https://github.com/thisisfatih/eng-team
cd eng-team/cloud-architecture/cloud-run-specialist
uv sync
# Run tests
uv run pytest
# Run directly
uv run python -m cloudrun_agent.cli --html
License
MIT
Metadata
Release files for cloudrun-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloudrun_agent-0.1.0.tar.gz | 72.6 kB | Without provenance | Details for cloudrun_agent-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cloudrun_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cloudrun_agent-0.1.0-py3-none-any.whl |
Total release size: 117.0 kB
Release files / cloudrun_agent-0.1.0.tar.gz
| Download URL | cloudrun_agent-0.1.0.tar.gz |
|---|---|
| Size | 72.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a07cc6b16a511360c1b55d5cff28117ac8534a1b9e2dc6e184c346e19a72bc7
|
|
BLAKE2b-256 checksum How to use checksums |
40d909077041e491af551a5e8107bf305aaa22ba18e4c21b5ef655bde9c9ba76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / cloudrun_agent-0.1.0-py3-none-any.whl
| Download URL | cloudrun_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 44.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7de2f70c07ff6af70dfcfac5ebdfca405eeaae8e312eb9e0d22d6a704f1f517
|
|
BLAKE2b-256 checksum How to use checksums |
fddc817277bc72f69bc7696e9198a6ef09a7ed0480cae2f40f9009f2fb84eaec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for cloudrun-agent 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.