Imported from mjcramerz/codex-home (
home/plugins/cache/codex-home/github/1.0.0/skills/ci-github-actions-fix/SKILL.md). Install upstream withnpx skills add mjcramerz/codex-home --skill ci-github-actions-fix. Copyright stays with the author.
CI-GitHub Actions Fix
Use this skill when
- a GitHub PR has failing checks and you need root cause + safe remediation.
- a workflow is flaky/intermittent and you need evidence before proposing fixes.
Inputs
repo: repository path (default.)pr: PR number or URL (optional; current-branch PR by default)ghauthentication with access to checks and workflow logs
Scope and boundaries
- Do not treat external providers as actionable GitHub Actions failures.
- Do not broad-rerun unrelated workflows to “green” CI.
- Keep fixes minimal and scoped to the failing cause.
Workflow
- Verify
ghauth and resolve the target PR. - Run
scripts/inspect_pr_checks.pyfirst (--jsonoptional), then use manualghfallback only if fields/logs are unavailable. - Isolate failing workflow/job, capture the smallest useful snippet, and include check name + run URL.
- Separate external/non-GitHub-Actions checks from actionable workflow failures.
- Propose a minimal, reversible fix plan; implement after approval.
- Re-run the narrowest checks and confirm status via
gh pr checks.
Manual fallback commands
gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflowgh 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>
Agent orchestration
- Delegate log collection and inventory only.
- Keep diagnosis, fix strategy, and risk sign-off centralized.
Validation and testing
- Bound log size/time (
--max-lines,--context) and avoid noisy full-log dumps. - Confirm reproducibility before editing and capture the failing command/check identifier.
- Run only the checks required to prove the fix, then re-check status with
gh pr checks.
Outputs
- Failure summary with evidence (check, run URL, snippet).
- Minimal fix plan with impact/risk notes.
- Verification notes showing before/after check state.
References
scripts/inspect_pr_checks.py$CODEX_HOME/docs/workflows/github-actions.md$CODEX_HOME/docs/workflows/ci-cd.md- Use skill ci-github-actions.