From gcloud-tools
Check Google Cloud billing setup, current costs, cost breakdowns by service/project, and budget alerts. Use when the user asks about GCP spending, billing, costs, budgets, or wants to understand what they're being charged for.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gcloud-tools:gcloud-costsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping the user understand their Google Cloud billing and costs.
You are helping the user understand their Google Cloud billing and costs.
/gcloud-tools:gcloud-costs
/gcloud-tools:gcloud-costs cloud run costs
/gcloud-tools:gcloud-costs this month
/gcloud-tools:gcloud-costs blue-harbour-marketing
When to use: When you want to check GCP spending, billing, costs, budgets, or understand what you're being charged for.
What you can ask:
What you get back: A formatted cost summary table with recommendations for savings.
$ARGUMENTS — Optional: a project ID, date range, or specific query (e.g. "this month", "cloud run costs", "all projects").
Run the relevant gcloud commands below based on what the user asks. Present results in a clear, readable format with totals and highlights.
# List billing accounts
gcloud billing accounts list
# Show which projects are linked to billing
gcloud billing projects list --billing-account=BILLING_ACCOUNT_ID
If BigQuery billing export is enabled:
# Query costs for current month
bq query --use_legacy_sql=false "
SELECT
project.id AS project,
service.description AS service,
ROUND(SUM(cost), 2) AS cost,
currency
FROM \`PROJECT_ID.billing_dataset.gcp_billing_export_v1_BILLING_ACCOUNT_ID\`
WHERE invoice.month = FORMAT_DATE('%Y%m', CURRENT_DATE())
GROUP BY project, service, currency
ORDER BY cost DESC
"
For Cloud Run specifically (most common for this user):
# List all Cloud Run services across projects
gcloud run services list --format="table(metadata.name, status.url, metadata.labels.'cloud.googleapis.com/location')"
# Get usage metrics for a specific service
gcloud run services describe SERVICE_NAME --region=REGION --format="yaml(status.traffic, spec.template.spec.containers[0].resources)"
# Check number of revisions (each consumes resources)
gcloud run revisions list --service=SERVICE_NAME --region=REGION --format="table(metadata.name, status.conditions[0].status, metadata.creationTimestamp)"
# Get cost breakdown for current billing period
gcloud billing budgets list --billing-account=BILLING_ACCOUNT_ID
# Describe a specific budget
gcloud billing budgets describe BUDGET_ID --billing-account=BILLING_ACCOUNT_ID
# List all enabled APIs (each may incur costs)
gcloud services list --enabled --project=PROJECT_ID
# Check Artifact Registry storage (images consume storage)
gcloud artifacts docker images list REGION-docker.pkg.dev/PROJECT_ID/REPO_NAME --format="table(package, createTime, updateTime)" --sort-by=~createTime --limit=10
# Check Cloud Build history (builds consume compute)
gcloud builds list --limit=10 --format="table(id, status, createTime, duration, source.storageSource.bucket)"
After gathering data, provide actionable advice:
# Delete a Cloud Run service
gcloud run services delete SERVICE_NAME --region=REGION --project=PROJECT_ID
# Delete old images (keep latest N)
gcloud artifacts docker images list REGION-docker.pkg.dev/PROJECT_ID/REPO_NAME --format="value(package)" --sort-by=createTime | head -n -3 | xargs -I{} gcloud artifacts docker images delete {} --quiet
# Disable unused APIs
gcloud services disable API_NAME --project=PROJECT_ID
Always present costs in a clear table format:
## GCP Cost Summary
**Billing Account:** My Billing Account (01215E-8780EA-F709E1)
**Period:** March 2026
| Project | Service | Cost (USD) |
|---------|---------|-----------|
| blue-harbour-marketing | Cloud Run | $0.00 |
| blue-harbour-marketing | Artifact Registry | $0.12 |
| blue-harbour-marketing | Cloud Build | $0.05 |
| **Total** | | **$0.17** |
### Recommendations:
- Service X has 0 requests — consider deleting to avoid minimum charges
- 15 old container images found — clean up to save storage costs
01215E-8780EA-F709E1 (My Billing Account)blue-harbour-marketing (project number: 72678620841)australia-southeast1gcloud billing projects listGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mercurial-weasel/bh-ops-claude-plugins --plugin gcloud-tools