gha

Analyze GitHub Actions workflow failures and identify root causes using the gh CLI.

Updated May 9, 2026
One-click install
npx skills add https://github.com/natelandau/cc-plugin --skill gha-natelandau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gha
Source: https://github.com/natelandau/cc-plugin/tree/main/plugins/natelandau-toolkit/skills/gha
Command: npx skills add https://github.com/natelandau/cc-plugin --skill gha-natelandau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a GitHub Actions CI/CD pipeline fails, digging through logs, run history, and commits to find the real cause is slow and error-prone. This Skill automates that investigation and produces a structured failure report. ## Core Features & Use Cases - Failure Analysis: Reads full workflow logs via the gh CLI to separate fatal errors from warnings and pinpoint what caused the non-zero exit. - Flakiness Detection: Reviews the past 10-20 runs of the specific failed job to determine whether the failure is one-time or recurring, with a success rate. - Breaking Commit Identification: Bisects run history to find the exact commit where the job started failing, confirmed against subsequent runs. - Existing Fix Check: Searches open pull requests for an existing fix before recommending one. - Use Case: A teammate pings you about a red CI badge on main. You pass the failed run URL and receive a report with the root cause, flakiness assessment, breaking commit, and a recommended fix. ## Quick Start Ask the assistant to investigate the GitHub Actions failure at a specific workflow run URL and recommend a fix.

Frequently Asked Questions about gha

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of a GitHub Actions failure?

Use the gh CLI to read the full logs of the failed run, separating fatal errors from warnings. Look for markers like "failing:" and "fatal:" and the script logic that triggers exit 1, then confirm the cause against the failure logic.

How to check if a GitHub Actions job is flaky?

Review the past 10 to 20 runs of the exact job that failed, not the whole workflow. Use gh run list --workflow=<name> to get run ids, then gh run view <run-id> --json jobs to check that job's status and compute its recent success rate.

How do I find which commit broke a CI workflow?

Identify the first run where the job failed and the last run where it passed, then examine the commits between them. Confirm the breaking commit by verifying the job fails in every run after it and passes in every run before it.

Does this work with any GitHub repository?

It works with any repository accessible through the authenticated gh CLI, since all analysis uses gh run list, gh run view, and gh pr list. You need gh installed and authenticated with permission to read workflow runs and pull requests.

What if a fix for the CI failure already exists?

The investigation searches open pull requests with gh pr list --state open --search using error messages or file names. If a fix PR exists, the report includes its number and link and skips the recommendation step.