gcloud-usage

Diagnose GCP production issues with structured logging and query guidance.

1.0k|91|Updated Jul 9, 2025
One-click install
npx skills add https://github.com/fcakyon/claude-codex-settings --skill gcloud-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gcloud-usage
Source: https://github.com/fcakyon/claude-codex-settings/tree/main/plugins/gcloud-tools/skills/gcloud-usage
Command: npx skills add https://github.com/fcakyon/claude-codex-settings --skill gcloud-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you quickly reason about Google Cloud Platform observability topics when you ask about Cloud Logging, Cloud Monitoring metrics, trace analysis, or debugging production issues on GCP. It provides structured guidance on logging, querying, alerting, and cost optimization to reduce the complexity of observability tasks.

Core Features & Use Cases

  • Structured Logging: Use JSON logs and consistent field schemas to improve queryability.
  • Log Filtering Queries: Craft Cloud Logging queries to find relevant events by severity, resource, time, and text.
  • Metrics vs Logs vs Traces: Guidance on when to use metrics, logs, or traces to diagnose issues.
  • Alert Policy Design: Create actionable alerts with multi-condition patterns and runbooks.
  • Cost Optimization: Exclude verbose logs and apply sampling to manage ingestion costs.
  • Debugging Workflow: Stepwise approach to start from metrics, then correlate with logs and traces.

Quick Start

Ask the assistant to analyze a GCP issue: for example, "Show the last 24 hours of ERROR-level Cloud Logging for service my-service and export the results to CSV." Then ask for guidance to create a runbook.

Frequently Asked Questions about gcloud-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Cloud Logging to find ERROR-level events for debugging production issues?

Cloud Logging queries filter logs by severity, resource, and time range using structured syntax. Use filtering expressions like `severity=ERROR AND resource.type="gce_instance"` to isolate relevant events, then export results to CSV or other formats for analysis.

What's the best way to structure JSON logs for queryability in Google Cloud Platform?

Structured JSON logging with consistent field schemas improves queryability by enabling precise filtering and aggregation. Define a severity taxonomy, include resource identifiers, timestamps, and trace IDs, then ingest logs into Cloud Logging for efficient correlation across metrics and traces.

How do I create actionable alert policies in Cloud Monitoring?

Alert policies combine multiple conditions and thresholds to detect production issues early. Define multi-condition patterns tied to metrics or log-based measurements, attach runbooks with remediation steps, and route notifications to incident response teams for faster resolution.

When should I use metrics, logs, or traces to diagnose a GCP production issue?

Metrics aggregate system behavior over time and detect anomalies; logs provide detailed event context; traces show request flow across services. Start with metrics to identify the issue, correlate with logs for details, then use traces to understand service dependencies and latency.

How do I reduce Cloud Logging ingestion costs while maintaining observability?

Cost optimization involves excluding verbose or low-value logs, applying sampling strategies to high-volume services, and using log exclusion filters in Cloud Logging. Retain ERROR and critical logs at full fidelity while sampling DEBUG and INFO levels based on traffic patterns.