name: gh-fix-ci description: Inspect and fix failing GitHub Actions checks on a pull request. USE WHEN user says ‘fix ci’, ‘fix checks’, ‘why is CI failing’, ‘debug CI’, ‘ci is red’, or wants to diagnose and fix PR check failures.
GitHub PR CI Fix
Diagnose failing GitHub Actions checks on a pull request, summarize failures with log evidence, and propose or implement fixes after user approval.
Workflow Routing
| Workflow | Trigger | File |
|---|---|---|
| FixCI | “fix ci”, “fix checks”, “why is CI failing”, “debug CI” | workflows/FixCI.md |
Prerequisites
ghis installed and authenticated- Target repository is available locally
- Target PR is either provided or associated with the current branch
Non-GitHub Actions providers (Buildkite, Jenkins, etc.) are treated as external — report their details URL but don’t try to debug them.
Quick Start
python3 "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"
# Add --json for structured output
Workflow
- Verify
gh auth status - Resolve the PR from the current branch or user input
- Inspect failing checks with the bundled script
- Pull relevant Actions logs and extract the failure snippet
- Summarize: failing checks, log evidence, likely cause
- Draft a concise fix plan and wait for user approval before editing code
- After changes, rerun relevant tests and recheck PR status
Manual Fallback
If the script is insufficient:
gh pr checks <pr> --json name,state,conclusion,detailsUrl
gh run view <run_id> --json conclusion,status,workflowName,name,event,headBranch,headSha,url
gh run view <run_id> --log
Integration
- Uses
reviewer-ghactionssubagent for GitHub Actions-specific analysis when deeper review is needed - References
gh-prtool for comprehensive PR context (gh-pr review <number> --llm) - For basic check status reporting without fixes, see the GitHub skill’s CheckStatus workflow
Related Skills
- GitHub: PR management, check status reporting, CI restarts
- CodeReview: Code review with
architecturefocus via oracle subagent
Examples
Example 1: Fix failing CI
User: "CI is failing on my PR"
→ Inspects PR checks via GitHub API
→ Identifies failing jobs, downloads logs
→ Diagnoses root cause and applies fix