The gh-fix-ci skill turns a failing CI pipeline into an actionable repair plan. It uses theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/skills/llms.txt
Use this file to discover all available pages before exploring further.
gh CLI to find failing GitHub Actions checks on the current PR, downloads the relevant run logs, extracts the failure snippet, proposes a concise fix, and waits for your explicit approval before touching any code. External CI providers such as Buildkite are intentionally out of scope — the skill reports their details URL and moves on.
Trigger Conditions
Codex activates this skill when you ask it to:- Debug or fix failing GitHub Actions checks
- Investigate why CI is red on a PR
- Diagnose a broken pipeline and propose a fix
- Summarize CI log failures on the current branch
This skill applies only to GitHub Actions checks. Checks from external providers (Buildkite, CircleCI, etc.) are flagged with their
detailsUrl only — Codex does not attempt to fetch their logs.Prerequisites
Authenticate the GitHub CLI once with repo and workflow scopes before running this skill:repo and workflow scopes are required so the skill can read check runs and download logs.
Workflow
Verify gh authentication
The skill runs
gh auth status in the repo. If the token is missing or lacks required scopes, Codex pauses and asks you to run gh auth login before proceeding.Resolve the PR
Codex prefers the PR for the current branch:If you supply a PR number or URL explicitly, that takes precedence.
Inspect failing checks
The bundled Add If the bundled script is unavailable, Codex falls back to manual
inspect_pr_checks.py script fetches all GitHub Actions check runs, identifies failures, and pulls the relevant log lines:--json for machine-readable output, or tune snippet size with --max-lines and --context:gh commands:Scope external checks
Any check whose
detailsUrl does not point to a GitHub Actions run is labeled as external. Codex reports the URL and does not fetch logs from that provider.Summarize failures
Codex presents each failing check with its name, run URL, and a concise log snippet highlighting the error. Missing logs are called out explicitly.
Propose a fix plan
Codex drafts a focused plan describing what needs to change to make CI green. If the
create-plan skill is available, it is used to structure the plan and request your approval. Otherwise, the plan is drafted inline.Implement after approval
Only after you approve the plan does Codex apply changes. It then summarizes the diffs and any test results, and asks whether you want to open or push to the PR.
The inspect_pr_checks.py Script
The bundled script handles common edge cases that raw gh commands miss:
Field drift tolerance
Retries
gh pr checks with the available field set when GitHub’s API drops or renames a field.Job-log fallbacks
Falls back to per-job log fetches when the run-level log is unavailable or still streaming.
Non-zero exit on failure
Exits non-zero when failing checks remain, making it safe to use in automation pipelines.
JSON mode
--json emits structured output for downstream summarization or scripting.