Agent skill
gcp-debugging
GCP debugging and investigation patterns. Use when checking Cloud Logging, debugging Cloud Run services, investigating production issues, verifying deployments, or checking Cloud Build status.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/gcp-debugging
SKILL.md
GCP Debugging Patterns
Cloud Logging
Tail Cloud Run logs (live):
gcloud logging tail "resource.type=cloud_run_revision AND resource.labels.service_name=gh-pr-linear-issue-linker" \
--project=your-project-id \
--format=json
Filter logs by severity:
gcloud logging read "resource.type=cloud_run_revision AND severity>=ERROR" \
--project=your-project-id \
--limit=50 \
--format=json
Search logs with filters:
gcloud logging read "resource.type=cloud_run_revision AND textPayload=~'webhook'" \
--project=your-project-id \
--freshness=1h \
--limit=100
Query specific time range:
gcloud logging read "resource.type=cloud_run_revision" \
--project=your-project-id \
--format=json \
--freshness=2h
Cloud Run Service Verification
Get service details:
gcloud run services describe gh-pr-linear-issue-linker \
--region=us-central1 \
--project=your-project-id \
--format=yaml
Check service status:
gcloud run services list --project=your-project-id --region=us-central1
Get recent revisions:
gcloud run revisions list \
--service=gh-pr-linear-issue-linker \
--region=us-central1 \
--project=your-project-id
View environment variables:
gcloud run services describe gh-pr-linear-issue-linker \
--region=us-central1 \
--project=your-project-id \
--format="yaml(spec.template.spec.containers[0].env)"
Cloud Build Investigation
List recent builds:
gcloud builds list \
--project=your-project-id \
--limit=10 \
--format="table(id,status,createTime,duration)"
Get build logs:
gcloud builds log {build-id} --project=your-project-id
Check build status:
gcloud builds describe {build-id} \
--project=your-project-id \
--format=json
Artifact Registry
List container images:
gcloud artifacts docker images list \
us-central1-docker.pkg.dev/your-project-id/gh-pr-linear-issue-linker \
--project=your-project-id
Get image details:
gcloud artifacts docker images describe \
us-central1-docker.pkg.dev/your-project-id/gh-pr-linear-issue-linker/app:latest \
--project=your-project-id
Secret Manager
List secrets:
gcloud secrets list --project=your-project-id
Get secret metadata:
gcloud secrets describe {secret-name} --project=your-project-id
Access secret value (for debugging):
gcloud secrets versions access latest \
--secret={secret-name} \
--project=your-project-id
Testing Webhook Locally
Send test webhook:
curl -X POST http://localhost:8000/webhook \
-H "Content-Type: application/json" \
-H "X-Hub-Signature-256: sha256=..." \
-d @test-payload.json
Check service health:
curl https://gh-pr-linear-issue-linker-xxxxx.run.app/health
Investigation Methodology
Phase 1: Context
- When does it occur?
- Which PRs/users are affected?
- Frequency (intermittent vs consistent)?
Phase 2: Evidence Collection
- Cloud Logging for error messages and traces
- Cloud Run revision history
- Cloud Build logs for deployment failures
- Webhook payload inspection (from GitHub delivery logs)
Phase 3: Proof Generation
Produce one of:
- Reproduced Test Case: pytest test that fails
- Log Evidence: Cloud Logging with stack trace and Logfire trace ID
- Webhook Payload: GitHub webhook delivery logs showing malformed data
- CI/CD Output: Cloud Build logs showing build/deploy failure
Always Specify
--project=your-project-idfor all gcloud commands--region=us-central1for regional resources (Cloud Run)--format=jsonfor programmatic parsing
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?