cloud-logging-finops
What it does
This skill checks how much a Google Cloud project spends on logs and where that spending comes from. It is for teams that want to lower their logging bill.
When to use it
- ✓When you want to find out why your Cloud Logging costs are high.
- ✓When you need a FinOps report on log buckets, sinks and log volume for a project.
- ✓When you want copy-paste exclusion filters that cut down log entries you do not need.
Skill link
https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-finops/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My Google Cloud logging bill jumped this month. Find out what is causing it and suggest how to cut it.”
5 new skills a week. 1 minute to read.
How it works
It finds the billing export, reads log volume metrics and sinks, and matches them to the services and severities that create the most logs. It then writes a report with charts and suggested exclusion filters.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Cloud Logging Finops
Non-interactive runs. When no user can answer (e.g. a scheduled or
automated run), ask nothing: audit the project named in the request, or the
active gcloud project; use --billing-mode=search; cover all five report topics
(Step 2.5); and never enable an API or upgrade a log bucket. Put anything that
needed a user (a disabled API, a missing role, the upgrade advisory) in the
report instead.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Step 0: Locate the Cloud Billing Export
The audit covers one Google Cloud project, {project_id}: the project the user
names or, if they don't name one, the active gcloud project (gcloud config get project), confirmed with the user.
Discover everything else (log buckets, Observability Analytics, sinks, exclusions, metrics) yourself; never ask the user about those. The billing export is the exception: finding it unaided can mean scanning every project on the billing account, so ask once, before running anything, and don't start a search until the user has chosen answer 3 (single-select, using the host's question tool if it has one):
Do you know where the Cloud Billing export for
{project_id}is?
- Yes — here it is (the BigQuery table ID
project.dataset.table, or just the project and dataset)- There's no billing export for this project
- No / not sure — search for it (seconds on a small project; on a large billing account it can take a long time)
| Answer | Flags | Cost figures |
|---|---|---|
| 1 | --billing-mode=explicit plus --billing-table (or --billing-project/--billing-dataset) |
invoiced |
| 2 | --billing-mode=none |
list-price estimates |
| 3 | --billing-mode=search (default) |
invoiced if found, else estimates |
Answer 3's search has no time limit: it checks {project_id} first (usually
under 10 s, 1–2 min with many tables), then every project on its billing account
(can take many minutes; progress prints every 30 s). Tell the user this before
launching. If the wait is unacceptable, offer to switch to answer 1 (they look up
the table) or answer 2 (skip the export and use list-price estimates). Don't
suggest setting up an export to make the search faster.
If the search found an export, tell the user: "Next time, pass
--billing-table=<table> and discovery drops to about two seconds."
Step 1: Environment Setup
Check these prerequisites before Step 2; fix only what is missing:
- gcloud: if
gcloudis not installed, follow https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt. - Project: run
gcloud config get project; if it isn't{project_id}(from Step 0), rungcloud config set project {project_id}. - Credentials: the scripts use Application Default Credentials. Run
gcloud auth application-default login, or setGOOGLE_APPLICATION_CREDENTIALSto a service account key. - Billing: the project must have an active billing account attached.
- APIs: don't enable APIs up front; the Logging, Monitoring, BigQuery and
Observability APIs are on by default in new projects. Only if the collector
reports an API as disabled (
SERVICE_DISABLED, "has not been used in project"), name it, ask the user, and on approval rungcloud services enable {api} --project={project_id}(tagged as described below):logging,monitoring: required; without them there is nothing to audit.bigquery: invoiced costs from the billing export.observability: resolves the project's default log scope, so log samples match what Logs Explorer shows.cloudasset,cloudbilling: only answer 3's search across the billing account.
IAM roles for the identity running the audit. The skill never grants roles: the scripts run with the user's own credentials and read only what those credentials can. When a step fails on permissions, its advisory names the step; tell the user which role below it needs:
Role
FAQ
Does it change my log settings?
It writes the report and the filters for you to copy, so you choose whether to apply them.
Which project does it audit?
It audits one project, either the one you name or your active gcloud project.
Does it need the billing export?
Yes. It asks once where your Cloud Billing export is, so it can match costs to log volume.
Details
Original description by the author
Audits Cloud Logging costs for a Google Cloud project: the charges for log entries written to log buckets, the services, log streams and severities that drive them, and the log sinks that route them. Reconciles Cloud Billing export costs with Cloud Monitoring volume metrics, and generates a FinOps report with charts and copy-paste exclusion filters. Use when auditing Cloud Logging spend, finding logging waste, identifying top logging contributors, generating log cost reduction reports, or creating log sink exclusion filters. Don't use for querying log entries (use cloud-logging-query-generatio
repo: google/skills
Popularity
- GitHub stars
- 22k
- Ranking position
- #10238
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
finding-google-skills
22kHelps your agent find the right Google guides for a setup task, such as hosting, databases, storage, sign-in or AI model serving.
gcloud
22kHelps your agent write and check Google Cloud gcloud commands, looking up exact syntax before it runs anything so it does not guess flags.
google-cloud-recipe-auth
22kGuides your agent through Google Cloud identity and access, including how people and services sign in and which permissions they get.
google-cloud-recipe-onboarding
22kWalks a new developer through first steps on Google Cloud, including choosing a project, linking billing, and deploying a first resource.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.