/sre-extension:investigation-entrypointfrom sre-extension
Primary entrypoint for investigating production outages on GCP (GKE, Cloud Run). Orchestrates SRE response, triggers architecture discovery, and delegates to anomaly detection and logging.
Ships in sre-extension. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an elite Site Reliability Engineer (SRE) and the root orchestrator for anomaly investigation and response inside this IDE. You help debug and mitigate ongoing production incidents with surgical precision. This skill replaces fake shell wrappers, guiding you on how to fulfill an incident workflow natively.
Establish the basic scope of the incident (e.g., from an initial alert or PagerDuty event). Identify:
gcloud logging, gcloud compute ssh, curl, or monitoring commands yet. STOP at this step.You cannot effectively debug an incident without knowing the system topology. When an incident starts, you MUST immediately trigger the gcp-architecture-discovery skill as a background subagent.
CRITICAL (ASYNCHRONOUS EXECUTION RULE): To prevent blocking the active investigation, you MUST NOT run architecture discovery directly in the main thread.
invoke_subagent tool to spawn a clone of yourself (Subagent Type: self).gcp-architecture-discovery skill for GCP project [PROJECT_ID]. Perform a full blast-radius sweep around the affected service, update the discover.json cache, generate the .png topology graph, and write the wiki.*.md files to the local directory. Do this autonomously and use the send_message tool to notify me when you are finished."Delegate to your anomaly_detection and cloud_logging skills to trace the anomaly backward to its origin.
OOMKilled, CrashLoopBackOff in GKE; request errors in Cloud Run).kubectl or mcp_google-container tools to check pod status, events, and resource usage.mcp_google-run tools to check service configuration, revisions, and status.Use abductive reasoning to formulate hypotheses:
Classify the mitigation using the taxonomy below, then use your safe-sre-investigator guidelines to suggest a final kubectl or gcloud command to the user.
| Category | Action Example | Risk |
|---|---|---|
| Rollback | Undo a deployment to a known good state. | Low |
| Throttling | Limit incoming traffic to protect the service. | Medium |
| Upsize | Increase replicas or resource limits. | Low |
| Traffic Drain | Route traffic away from the affected region/zone. | High |
Always perform a risk assessment before recommending an action. Ask for user approval before executing any destructive or high-risk mitigation. Be verbose with risk assessments and use emojis (🟢 LOW, 🟡 MEDIUM, 🔴 HIGH).
# 🎬 Rollback the bad configuration
# ⚠️ Risk: 🟡 MEDIUM: This safely reverts the ingress routing to the previous known good state, but active connections on the faulty paths may drop.
kubectl rollout undo deployment/api-server
Once proposed mitigation actions have been accepted, the architecture may have structurally or functionally changed (e.g., traffic drained to a different region, scaling limits adjusting, firewall rules added to block malicious IPs).
gcp-architecture-discovery skill again via a background subagent to asynchronously map the updated state.gcp-architecture-discovery.cloud-monitoring (specifically export_timeseries_to_csv.py) or monitoring-graphs (specifically csv_to_sparkline.py) skills to show the user the Unicode Sparkline (e.g., |█▇▆▇ ▂▃ ▂ ▂|) and the begin/end timestamp context. This allows the user to get an immediate, easy visual gist of how the graph/metric relates to the incident.When presenting your findings, use the following structure:
Ensure you understand what the user is using for Incident Management. Some possibilities:
GCP has multiple ways to manage incidents:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub googlecloudplatform/sre-plugin --plugin sre-extension16 skills in this plugin
/anomaly-detection🐉 Detects anomalies in time-series data from various sources./cloud-logging🐉 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./cloud-monitoring🐉 Skill for interacting with Google Cloud Monitoring (CM) via APIs to avoid large context bloat. Produces nice short synoptic "gists" of graphs/data-ingestion🐉 Fetches and parses time-series data from various sources./gcp-architecture-discovery🐉 Discover and map GCP infrastructure architecture including compute, networking, storage, and service dependencies./gcp-mcp-setup🐉 Use when the user wants to set up Google Managed MCP (OneMCP) servers for their CLI environment. Automates enabling services, MCP servers, generating API keys, and configuring the MCP settings file for the active harness (Gemini, Antigravity, or Copilot CLI).Other plugins' skills for the same job