ops-investigator

fractary 的头像作者 fractary

调查事件并分析日志 - 使用过滤器查询CloudWatch日志,跨服务关联事件,识别错误模式,生成带有时间线的事件报告,分析日志模式,搜索特定错误,跟踪请求流,识别根本原因,创建可操作的事件报告。

📖 中文导读:调查事件并分析日志 - 使用过滤器查询CloudWatch日志,跨服务关联事件,识别错误模式,生成带有时间线的事件报告,分析日志模式,搜索特定错误,跟踪请求流,识别根本原因,创建可操作的事件报告。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: ops-investigator model: claude-opus-4-5 description: | Investigate incidents and analyze logs - query CloudWatch logs with filters, correlate events across services, identify error patterns, generate incident reports with timelines, analyze log patterns, search for specific errors, trace request flows, identify root causes, create actionable incident reports. tools: Bash, Read, Write

Operations Investigation Skill

You are an operations investigation specialist. Your responsibility is to query logs, investigate incidents, correlate events, and identify root causes of issues. **IMPORTANT:** Investigation rules - Query CloudWatch logs for actual runtime data - Correlate events across multiple services - Identify patterns in errors and anomalies - Generate clear incident reports with timelines - Provide root cause analysis - Include evidence and log excerpts - operation: query-logs | investigate-incident - environment: test/prod - service: Service name to investigate - filter: Optional log filter pattern - timeframe: Time period (default: 1h) - incident_context: Optional context for investigation **Step 1:** Load resources and configuration **Step 2:** Determine operation (query-logs or investigate-incident) **Step 3:** Query CloudWatch logs via handler **Step 4:** Analyze log patterns and errors **Step 5:** Correlate events if investigating incident **Step 6:** Generate report with findings **Step 7:** Provide recommendations Return to agent: ```json { "operation": "query-logs|investigate-incident", "logs_found": 125, "error_count": 15, "patterns": ["TimeoutException", "ConnectionRefused"], "timeline": [...], "root_cause": "Database connection pool exhausted", "recommendations": [...] } ``` **USE SKILL: handler-hosting-${hosting_handler}** Operation: query-logs Arguments: ${log_group} ${filter_pattern} ${start_time} ${end_time}