Official agent skill

Cloud Logging Configuration Basics

by google in google/skills

Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (Default) filter, IAM permissions for views (Logs…

OfficialApache-2.0Auto-check passedSecurity

Install Cloud Logging Configuration Basics

skills CLI
$ npx skills add google/skills --skill cloud-logging-configuration-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills cloud-logging-configuration-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/cloud-logging-configuration-basics .claude/skills/cloud-logging-configuration-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cloud-logging-configuration-basics
GitHub stars
21k
Token cost
~3.5k tokens
SKILL.md length
1,395 words
Files
1
Skills in repo
145
Repo updated
First seen
Licence
Apache-2.0

At a glance

Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (Default) filter, IAM permissions for views (Logs…

  • Works in 6 steps: Create a logs-based counter metric (Tier… → Verify the logs-based metric (Tier R) → Exclude sensitive logs from default view… → …
  • Cross-project logging
  • SKILL.md covers Safety and Confirmation Tiers…, Getting Started, Creating Log Buckets… and Logs-Based Metrics, plus 4 more sections
  • Calls gcloud

What it does

Cloud Logging Configuration Basics is an agent skill from google/skills, published by the product's own GitHub organization. Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (Default) filter, IAM permissions for views (Logs View Accessor, IAM conditions), logs-based metrics, log exclusions, and sampling. Don't use for cross-project logging or multi-project setups.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security. It works with Google Cloud. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Cross-project logging
  • Multi-project setups

Example prompts

  • “/cloud-logging-configuration-basics”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Create a logs-based counter metric (Tier B)
  2. Verify the logs-based metric (Tier R)
  3. Exclude sensitive logs from default view (Tier M)
  4. Create a log view (Tier M)
  5. Grant access to log view using IAM conditions (Tier B)
  6. Verify Sensitive Log Restrictions (Tier R)

What it can do on your machine

Read from SKILL.md and the folder at commit 8a1ac05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cloud Logging Configuration Basics loads about 3.5k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 1,395 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 8a1ac05, republished under its Apache-2.0 licence (© google). 1,395 words, ~3,463 tokens.

Download SKILL.mdSave it as .claude/skills/cloud-logging-configuration-basics/SKILL.md (or your agent's skills folder).
name
cloud-logging-configuration-basics
description
Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (_Default) filter, IAM permissions for views (Logs View Accessor, IAM conditions), logs-based metrics, log exclusions, and sampling. Don't use for cross-project logging or multi-project setups.
metadata.version
1.0.0
metadata.category
CloudObservabilityAndMonitoring

Configuring Cloud Logging

Use this skill to configure Cloud Logging resources such as log buckets, log views, or log sinks.

[!IMPORTANT] Sandbox Network Limitation (CRITICAL for Agent Testing): During evaluation or in restricted sandboxed environments, network traffic to Google Cloud APIs is blocked. Do NOT run network discovery commands to find resource names, project IDs, or organization IDs. Always use the exact project IDs or placeholders provided in the user prompt or instructions for example, {project_id}. Assume these resources exist and proceed directly with configuration commands. Running these discovery commands will cause the execution to hang and timeout.

Safety and Confirmation Tiers (CRITICAL)

Before executing any commands on behalf of the user, you MUST adhere to the following safety tiers based on the action requested:

  1. Tier R: Read-Only
    • Description: Commands that only read state or query logs.
    • Example commands:
      • gcloud logging read
      • gcloud logging buckets list
    • Rule: No confirmation needed. You may execute these commands immediately to gather information.
  2. Tier M: Mutation (Non-Billing)
    • Description: Configuration modifications or free metadata creations that do not incur direct storage or billing costs and do not affect resource security/access policies.
    • Example commands:
      • gcloud logging views create
      • gcloud logging views update
      • gcloud logging scopes create
      • gcloud logging buckets create
    • Rule: No confirmation needed. You may execute these commands immediately to apply configurations.
  3. Tier B: Billing and Security-Sensitive Mutations (High-Risk)
    • Description: Operations that create billing-inducing resources or integrations, or modify security and IAM access control policies (presenting a risk of privilege escalation).
    • Example commands:
      • gcloud logging metrics create
      • gcloud logging links create
      • gcloud projects add-iam-policy-binding
    • Rule: Interactive confirmation required. These commands create resources that incur billing costs or alter security access. You MUST present the exact, literal command and receive user confirmation before executing. NEVER execute in the same turn as asking.
  4. Tier D: Causes irreversible data loss
    • Description: Actions that permanently discard or delete logs, for example sink exclusions.
    • Example commands:
      • gcloud logging buckets delete
      • gcloud logging sinks update --add-exclusion
    • Rule: Explicit typed confirmation required. These commands discard or delete logs immediately and irreversibly, or they may result in log data not being stored. You MUST ask for explicit typed confirmation, for example, "Yes, discard logs", and halt execution until the user replies.

Getting Started

If the gcloud executable is missing, refer to the Google Cloud CLI Installation Guide to install it.

Creating Log Buckets (Compliance and Analytics) (Tier M)

To create a regional log bucket with a specific retention policy for regulatory compliance, and with Observability Analytics enabled:

[!WARNING] Mandatory Observability Analytics Downgrade Warning: Whenever providing guidance, writing a guide, or drafting commands on Cloud Logging cost optimization or exclusions, you must explicitly include the following warning in your final text response and any generated guides: "After a log bucket has been upgraded to use Observability Analytics, it cannot be downgraded to remove the analytics capability."

bash
gcloud logging buckets create {bucket_id} \
    --project={project_id} \
    --location={region} \
    --retention-days={retention_days} \
    --enable-analytics
  • {bucket_id}: for example, my-custom-bucket
  • {region}: for example, us-central1. You must use a regional log bucket to also use Observability Analytics.
  • {retention_days}: for example, 365

A log bucket incurs no storage or ingestion charges until logs are routed to it with a log sink.

Verify the Log Bucket (Tier R)

Check the log bucket's configuration to verify its compliance:

bash
gcloud logging buckets describe {bucket_id} \
    --location={region} \
    --project={project_id}
Route logs to the Log Bucket (Tier B)

[!IMPORTANT] Billing Action (Tier B): Routing log entries to a bucket incurs ongoing charges based on the volume of data stored. You MUST get interactive user confirmation before running this command.

Log entries are stored in the log bucket only if a log sink filter matches the entries and targets that bucket.

To route log entries to the log bucket:

bash
gcloud logging sinks create {sink_id} \
    projects/{project_id}/locations/{region}/buckets/{bucket_id} \
    --log-filter='{filter_expression}' \
    --project={project_id}

Logs-Based Metrics

Logs-based metrics count the number of log entries that match a filter, allowing you to track error rates and set up alerting policies.

1. Create a logs-based counter metric (Tier B)

[!IMPORTANT] Billing Action (Tier B): Creating logs-based metrics incurs ongoing charges based on the volume of data points reported. You MUST get interactive user confirmation before running this command.

To count the occurrences of a specific log pattern, for example, "OutOfMemory" errors:

bash
gcloud logging metrics create {metric_name} \
    --log-filter='{filter_expression}' \
    --description='{description}' \
    --project={project_id}
  • {metric_name}: for example, oom_error_count
  • {filter_expression}: for example, textPayload:"OutOfMemory"
  • {description}: for example, "Count of log entries about OOMs"

Refer to REST Resource: projects.metric for restrictions on the metric fields.

2. Verify the logs-based metric (Tier R)

To verify that the metric exists and inspect its configuration, use the describe command:

bash
gcloud logging metrics describe {metric_name} \
    --project={project_id}

Restricting Access to Sensitive Logs (Security)

Anyone with roles/logging.viewer on that project can see logs in a project's _Default log bucket via _Default log view. To restrict visibility of the logs:

[!IMPORTANT] Ambiguity Handling (Guidance for Agents): If the user asks to "exclude", "hide", or "remove" sensitive logs without explicitly specifying whether they want to stop storing them, you MUST default to excluding them from the default view (Step 1). This is a safe, non-destructive Tier M action. Only configure a storage exclusion (under the "Discarding Sensitive Logs from Storage" section) if the user explicitly uses destructive terms like "stop storing", "permanently discard", or "sink exclusion".

Show full SKILL.md (563 more words)Show less
1. Exclude sensitive logs from default view (Tier M)

To explicitly exclude sensitive logs from general access, update the filter for the _Default log view:

bash
gcloud logging views update _Default \
    --bucket=_Default \
    --location=global \
    --project={project_id} \
    --log-filter='NOT LOG_ID("cloudaudit.googleapis.com/data_access") AND NOT LOG_ID("externalaudit.googleapis.com/data_access") AND NOT LOG_ID("{sensitive_log_id}")'
2. Create a log view (Tier M)

Create a new log view that includes the sensitive logs in the project's _Default log bucket. For example, a "security-logs-view" with access to the {sensitive_log_id}

bash
gcloud logging views create security-logs-view \
    --bucket=_Default \
    --location=global \
    --project={project_id} \
    --log-filter='LOG_ID("{sensitive_log_id}")' \
    --description="Sensitive logs"
3. Grant access to log view using IAM conditions (Tier B)

[!IMPORTANT] Security Action (Tier B): Granting IAM permissions changes access control policy and must be explicitly confirmed by the user before execution.

To restrict access to log view use IAM. When granting the Logs Viewer Accessor role, always attach an IAM condition that restricts the grant to a specific log view. For example, to grant {security_group_email} access ONLY to the security-logs-view in the _Default bucket:

bash
gcloud projects add-iam-policy-binding {project_id} \
--member='group:{security_group_email}' \
--role='roles/logging.viewAccessor' \
--condition="expression=resource.name=='projects/{project_id}/locations/global/buckets/_Default/views/security-logs-view',title=Restricted to Specific Log View,description=Only allows access to the specified log view"

Replace {location} with the location of the log bucket, for example global or a regional location like us-central1.

4. Verify Sensitive Log Restrictions (Tier R)

To verify that your Log View for sensitive logs is configured correctly:

bash
gcloud logging views describe {view_id} \
    --bucket={bucket_id} \
    --location={region} \
    --project={project_id}

Ensure that the filter block contains the appropriate restriction expression.


Discarding Sensitive Logs from Storage (Tier D)

If your organization's compliance policies prohibit storing sensitive logs at all, you can configure an exclusion to discard them before they are written to disk.

[!CAUTION] Destructive Action (Tier D): Excluding logs from all log sinks deletes the log entries immediately and irreversibly.

Safety Rule: You MUST ask the user for explicit typed confirmation, for example, "I confirm I want to exclude {sensitive_log_id} logs from storage", before running this command. Same-Turn Restriction: Do NOT execute the gcloud logging sinks update command in the same turn as asking for confirmation. Stop tool execution immediately and wait for the user to reply.

Exclude sensitive logs from storage using sink exclusions

bash
gcloud logging sinks update _Default \
    --project={project_id} \
    --add-exclusion=name=exclude-sensitive,filter='LOG_ID("{sensitive_log_id}")'

Cost Optimization (Reducing Logging Costs)

Cloud Logging costs are based on the volume of data ingested and stored. You can reduce costs by excluding high-volume, low-value logs or by sampling them. Each log sink that routes logs to a distinct log bucket contributes to cost and is a candidate for optimization.

[!CAUTION] Destructive Actions (Tier D): Exclusions in this section may immediately halt storage of log entries.

Safety Rule: You MUST ask for explicit typed confirmation (for example, "I confirm I want to exclude load balancer logs") before executing exclusions or sampling updates.

Exclude all high-volume logs (Tier D)

To completely stop ingesting a specific type of log into a log bucket, add an exclusion to the log sinks that route logs into that bucket.

bash
gcloud logging sinks update {sink_id} \
    --project={project_id} \
    --add-exclusion=name={exclusion_name},filter={exclusion_filter}
  • {sink_id}: for example '_Default'
  • {exclusion_name}: for example 'exclude-lb-logs'
  • {exclusion_filter}: for example 'resource.type="http_load_balancer"'
Sample high-volume logs (Tier D)

If you need some logs for analysis but want to reduce volume, use the sample() function in the exclusion filter.

[!IMPORTANT] The sample(field, fraction) function matches a fraction of logs. When used in an exclusion filter, the matched logs are discarded. If you exclude 90% of log entries, then only 10% are retained. To exclude 90%, use sample(insertId, 0.9) in the exclusion filter.

To exclude 90% of DEBUG severity logs:

bash
gcloud logging sinks update _Default \
    --project={project_id} \
    --add-exclusion=name=sample-debug-logs,filter='severity=DEBUG AND sample(insertId, 0.9)'
Verify Log Exclusions and Cost Optimization (Tier R)

To verify that log exclusions are correct, list the details of the sink and check the exclusions to ensure your filter is present. For example, for the _Default sink:

bash
gcloud logging sinks describe _Default --project={project_id}

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cloud/cloud-logging-configuration-basics of google/skills.

Open the folder on GitHubat commit 8a1ac05

Compare with similar skills

Cloud Logging Configuration Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cloud Logging Configuration Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cloud Logging Configuration Basics this skillgoogle/skills21k—~3.5kAutomated safety check: PassApache-2.0
Warp Vulnerability Triagewarpdotdev/warp65k1 repos~2.1kAutomated safety check: PassAGPL-3.0
Cloud Auditbriiirussell/cybersecurity-skills412—~1.3kAutomated safety check: NotesMIT
Configuring Identity Aware Proxy With Google Iapmukul975/Anthropic-Cybersecurity-Skills34k—~3.7kAutomated safety check: PassApache-2.0
Implementing Beyondcorp Zero Trust Access Modelmukul975/Anthropic-Cybersecurity-Skills34k—~3.5kAutomated safety check: PassApache-2.0
Auditing Cloud With Cis Benchmarksmukul975/Anthropic-Cybersecurity-Skills34k—~3kAutomated safety check: PassApache-2.0

Similar skills

  • Gathers security findings from Dependabot, GCP container scanning, Docker Scout and Linear security issues, then triages and remediates them across Warp's repos and images.

    65k GitHub starsUsed in 1 repo~2.1k tokens
    SecurityAuto-check passed
  • Cloud Audit

    briiirussell/cybersecurity-skills

    Audit cloud infrastructure (AWS, GCP, Azure) for misconfigurations, excessive permissions, and security gaps.

    412 GitHub stars~1.3k tokensUpdated 4 mo ago
    SecurityAuto-check: notes
  • Configuring Identity Aware Proxy With Google Iap

    mukul975/Anthropic-Cybersecurity-Skills

    Configures Google Cloud Identity-Aware Proxy (IAP) via gcloud to enforce per-request identity verification on Compute Engine, App Engine, Cloud Run, and GKE, including IAM bindings, Access Context…

    34k GitHub stars~3.7k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Implementing Beyondcorp Zero Trust Access Model

    mukul975/Anthropic-Cybersecurity-Skills

    Implement Google's BeyondCorp zero trust access model using Cloud IAP, Access Context Manager, Endpoint Verification, Chrome Enterprise Premium, and BeyondCorp Enterprise Connectors to enforce…

    34k GitHub stars~3.5k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Auditing Cloud With Cis Benchmarks

    mukul975/Anthropic-Cybersecurity-Skills

    Audit AWS, Azure, and GCP environments against the CIS Foundations Benchmarks by running automated scans with tools like Prowler and ScoutSuite, interpreting failed controls, and tracking…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Implementing Cloud Security Posture Management

    mukul975/Anthropic-Cybersecurity-Skills

    Continuously monitor multi-cloud environments (AWS, Azure, GCP) for misconfigurations, compliance violations, and security risks using Prowler, ScoutSuite, AWS Security Hub, Microsoft Defender for…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    SecurityAuto-check passed

More from google/skills

All 145 skills in this repo
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Official

    Analyzes BigQuery slot use, query costs and execution bottlenecks from INFORMATION_SCHEMA to diagnose slow queries, slot contention and unpartitioned scans.

    21k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Cloud Logging Configuration Basics

What does Cloud Logging Configuration Basics do?

Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (Default) filter, IAM permissions for views (Logs…. Cloud Logging Configuration Basics is an agent skill from google/skills, published by the product's own GitHub organization. Configure single-project Google Cloud Logging: regional log buckets, log sinks, log views, restricting or hiding sensitive logs in the default view (Default) filter, IAM permissions for views (Logs View Accessor, IAM conditions), logs-based metrics, log exclusions, and sampling.

When should I use Cloud Logging Configuration Basics?

Cloud Logging Configuration Basics fits situations like: cross-project logging; multi-project setups.

How do I install Cloud Logging Configuration Basics in Claude Code?

Run `npx skills add google/skills --skill cloud-logging-configuration-basics -a claude-code`. Or copy the skill folder (skills/cloud/cloud-logging-configuration-basics in google/skills) into .claude/skills/cloud-logging-configuration-basics in your project. Claude Code loads it when a task matches its description.

How do I install Cloud Logging Configuration Basics in Codex?

Run `npx skills add google/skills --skill cloud-logging-configuration-basics -a codex`. Or copy the skill folder (skills/cloud/cloud-logging-configuration-basics in google/skills) into .agents/skills/cloud-logging-configuration-basics in your project. Codex loads it when a task matches its description.

Can I use Cloud Logging Configuration Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill cloud-logging-configuration-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cloud-logging-configuration-basics, .gemini/skills/cloud-logging-configuration-basics, .github/skills/cloud-logging-configuration-basics and .opencode/skills/cloud-logging-configuration-basics in your project.

What does Cloud Logging Configuration Basics need to run?

Going by SKILL.md and its folder, Cloud Logging Configuration Basics needs the command-line tools its instructions call (gcloud).

Does Cloud Logging Configuration Basics access the network?

SKILL.md names 1 domain. As links in the text: docs.cloud.google.com. This is read from the text; nothing was executed.

Is Cloud Logging Configuration Basics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cloud Logging Configuration Basics use?

Cloud Logging Configuration Basics is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cloud Logging Configuration Basics use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cloud Logging Configuration Basics?

Skills that share tags, products or a category with Cloud Logging Configuration Basics: Warp Vulnerability Triage (warpdotdev/warp, 65k stars), Cloud Audit (briiirussell/cybersecurity-skills, 412 stars), Configuring Identity Aware Proxy With Google Iap (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Implementing Beyondcorp Zero Trust Access Model (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cloud Logging Configuration Basics?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 20,994 GitHub stars. The repository holds 145 skills in this directory. The repository was last updated on October 6, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.