본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

skill-server_bill_monitor

Oratis Kamir 제작

DevOps & Cloud
—아직 평가 없음
내 평가

요약

generates daily Google Cloud Platform billing reports. It queries your GCP billing data via BigQuery and summarizes costs by service, highlights trends, and flags anomalies.

설명

이 스킬이 하는 일

  • **Daily cost breakdown** by GCP service (Compute Engine, Cloud Storage, BigQuery, etc.)
  • **Day-over-day comparison** with percentage change indicators
  • **Credits tracking** (sustained use discounts, committed use discounts, free tier)
  • **Anomaly detection** — flags services with >20% cost increase
  • **Multiple output formats** — Markdown, JSON, or ASCII table
  • **Auto-detection** of BigQuery billing export dataset and billing account
  • **Schedulable** — pair with Claude Code's `/schedule` for daily automated reports

예시 워크플로

### In Claude Code (as a skill)

Simply ask Claude about your cloud billing:

```

> What's my GCP bill for today?

> Show me yesterday's cloud costs broken down by service

> Generate a billing report for 2025-03-15

> How much am I spending on Compute Engine?

```

Or invoke directly with the slash command:

```

> /server-bill-monitor

> /server-bill-monitor --project my-project --date 2025-03-15

> /server-bill-monitor --format json

```

### Standalone Script

```bash

# Basic usage (auto-detects project, uses yesterday's date)

./scripts/gcp_billing_query.sh

# Specify project and date

./scripts/gcp_billing_query.sh --project my-gcp-project --date 2025-03-15

# JSON output saved to file

./scripts/gcp_billing_query.sh --format json --output ./reports/

# Table format for terminal

./scripts/gcp_billing_query.sh --format table

# Specify BigQuery dataset explicitly

./scripts/gcp_billing_query.sh --dataset billing_export --billing-account 012345-6789AB-CDEF01

# Without day-over-day comparison

./scripts/gcp_billing_query.sh --no-compare

```

### Schedule Daily Reports

#### With Claude Code `/schedule`

```

> /schedule "Run /server-bill-monitor every day at 9am"

```

#### With cron

```bash

# Edit crontab

crontab -e

# Add daily 9am report

0 9 * * * /path/to/gcp_billing_query.sh --project my-project --output /path/to/reports/ 2>&1

```

요구 사항

  • **Google Cloud SDK** (`gcloud` + `bq`) installed and authenticated
  • **BigQuery Billing Export** enabled in your GCP project
  • **jq** installed for JSON processing
  • IAM role: `roles/billing.viewer` and `roles/bigquery.dataViewer`

### Setting up BigQuery Billing Export

If you haven't set up billing export yet:

  • Go to [GCP Console → Billing → Billing export](https://console.cloud.google.com/billing/export)
  • Select the **BigQuery Export** tab
  • Choose or create a dataset (e.g., `billing_export`)
  • Enable **Standard usage cost** export
  • Wait 24-48 hours for initial data to populate

설치

https://github.com/oratis/skill-server_bill_monitor에서 스킬을 설치해줘

이 스킬은 ClawHub 레지스트리에 게시되지 않았습니다. 프롬프트를 코딩 에이전트(Claude Code, Cursor, Codex)에 붙여넣으면 소스 저장소에서 바로 스킬을 설치합니다.

저장소 열기

링크