/gh-fix-ci:gh-fix-cifrom gh-fix-ci
Use when GitHub Actions PR checks are failing on a pull request and need to be diagnosed or fixed. Inspects checks / logs via `gh`, drafts a fix plan, and implements only after explicit approval. Trigger on red checks, failing workflow runs, `pr is failing CI` reports — even if the user does not name a specific check. Out of scope: external CI (e.g. Buildkite) — report only the details URL.
Ships in gh-fix-ci. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use the authenticated gh CLI or connected GitHub read tools. Do not create credentials or expand scopes to inspect CI; report the exact missing access instead. The optional plan skill is not required: write a concise plan inline when absent. Diagnosis alone does not authorize edits, pushes, merging, deployment, workflow reruns or external messages. If the user explicitly requested a fix, carry out the approved scope without asking again unless permissions require it.
The adapted helper returns exit 0 only for listed completed-success/skipped/neutral checks, exit 1 for failures, and exit 2 for pending/unknown/no checks. Even exit 0 does not prove all required checks are present. Check the current PR head's checks and workflow runs again. After an authorized fix/push, verify the expected remote commit and relevant CI until it passes or a blocker needs the user. Verify required checks for the exact commit before reporting green CI.
Use gh to locate failing PR checks, fetch GitHub Actions logs for actionable failures, summarize the failure snippet, then propose a fix plan and implement after explicit approval.
create-plan) is available, use it; otherwise draft a concise plan inline and request approval before implementing.Prereq: use existing authorized GitHub access; gh auth status checks the CLI without changing access.
repo: path inside the repo (default .)pr: PR number or URL (optional; defaults to current branch PR)gh authentication for the repo hostpython "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"--json if you want machine-friendly output for summarization.gh auth status in the repo.gh pr view --json number,url.python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"--json for machine-friendly output.gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflow
gh.detailsUrl and run:
gh run view <run_id> --json name,workflowName,conclusion,status,url,event,headBranch,headShagh run view <run_id> --loggh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > "<path>"detailsUrl is not a GitHub Actions run, label it as external and only report the URL.Fetch failing PR checks, pull GitHub Actions logs, and extract a failure snippet. Exits non-zero when failures remain so it can be used in automation.
Usage examples:
python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "123"python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "https://github.com/org/repo/pull/123" --jsonpython "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub g-kari/g-kari-plugins --plugin gh-fix-ci