Skip to main content
skill CX Codex

cloud-logging — skill for Claude Code: GCP logs

Skill for analyzing Google Cloud Logging and Error Reporting. Processes large JSON logs from GCP and converts them to Apache format for efficient analysis.

Apache-2.0 ★ 151 updated 2026-10-12

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Open on GitHub

What cloud-logging does

This skill provides utilities for examining logs, errors, and system health across Google Cloud deployments. The core feature is a bundled script that transforms Cloud Logging JSON exports into Apache Combined Log format, which uses far fewer tokens than ingesting raw files whole.

The skill includes a conversion script, test data, and guidance on filtering logs by severity (ERROR and above are less verbose) and time windows to avoid saturating your context. For long-running operations like gcloud logging read, it recommends using timeout or running in the background with periodic polling of results.

What it helps with

  • convert large GCP Cloud Logging JSON without bloating context
  • transform Cloud Logging output into Apache log format for analysis
  • filter errors by severity and time range to identify root causes
  • process Error Reporting data from Google Cloud efficiently

Example prompts for the agent

  • Convert logs from access_logs_raw.json to Apache format for inspection
  • Find all ERROR-level entries in logs from the past 6 hours
  • Run cloudlogging2apachelogs.py on the export and summarize HTTP status codes

How to install cloud-logging

1Plugin marketplace

/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre

This installs the whole sre-extension plugin with all its skills

2Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill cloud-logging -a claude-code

3Manually: put the files in place

~/.claude/skills/cloud-logging/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cloud-logging/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cloud-logging

How do I install cloud-logging in Claude Code?

Run /plugin marketplace add gemini-cli-extensions/sre, then /plugin install sre-extension@sre, then npx skills add gemini-cli-extensions/sre --skill cloud-logging -a claude-code. The skill will be ready at ~/.claude/skills/cloud-logging/SKILL.md.

What does cloud-logging do?

It helps you examine Google Cloud logs by converting JSON exports into Apache log format, saving context tokens. Includes a script for conversion, filtering advice by severity level, and time-window constraints to keep queries fast.

Why not just load the entire log file?

Large files quickly fill your context window. Use jq or the bundled script to filter relevant data before analysis.

Source text

SKILL.md · Apache-2.0
---
name: cloud-logging
description: 🐉 Skill for interacting with and analyzing Google Cloud Logging and Error Reporting. Use this when you need to process large JSON logs from GCP or convert them to Apache format for easier analysis.
metadata:
  author: Riccardo Carlesso
  version: 0.3.0
  status: published
---

# Cloud Logging 

This skill provides utilities for analyzing logs, errors, and system health across Google Cloud deployments.

* Prioritize Logs with `severity` >= "ERROR" as they tend to be less verbose.
* Constrain logs around the time of investigation (possibly going back a few hours/days to find smoking guns).


## Logs DOs and DONT's

Ingesting Logs into an LMM memory can easily saturate your context.

* [BAD] **DO NOT** ingest big files. Antipattern:  `ReadFile path/to/access_logs_raw.json`.
    * It's ok to get raw logs, but also use `jq` or scripts to read them without polluting your context window.
    * [GOOD] Use simple maniuplation like: `jq -r '.[] | .httpRequest.status'` to get a list of statuses.
    * [GOOD] Reduce size with scripts such as `scripts/cloudlogging2apachelogs.py <big_logfile.json>` (provided in the skill)
* [BAD] Do not call **long**-running calls without precautions, eg `gcloud logging read`
    * [GOOD] Rather prepend some reasonable `timeout 60 gcloud logging read ...`, or
    * [BEST] Use the `run_shell_command` tool with `is_background: true` and poll the results being dumped to file periodically.


## Bundled Scripts

### cloudlogging2apachelogs.py

Converts GCP Cloud Logging JSON exports into a format loosely resembling Apache Combined Log format. This is much more token-efficient for the LLM.

**Usage**:
```bash
python3 scripts/cloudlogging2apachelogs.py path/to/logs.json
```

**Testing**:
You can verify the script works by running its test:
```bash
python3 scripts/cloudlogging2apachelogs_test.py
```

## Bundled Assets

* `assets/sample_logs.json`: A small sample of GCP Cloud Logging JSON for testing conversion scripts.

© Riccardo Carlesso · Apache-2.0 · gemini-cli-extensions/sre

Similar skills

All skills for DevOps and infrastructure →

From the same set17

The whole set →
gcp-setup The gcp-setup skill checks and aligns identities across gcloud, Application Default Credentials, and kubectl at the start of your session. Use it to ensure all three systems authenticate as the same user before you begin working with GCP. CX Codex +1 ★ 151repo stars data-ingestion data-ingestion collects time-series points from CSV files or metric backends and converts them into standardized JSON. CX Codex +1 ★ 151repo stars gcp-slo-management gcp-slo-management finds services in Google Cloud Monitoring and creates availability or latency SLOs over the REST API, where gcloud has no command for it. CX Codex +1 ★ 151repo stars gcp-playbooks gcp-playbooks is a Claude Code skill with SRE playbooks for investigating GCP incidents and running mitigations across GKE and Cloud Run. CX Codex +1 ★ 151repo stars pre-publish-checker pre-publish-checker audits project files for profanity, internal links, sensitive paths, and unfinished development markers. Use it when preparing code or an extension for public release. CX Codex +1 ★ 151repo stars safe-sre-investigator safe-sre-investigator creates dedicated read-only service accounts for GCP and Kubernetes, then hands you gcloud and kubectl commands with a risk rating attached. CX Codex +1 ★ 151repo stars cloud-monitoring Interacts with Google Cloud Monitoring through MCP, rendering ASCII sparklines and concise CSV summaries to prevent context bloat. CX Codex +1 ★ 151repo stars postmortem-aggregator postmortem-aggregator turns Post Mortem files in a folder into incident statistics and updates POMO_AGGREGATED.md. Use it to spot recurring causes across incidents. CX Codex +1 ★ 151repo stars

Project sponsors

Companies that keep this analytics open