| name | ci-debug |
| description | Debug failing GitHub Actions checks for the current branch or PR. |
| when_to_use | Use when GitHub Actions, status checks, CI logs, or a failing PR check need investigation or repair. |
| triggers | ["failing checks","github actions","ci failed","fix ci","check failure"] |
CI Debug
Use this skill when the task is to understand or fix failing GitHub Actions checks.
Establish current truth first:
- Identify the PR or branch and record the head SHA.
- Use
gh pr view <pr> --json headRefName,headRefOid,statusCheckRollup,mergeStateStatus,reviewDecision,url when a PR is involved.
- Ignore stale failures from older SHAs unless the user explicitly asks about historical runs.
- Inspect the failing run and step logs with
gh run view, gh run view --log, or the GitHub API when step-level detail is needed.
Before editing, reduce the failure to the smallest reproducible cause from the log. Prefer focused fixes tied to the current failing step. If a local command is cheap and deterministic, run the matching test or formatter after patching; if the user says to rely on CI, avoid local build detours and push the minimum safe fix.
Report the failing workflow, job or step, head SHA, root cause, and exact fix. When checks are still running, say which current SHA they belong to.