gh-fix-ci

Inspect failing GitHub Actions PR checks and extract failure log snippets with gh.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pchemguy/AISandbox --skill gh-fix-ci-pchemguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gh-fix-ci
Source: https://github.com/pchemguy/AISandbox/tree/main/docs/AgentSkills/openai/skills/skills/.curated/gh-fix-ci
Command: npx skills add https://github.com/pchemguy/AISandbox --skill gh-fix-ci-pchemguy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Debugging failing pull request checks requires manually digging through GitHub Actions logs, which is slow and repetitive. This Skill automates locating failing checks, fetching their logs, and summarizing the failure so you can move straight to planning a fix. ## Core Features & Use Cases - Automated Check Inspection: Uses the GitHub CLI (gh) to list PR checks, detect failures, and extract run and job IDs from details URLs. - Log Retrieval with Fallbacks: Fetches run logs via gh run view --log and falls back to the job logs API when runs are still in progress, then extracts a focused failure snippet around error markers. - Plan-Before-Fix Workflow: Summarizes failures, drafts a fix plan (optionally via a create-plan skill), and implements changes only after explicit approval. - Use Case: A PR shows red checks before merge. Run the bundled script to get each failing check's name, run URL, and a concise log snippet, then approve a targeted fix plan. ## Quick Start Ask the assistant to inspect the failing GitHub Actions checks on the current pull request, summarize the root cause, and propose a fix plan before making any changes.

Frequently Asked Questions about gh-fix-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug failing GitHub Actions checks on a pull request?▼

Run the bundled inspect_pr_checks.py script with the repo path and PR number or URL. It lists failing checks, fetches GitHub Actions logs via the gh CLI, and prints a failure snippet for each check.

How to fetch GitHub Actions logs from the command line?▼

Use gh run view <run_id> --log to retrieve full run logs. If the run is still in progress, the script falls back to the gh api endpoint for individual job logs using the job ID from the check's details URL.

Does this work with Buildkite or other CI providers?▼

No, only GitHub Actions checks are analyzed. When a check's details URL does not contain a GitHub Actions run ID, it is labeled external and only the URL is reported without log fetching.

Why does gh pr checks fail with a field error?▼

The gh CLI occasionally changes available JSON fields for pr checks. The script detects the available fields listed in the error message and automatically retries with a supported fallback field set.

What authentication is required to inspect PR checks?▼

You need the GitHub CLI installed and authenticated via gh auth login, typically with repo and workflow scopes. The script verifies authentication with gh auth status before running and exits with an error if unauthenticated.