Skip to content

BuilderIO/agent-native / templates/analytics/.builder/skills/gcloud

gcloud

Verified

Monitor Google Cloud Run services and Cloud Functions health, metrics, and logs. Use this skill when the user asks about service health, request counts, latencies, or cloud infrastructure.

FileKindSize
SKILL.mdskill md3.7 KB
---
name: gcloud
description: >
  Monitor Google Cloud Run services and Cloud Functions health, metrics, and logs.
  Use this skill when the user asks about service health, request counts, latencies, or cloud infrastructure.
---

# Google Cloud Integration

## Connection

- **Project**: `BIGQUERY_PROJECT_ID` from Settings → Data sources
- **Service account**: from `GOOGLE_APPLICATION_CREDENTIALS_JSON`
- **Auth**: `GOOGLE_APPLICATION_CREDENTIALS_JSON` credential (JSON credentials string) — no ADC fallback
- **IAM roles**: `monitoring.viewer`, `run.viewer`, `cloudfunctions.viewer`, `logging.viewer`
- **Caching**: 5-minute in-memory cache, max 120 entries

## Server Lib & API Routes

- **File**: `server/lib/gcloud.ts`

### Exported Functions

| Function                                                                    | Description                        |
| --------------------------------------------------------------------------- | ---------------------------------- |
| `listCloudRunServices()`                                                    | List all Cloud Run services        |
| `listCloudFunctions()`                                                      | List all Cloud Functions           |
| `queryMetrics(filter, period, aligner?, reducer?, groupBy?)`                | Query Cloud Monitoring time series |
| `getServiceMetrics(serviceType, serviceName, metric, period, extraFilter?)` | Convenience metric query           |
| `listLogEntries(filter, pageSize?)`                                         | Read Cloud Logging entries         |

### API Routes

| Route                      | Description             |
| -------------------------- | ----------------------- |
| `GET /api/gcloud/services` | List Cloud Run services |
| `GET /api/gcloud/metrics`  | Query metrics           |
| `GET /api/gcloud/logs`     | Read log entries        |

### Agent Action

Use `gcloud` for agent-facing Google Cloud work. Do not call
`/api/gcloud/*` directly from the agent.

| Mode       | Args                                                        | Description                                 |
| ---------- | ----------------------------------------------------------- | ------------------------------------------- |
| `services` |                                                             | List Cloud Run services and Cloud Functions |
| `metrics`  | `service`, `serviceType`, `metric`, `period`, `extraFilter` | Query Cloud Monitoring                      |
| `logs`     | `service`, `serviceType`, `severity`, `limit`               | Read Cloud Logging                          |

### Dashboard

- `/adhoc/gcloud` — Google Cloud Health dashboard

## Google Cloud APIs Used

- Cloud Run Admin API v2: `/v2/projects/{project}/locations/-/services`
- Cloud Functions API v2: `/v2/projects/{project}/locations/-/functions`
- Cloud Monitoring API v3: `/v3/projects/{project}/timeSeries`
- Cloud Logging API v2: `/v2/entries:list`

## Key Metrics

- **Cloud Run**: `run.googleapis.com/request_count`, `request_latencies`, `container/instance_count`, `container/cpu/utilization`
- **Cloud Functions**: `cloudfunctions.googleapis.com/function/execution_count`, `execution_times`, `active_instances`

## Key Patterns & Gotchas

- **Scale**: 78 Cloud Run services, 237+ Cloud Functions — UI uses searchable dropdown
- **Alignment periods**: 1h→60s, 6h→300s, 24h→600s, 7d→3600s
- `getServiceMetrics` auto-selects aligner/reducer based on metric name (latency→percentile, request_count→ALIGN_DELTA, memory→ALIGN_MEAN)
- `queryMetrics` maps point values from `doubleValue`, `int64Value`, or distribution mean
- `listLogEntries` uses POST payload; returns entries reversed
- Project ID comes from the user's configured `BIGQUERY_PROJECT_ID`.
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall