К основному содержанию
скилл CX Codex

investigation-entrypoint — скилл для Claude Code

Скилл investigation-entrypoint расследования сбоев в Google Cloud Platform для Claude Code, Codex и Gemini CLI. Координирует диагностику GKE и Cloud Run при инцидентах.

Apache-2.0 ★ 151 обновлён 2026-10-12

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Открыть на GitHub

Что делает investigation-entrypoint

Скилл выступает точкой входа при авариях на инфраструктуре Google Cloud. Он предписывает агенту не бросаться сразу в сырые логи и SSH-сессии, а сначала зафиксировать проект, регион и проблемную службу. Параллельно в фоновом субагенте запускается построение топологии через gcp-architecture-discovery, чтобы не блокировать основной тред расследования.

Дальше инструмент направляет сбор метрик в Cloud Monitoring, проверку вылетов вроде OOMKilled или CrashLoopBackOff в Cloud Logging и опрос состояния кластеров через mcp_google-container либо mcp_google-run. Для наглядности метрики оформляются Unicode-спарклайнами с помощью скриптов export_timeseries_to_csv.py и csv_to_sparkline.py.

Меры по устранению сбоя скилл делит по категориям риска — от низкого при откате или масштабировании до высокого при сбросе трафика — и требует подтверждения перед запуском деструктивных команд вроде kubectl rollout undo.

Какие задачи решает

  • локализовать сбой в сервисах GKE и Cloud Run
  • построить топологию затронутой инфраструктуры в фоне
  • собрать метрики задержек и ошибок без ручного перебора логов
  • выбрать сценарий отката с оценкой уровня риска

Примеры запросов агенту

  • У нас всплеск 500 ошибок в сервисе api-server на Cloud Run в проекте prod-billing, начни расследование
  • Разбери причины падения подов в GKE кластере payments-cluster, статус CrashLoopBackOff
  • Оцени риски и подготовь команду отката деплоймента deployment/api-server

Как установить investigation-entrypoint

1Через маркетплейс плагинов

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

Команда ставит плагин sre-extension целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill investigation-entrypoint -a claude-code

3Вручную: положить файлы

~/.claude/skills/investigation-entrypoint/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/investigation-entrypoint/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об investigation-entrypoint

Как установить investigation-entrypoint в Claude Code?

В маркетплейсе Claude Code последовательно выполните /plugin marketplace add gemini-cli-extensions/sre и затем /plugin install sre-extension@sre.

Что делает скилл investigation-entrypoint?

Организует пошаговое SRE-расследование инцидентов в GCP, фоновое картографирование зависимостей и выработку безопасных шагов по устранению аварии.

Какие инструменты нужны скиллу для работы с инфраструктурой GCP?

Скилл задействует MCP-серверы mcp_google-run для Cloud Run и mcp_google-container для операций с кластерами GKE, а также утилиту kubectl.

Исходный текст

SKILL.md · Apache-2.0
---
name: investigation-entrypoint
description: 🐉 The primary entrypoint for investigating production outages, orchestrating SRE response, and mitigating incidents on Google Cloud Platform (GKE, Cloud Run, etc.). Start here when an incident occurs.
metadata:
  author: Riccardo Carlesso
  version: 1.3.1
  status: draft
# Incident systems support:
# ++ PagerDuty -> N8N + Pagerduty integration https://n8n.io/integrations/google-ai-studio-gemini/and/pagerduty/
# * betterstack?
# * grafana?
# TOOLS
# Cloud run: 
#  - mcp_google-run_get_service
#  - mcp_google-run_list_services
# GKE:
#   - mcp_google-container_get_cluster
#   - mcp_google-container_get_node_pool
#   - mcp_google-container_get_operation
#   - mcp_google-container_kube_api_resources
#   - mcp_google-container_kube_get
#   - mcp_google-container_list_clusters
#   - mcp_google-container_list_node_pools
#   - mcp_google-container_list_operations
---

# Incident Response & Outage Investigation

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.

## Investigation & Orchestration Flow

### 1. Identify Target (NO LOGS/METRICS YET!)
Establish the basic scope of the incident (e.g., from an initial alert or PagerDuty event). Identify:
- **Target Project ID**
- **Region/Zone**
- **Service Name** / **Failing Node**
**🛑 DO NOT run any `gcloud logging`, `gcloud compute ssh`, `curl`, or monitoring commands yet. STOP at this step.**

### 2. Architecture Discovery (Asynchronous Background Task)
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.
1. Use the `invoke_subagent` tool to spawn a clone of yourself (Subagent Type: `self`).
2. Provide a prompt to the subagent such as: *"Run the `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."*
3. The main agent **MUST NOT wait** for the subagent to finish. Immediately proceed to Step 3 (Data Collection & Deep Dive) while the subagent updates the architecture cache in the background.

### 3. Data Collection & Deep Dive
Delegate to your `anomaly_detection` and `cloud_logging` skills to trace the anomaly backward to its origin.
- **Cloud Monitoring**: Analyze metric regressions (QPS, Error Ratio, Latency). Isolate if it's a 500 error spike, a 4xx issue, or a networking bottleneck.
- **Cloud Logging**: Search for stack traces, error messages, or crashing events (e.g., `OOMKilled`, `CrashLoopBackOff` in GKE; request errors in Cloud Run).
- **Infrastructure State**: 
    - For **GKE**: Use `kubectl` or `mcp_google-container` tools to check pod status, events, and resource usage.
    - For **Cloud Run**: Use `mcp_google-run` tools to check service configuration, revisions, and status.

### 4. Root Cause Analysis (RCA)
Use abductive reasoning to formulate hypotheses:
- **Recent Changes**: Check for image deployments, configuration updates, or environment variable changes.
- **Resource Saturation**: Analyze CPU, memory usage, or quota limits.
- **Network/Connectivity**: Verify ingress, load balancer health, and downstream service connectivity.
- **Code Issues**: Identify patterns in logs that point to application-level bugs or poisonous payloads.

### 5. Mitigation Strategy & Actuation
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).

```bash
# 🎬 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
```

### 6. Post-Mitigation Architecture Update
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).
- You **MUST** trigger the `gcp-architecture-discovery` skill again via a background subagent to asynchronously map the updated state.

## Technical Guidelines

### Investigation Checklist
- [ ] Timeline of events established.
- [ ] Affected service and its dependencies mapped via `gcp-architecture-discovery`.
- [ ] Correlation with recent deployments/rollouts checked.
- [ ] Resource usage analyzed (CPU, Memory, Restarts).
- [ ] Upstream/Downstream components checked iteratively.

### Grounding & Communication
- Be serious, direct, and straightforward.
- Quote exact log messages, crash reasons, or threshold violations.
- Provide structured findings with clear confidence levels.
- **Visual Sparkline Feedback:** Whenever you exchange metric/graphing info with the user, try to use the scripts in the `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.

## Output Format

When presenting your findings, use the following structure:

### Investigation Findings
- **Root Cause Hypothesis**: [Detailed reasoning]
- **Confidence Level**: [High/Medium/Low]
- **Evidence**: [Direct tool or log output snippets]
- **Mitigation Taxonomy Category**: [e.g., Rollback, Throttling]
- **Mitigation Actuation**: [Specific GCP action recommended]

## Incident Management Stack

Ensure you understand what the user is using for Incident Management. Some possibilities:

### Native GCP
GCP has multiple ways to manage incidents:
* **Alerting**: [Log-based incidents](https://docs.cloud.google.com/logging/docs/alerting/log-based-incidents#incident)
* **Incident policy** construct: [Monitoring Incidents](https://console.cloud.google.com/monitoring/alerting/incidents) which can be built on either *log-based alert policy* or "SQL Alert policy".
* **SLO violations**, which are very much in line with Google SRE *dectamina*.
* **Uptime checks**. To ensure a certain service "pings".

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

Похожие скиллы

Все скиллы по теме «Облака: AWS, Azure, GCP» →
cloud-run-alert-configuration официальный google Скилл cloud-run-alert-configuration генерирует политики алертов для сервисов, задач и пулов воркеров Cloud Run в Google Cloud через Terraform и PromQL. Настраивает метрики ошибок, задержек и насыщения контейнеров по SRE-практикам. CX Codex +1 2 300установок gcp-development Mindrally Скилл gcp-development для Claude Code и Codex. Задаёт рамки разработки под Google Cloud: Cloud Functions, Cloud Run, Firestore, BigQuery, Terraform и безопасность через IAM. CX Codex +1 986установок gcp-cloud-run aj-geddes Скилл gcp-cloud-run настраивает запуск контейнеров в Google Cloud Run через gcloud и Terraform. Пригодится при развёртывании микросервисов без возни с серверами. CX Codex +1 545установок Cloud Run официальный googlecloudplatform MCP-сервер от Google Cloud для развёртывания приложений на Cloud Run прямо из IDE или агента. Работает с Claude Code, Cursor, GitHub Copilot и другими платформами. CX Codex +1 infra-deploy terrylica Скилл infra-deploy разворачивает self-hosted Cal.com в GCP Cloud Run с базой Supabase PostgreSQL или поднимает его локально через Docker Compose. CX Codex +1 119установок gke-productionize официальный google Скилл gke-productionize для Claude Code, Gemini CLI и Codex запускает полный аудит GKE-кластера перед выходом в продакшен: масштабирование, безопасность, надёжность, наблюдаемость, резервное копирование и стоимость. CX Codex +1 4 800установок

Из того же набора17

Весь набор →
postmortem-aggregator Скилл postmortem-aggregator для Claude Code разбирает Post Mortem в папке, рассчитывает показатели сбоев и обновляет POMO_AGGREGATED.md. Помогает находить повторяющиеся причины инцидентов. CX Codex +1 ★ 151звёзд репо gcp-mcp-setup Скилл gcp-mcp-setup для Claude Code, Codex и Gemini CLI автоматизирует подключение Google Managed MCP-серверов (OneMCP) к CLI-окружению. Включает нужные API, генерирует ключи и записывает конфигурацию в нужный файл настроек. CX Codex +1 ★ 151звёзд репо generic-mitigations Скилл generic-mitigations учит ИИ-агента купировать сбои в продакшене типовыми мерами SRE вместо долгих раскопок причин во время аварии. CX Codex +1 ★ 151звёзд репо monitoring-graphs Скилл monitoring-graphs для Claude Code, Codex и Gemini CLI генерирует аннотированные графики инцидентов на Python. Запускается, когда нужно визуализировать сбой, показать скачки ошибок или соотнести метрики с этапами инцидента. CX Codex +1 ★ 151звёзд репо anomaly-detection Скилл anomaly-detection находит аномалии во временных рядах из CSV, мониторинга облака и других источников. Автоматически выбирает алгоритм и параметры сглаживания, или работает по вашим настройкам. CX Codex +1 ★ 151звёзд репо postmortem-generator Скилл postmortem-generator для Claude Code собирает постмортем по инциденту: ведёт к таймлайну, action items и черновику Google Doc. Нужны данные расследования и root cause. CX Codex +1 ★ 151звёзд репо gcp-architecture-discovery Скилл gcp-architecture-discovery обходит GCP-проект от сбойного сервиса и собирает карту зависимостей: compute, сети, базы, бакеты. Результат кладёт в файлы, чтобы следующая сессия не начинала с нуля. CX Codex +1 ★ 151звёзд репо sre-extension Плагин sre-extension для Claude Code помогает расследовать сбои в Google Cloud, разбирать логи и создавать постмортемы. CX Codex ★ 151звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой