sonarly-incident-remediatorlisted
Install: claude install-skill riteshkew/yc-skills
# Workflow
When this skill triggers, follow these steps in order.
## Step 1 — Ingest the log or stack trace
Accept the incident input from the user. This may be:
- A raw stack trace pasted inline
- A log excerpt (structured JSON logs, syslog, or plain-text app logs)
- A combination: a deploy context block followed by log lines
Identify and extract the following fields before proceeding:
- **Error message** — the human-readable exception or error string (e.g., `TypeError: Cannot read properties of undefined (reading 'id')`)
- **Failing frame** — the top application-owned stack frame (skip `node_modules` frames); note the file path and line number
- **Onset time** — the timestamp of the first error log line
- **Affected surface** — the route, job, or component where the error originates
- **Deploy or change context** — if log lines mention a deploy SHA, PR, or config change near the onset time, note it
- **Error rate or frequency signal** — any log lines indicating how widespread the failure is (e.g., percentage of requests failing, alert thresholds crossed)
If the user provides insufficient context, ask:
> "Please paste the full stack trace and at least 30 seconds of surrounding log lines. If a recent deploy or config change preceded the error, include that context too."
## Step 2 — Form ranked root-cause hypotheses
Using the extracted fields, generate 2–4 root-cause hypotheses ranked by confidence (HIGH / MEDIUM / LOW).
For each hypothesis:
1. State the hypothesis