GC

gcloud-usage

Tools for querying GCP logs and analyzing production metrics for debugging.

Install

mkdir -p .claude/skills/gcloud-usage && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7035" && unzip -o skill.zip -d .claude/skills/gcloud-usage && rm skill.zip

Installs to .claude/skills/gcloud-usage

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

This skill should be used when user asks about "GCloud logs", "Cloud Logging queries", "Google Cloud metrics", "GCP observability", "trace analysis", or "debugging production issues on GCP".
190 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Query Cloud Logging using structured filters
  • Analyze trace data for distributed systems
  • Design alert policies for observability
  • Optimize log costs via exclusion filters

How it works

It provides structured query syntax and best practices for filtering and analyzing logs, metrics, and traces within GCP.

Inputs & outputs

You give it
GCP observability or debugging request
You get back
Log query syntax, trace analysis, or alert configuration

When to use gcloud-usage

  • Querying Cloud Logging
  • Analyzing trace data
  • Debugging production issues
  • Setting up observability metrics

About this skill

GCP Observability Best Practices

Structured Logging

JSON Log Format

Use structured JSON logging for better queryability:

{
  "severity": "ERROR",
  "message": "Payment failed",
  "httpRequest": { "requestMethod": "POST", "requestUrl": "/api/payment" },
  "labels": { "user_id": "123", "transaction_id": "abc" },
  "timestamp": "2025-01-15T10:30:00Z"
}

Severity Levels

Use appropriate severity for filtering:

  • DEBUG: Detailed diagnostic info
  • INFO: Normal operations, milestones
  • NOTICE: Normal but significant events
  • WARNING: Potential issues, degraded performance
  • ERROR: Failures that don't stop the service
  • CRITICAL: Failures requiring immediate action
  • ALERT: Person must take action immediately
  • EMERGENCY: System is unusable

Log Filtering Queries

Common Filters

# By severity
severity >= WARNING

# By resource
resource.type="cloud_run_revision"
resource.labels.service_name="my-service"

# By time
timestamp >= "2025-01-15T00:00:00Z"

# By text content
textPayload =~ "error.*timeout"

# By JSON field
jsonPayload.user_id = "123"

# Combined
severity >= ERROR AND resource.labels.service_name="api"

Advanced Queries

# Regex matching
textPayload =~ "status=[45][0-9]{2}"

# Substring search
textPayload : "connection refused"

# Multiple values
severity = (ERROR OR CRITICAL)

Metrics vs Logs vs Traces

When to Use Each

Metrics: Aggregated numeric data over time

  • Request counts, latency percentiles
  • Resource utilization (CPU, memory)
  • Business KPIs (orders/minute)

Logs: Detailed event records

  • Error details and stack traces
  • Audit trails
  • Debugging specific requests

Traces: Request flow across services

  • Latency breakdown by service
  • Identifying bottlenecks
  • Distributed system debugging

Alert Policy Design

Alert Best Practices

  • Avoid alert fatigue: Only alert on actionable issues
  • Use multi-condition alerts: Reduce noise from transient spikes
  • Set appropriate windows: 5-15 min for most metrics
  • Include runbook links: Help responders act quickly

Common Alert Patterns

Error rate:

  • Condition: Error rate > 1% for 5 minutes
  • Good for: Service health monitoring

Latency:

  • Condition: P99 latency > 2s for 10 minutes
  • Good for: Performance degradation detection

Resource exhaustion:

  • Condition: Memory > 90% for 5 minutes
  • Good for: Capacity planning triggers

Cost Optimization

Reducing Log Costs

  • Exclusion filters: Drop verbose logs at ingestion
  • Sampling: Log only percentage of high-volume events
  • Shorter retention: Reduce default 30-day retention
  • Downgrade logs: Route to cheaper storage buckets

Exclusion Filter Examples

# Exclude health checks
resource.type="cloud_run_revision" AND httpRequest.requestUrl="/health"

# Exclude debug logs in production
severity = DEBUG

Debugging Workflow

  1. Start with metrics: Identify when issues started
  2. Correlate with logs: Filter logs around problem time
  3. Use traces: Follow specific requests across services
  4. Check resource logs: Look for infrastructure issues
  5. Compare baselines: Check against known-good periods

When not to use it

  • When debugging non-GCP infrastructure
  • When real-time log streaming is not required

Limitations

  • Limited to GCP observability tools
  • Requires understanding of structured log formats

How it compares

It focuses on GCP-specific observability patterns and structured JSON logging rather than generic log searching.

Compared to similar skills

gcloud-usage side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
gcloud-usage (this skill)17moNo flagsIntermediate
devops-troubleshooter14moNo flagsAdvanced
autotel01moReviewIntermediate
ai-debug-harness03moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

devops-troubleshooter

sickn33

Expert DevOps troubleshooter specializing in rapid incident response, advanced debugging, and modern observability. Masters log analysis, distributed tracing, Kubernetes debugging, performance optimization, and root cause analysis. Handles production outages, system reliability, and preventive monitoring. Use PROACTIVELY for debugging, incident response, or system troubleshooting.

12

autotel

jagreehal

Use when instrumenting with trace/span/track, reviewing code for logging and observability patterns, converting console.log to wide events, adding structured errors, setting up canonical log lines, configuring init(), adding subscribers, or working in the autotel monorepo.

00

ai-debug-harness

DeandreFu

Self-driving Electron + Node debug harness with NDJSON logs, Playwright E2E, doctor preflight, and a YAML-frontmatter cookbook of known causes. Use when a voice-chat E2E flow misbehaves locally, audio publish silently fails, the agent worker emits warnings, or any LiveKit/Electron/Fastify error appe

00

analyze-prod-issue

MaxPayne89

>-

00

service-mesh-observability

wshobson

Implement comprehensive observability for service meshes including distributed tracing, metrics, and visualization. Use when setting up mesh monitoring, debugging latency issues, or implementing SLOs for service communication.

574

observability-monitoring-monitor-setup

sickn33

You are a monitoring and observability expert specializing in implementing comprehensive monitoring solutions. Set up metrics collection, distributed tracing, log aggregation, and create insightful da

12

Search skills

Search the agent skills registry