triaging-cilisted
Install: claude install-skill monte3l/m3l-automation
Diagnose why a GitHub Actions CI run failed by fetching its logs via `gh` and
mapping the failure back to the specific pipeline step and root cause, then
present 3–5 solution options for the user to choose from. This skill does not
apply fixes — it ends with options, not actions.
## Steps
### 1 — Resolve the run
If the user provided an explicit run ID or URL, extract the numeric ID from it.
Otherwise, find the most recent failed run on the current branch:
```bash
gh run list --branch $(git rev-parse --abbrev-ref HEAD) \
--limit 5 \
--json databaseId,status,conclusion,name,createdAt
```
Pick the most recent entry whose `conclusion` is `"failure"`.
If no failed run exists on the current branch (empty result or all passing), widen
the search to the 10 most recent runs across all branches:
```bash
gh run list --limit 10 \
--json databaseId,status,conclusion,name,headBranch,createdAt
```
If a failed run exists in the broader search, proceed with that run and note the
branch it came from. If no failed run exists anywhere in the recent history, report
that clearly and stop — there is nothing to triage.
### 2 — Fetch the failing job logs
Pull only the logs from steps that failed:
```bash
gh run view <id> --log-failed
```
If that command returns nothing (the run was cancelled, or all steps are
technically "successful" but a post-step failed), fall back to the full log:
```bash
gh run view <id> --log
```
Do not reproduce the entire log output — find and keep only t