skills/root-cause-analysis/SKILL.md
Analyze telemetry data for root cause analysis using Kopai CLI. Use when debugging errors, investigating latency issues, tracing request flows across services, or correlating logs with traces. Also use when users report production issues like "why is my API slow", "getting 500 errors", "service is down", "requests are timing out", or any symptom that needs telemetry-based investigation — even if they don't mention traces or observability explicitly.
npx skillsauth add kopai-app/kopai-mono root-cause-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide for debugging production issues using telemetry data (traces, logs, metrics) via Kopai CLI.
Ensure access to Kopai app backend. Make sure the services are set up to send their OpenTelemetry data to Kopai. See otel-instrumentation skill for setup.
npx @kopai/cli traces search --status-code ERROR --limit 20 --json. If empty: broaden time range, check service name, or search logs with --severity-min 17npx @kopai/cli traces get <traceId> --json. Check Duration, StatusCode, and span hierarchy for bottlenecksnpx @kopai/cli logs search --trace-id <traceId> --json. Look for error messages, stack traces, and timestampsnpx @kopai/cli metrics discover --json then npx @kopai/cli metrics search --type <type> --name <name> --json for anomalies# Find failing requests
npx @kopai/cli traces search --status-code ERROR --service payment-api --json
# Get trace details (copy traceId from above)
npx @kopai/cli traces get abc123def456 --json
# Check correlated logs
npx @kopai/cli logs search --trace-id abc123def456 --severity-min 17 --json
workflow-find-errors - Find Error Tracesworkflow-get-context - Get Full Trace Contextworkflow-correlate-logs - Correlate Logs with Traceworkflow-check-metrics - Check Related Metricsworkflow-identify-cause - Identify Root Cause & Present Findingspattern-http-errors - HTTP Error Debuggingpattern-slow-requests - Slow Request Analysispattern-distributed - Distributed Failure Tracingpattern-log-driven - Log-Driven InvestigationRead rules/<rule-name>.md for details.
--json for programmatic analysisjq for filtering/aggregation--severity-min 17 instead of --severity-text ERROR to catch all error-level logs regardless of text casing. Fall back to --body "error" for errors logged at INFO or with no severity.development
Instrument applications with OpenTelemetry SDK and validate telemetry using Kopai. Use when setting up observability, adding tracing/logging/metrics, testing instrumentation, debugging missing telemetry data, or when traces/logs/metrics aren't appearing after setup. Also use when users say things like "my traces aren't showing up", "I don't see any data", or "how do I add observability to my app".
development
Create observability dashboards from OTEL metrics, logs, and traces using Kopai. Use when building metric visualizations, monitoring views, KPI panels, or when the user wants to see their telemetry data in a dashboard — even if they don't say "dashboard" explicitly. Also use when other skills or workflows need to present telemetry data visually (e.g. after root cause analysis).
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------