main

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

  • gh is 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

  1. Verify gh auth status
  2. Resolve the PR from the current branch or user input
  3. Inspect failing checks with the bundled script
  4. Pull relevant Actions logs and extract the failure snippet
  5. Summarize: failing checks, log evidence, likely cause
  6. Draft a concise fix plan and wait for user approval before editing code
  7. 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-ghactions subagent for GitHub Actions-specific analysis when deeper review is needed
  • References gh-pr tool for comprehensive PR context (gh-pr review <number> --llm)
  • For basic check status reporting without fixes, see the GitHub skill’s CheckStatus workflow
  • GitHub: PR management, check status reporting, CI restarts
  • CodeReview: Code review with architecture focus 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