Fix failing GitHub Actions checks

Finds failing GitHub Actions checks on a PR with gh, pulls the logs, extracts the failure snippet and drafts a fix plan, changing code only after approval. Use when a PR's CI is red and you want the cause and a plan before any edit.

DevOpsPack: OpenAI skills69 linesgh-fix-ci
Author
Source
openai/skills/skills/.curated/gh-fix-ci @ 49f948f
License
Apache-2.0

About this skill

What it does

The skill takes the agent from a red pull request to an approved fix plan. It checks gh auth status, resolves the PR (current branch, number or URL) and runs scripts/inspect_pr_checks.py. The script keeps the failing checks (failure, cancelled, timed out, action required) and pulls each GitHub Actions run log with gh run view --log, or the job log through the API while the run is still in progress. It cuts a snippet around the last line that looks like an error (traceback, assert, panic, timeout and similar): up to 160 lines with 30 of context by default, set by --max-lines and --context. --json gives machine-readable output, and the exit code stays non-zero while failures remain. If gh rejects a field name, the script retries with the fields it lists as available.

Checks from other providers, such as Buildkite, are reported by URL only. The agent summarizes each failure with the check name, run URL and snippet, says when logs are missing, drafts a plan and changes code only after you approve it.

When to use it, and when not

Use it when GitHub Actions checks fail on a PR and you want the cause and a plan before any edit.

It does not push, rerun CI or loop until green.

How to run it

The install command below puts the whole folder in place: SKILL.md, the script, the icons, the Codex metadata file and the licence. You need Python 3 and the GitHub CLI logged in with repo and workflow scopes. To call it:

  • Claude Code: /gh-fix-ci, or ask for the skill by name.
  • Codex: $gh-fix-ci.
  • Cursor: type / in the Agent chat and pick gh-fix-ci.

Example: /gh-fix-ci PR 482 is red on the lint and test jobs. Find out why and show me a plan.

The plan step names a create-plan skill, which is not in our catalog; without it the agent writes the plan inline. OpenAI has marked openai/skills deprecated; our copy is pinned to a commit there, and as of November 2026 openai/plugins has no newer version of this skill.

How it differs from similar skills

Iterate a PR until CI is green fixes failures and review feedback on its own, commits, pushes and keeps polling until the actionable checks pass; this skill stops at a plan and waits for you. GitHub Actions CI writes and repairs the workflow files themselves. Log triage helps when the snippet is not enough and the full log needs reading.

Install

Run one command — it saves SKILL.md and the files it uses into your agent's skills folder. Claude Code and Codex pick up a new skill without a restart; if it does not show up, restart the agent.

Claude Code — macOS, Linux
curl -fsSL --create-dirs -o ~/.claude/skills/gh-fix-ci/SKILL.md https://anymodel.org/en/skills/openai/gh-fix-ci/SKILL.md -o ~/.claude/skills/gh-fix-ci/LICENSE.txt https://anymodel.org/en/skills/openai/gh-fix-ci/LICENSE.txt -o ~/.claude/skills/gh-fix-ci/agents/openai.yaml https://anymodel.org/en/skills/openai/gh-fix-ci/agents/openai.yaml -o ~/.claude/skills/gh-fix-ci/assets/github-small.svg https://anymodel.org/en/skills/openai/gh-fix-ci/assets/github-small.svg -o ~/.claude/skills/gh-fix-ci/assets/github.png https://anymodel.org/en/skills/openai/gh-fix-ci/assets/github.png -o ~/.claude/skills/gh-fix-ci/scripts/inspect_pr_checks.py https://anymodel.org/en/skills/openai/gh-fix-ci/scripts/inspect_pr_checks.py && chmod +x ~/.claude/skills/gh-fix-ci/scripts/inspect_pr_checks.py
Codex, Cursor — macOS, Linux
curl -fsSL --create-dirs -o ~/.agents/skills/gh-fix-ci/SKILL.md https://anymodel.org/en/skills/openai/gh-fix-ci/SKILL.md -o ~/.agents/skills/gh-fix-ci/LICENSE.txt https://anymodel.org/en/skills/openai/gh-fix-ci/LICENSE.txt -o ~/.agents/skills/gh-fix-ci/agents/openai.yaml https://anymodel.org/en/skills/openai/gh-fix-ci/agents/openai.yaml -o ~/.agents/skills/gh-fix-ci/assets/github-small.svg https://anymodel.org/en/skills/openai/gh-fix-ci/assets/github-small.svg -o ~/.agents/skills/gh-fix-ci/assets/github.png https://anymodel.org/en/skills/openai/gh-fix-ci/assets/github.png -o ~/.agents/skills/gh-fix-ci/scripts/inspect_pr_checks.py https://anymodel.org/en/skills/openai/gh-fix-ci/scripts/inspect_pr_checks.py && chmod +x ~/.agents/skills/gh-fix-ci/scripts/inspect_pr_checks.py
Claude Code — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/github-small.svg','assets/github.png','scripts/inspect_pr_checks.py') { $p = Join-Path "$HOME\.claude\skills\gh-fix-ci" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/gh-fix-ci/$f" -UseBasicParsing -OutFile $p }
Codex, Cursor — Windows PowerShell
foreach ($f in 'SKILL.md','LICENSE.txt','agents/openai.yaml','assets/github-small.svg','assets/github.png','scripts/inspect_pr_checks.py') { $p = Join-Path "$HOME\.agents\skills\gh-fix-ci" $f; New-Item -ItemType Directory -Force (Split-Path $p) | Out-Null; Invoke-WebRequest "https://anymodel.org/en/skills/openai/gh-fix-ci/$f" -UseBasicParsing -OutFile $p }

Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/openai/gh-fix-ci/SKILL.md

SKILL.md

Raw

Gh Pr Checks Plan Fix

Overview

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.

  • If a plan-oriented skill (for example create-plan) is available, use it; otherwise draft a concise plan inline and request approval before implementing.

Prereq: authenticate with the standard GitHub CLI once (for example, run gh auth login), then confirm with gh auth status (repo + workflow scopes are typically required).

Inputs

  • repo: path inside the repo (default .)
  • pr: PR number or URL (optional; defaults to current branch PR)
  • gh authentication for the repo host

Quick start

  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"
  • Add --json if you want machine-friendly output for summarization.

Workflow

  1. Verify gh authentication.
    • Run gh auth status in the repo.
    • If unauthenticated, ask the user to run gh auth login (ensuring repo + workflow scopes) before proceeding.
  2. Resolve the PR.
    • Prefer the current branch PR: gh pr view --json number,url.
    • If the user provides a PR number or URL, use that directly.
  3. Inspect failing checks (GitHub Actions only).
    • Preferred: run the bundled script (handles gh field drift and job-log fallbacks):
      • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"
      • Add --json for machine-friendly output.
    • Manual fallback:
      • gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflow
        • If a field is rejected, rerun with the available fields reported by gh.
      • For each failing check, extract the run id from detailsUrl and run:
        • gh run view <run_id> --json name,workflowName,conclusion,status,url,event,headBranch,headSha
        • gh run view <run_id> --log
      • If the run log says it is still in progress, fetch job logs directly:
        • gh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > "<path>"
  4. Scope non-GitHub Actions checks.
    • If detailsUrl is not a GitHub Actions run, label it as external and only report the URL.
    • Do not attempt Buildkite or other providers; keep the workflow lean.
  5. Summarize failures for the user.
    • Provide the failing check name, run URL (if any), and a concise log snippet.
    • Call out missing logs explicitly.
  6. Create a plan.
    • Use the create-plan skill to draft a concise plan and request approval.
  7. Implement after approval.
    • Apply the approved plan, summarize diffs/tests, and ask about opening a PR.
  8. Recheck status.
    • After changes, suggest re-running the relevant tests and gh pr checks to confirm.

Bundled Resources

scripts/inspect_pr_checks.py

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" --json
  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40

Connect through AnyModel API

This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.

More from the pack OpenAI skills

ASP.NET Core apps

Guides the agent through current ASP.NET Core practice: choosing Blazor, Razor Pages, MVC or Minimal APIs, Program.cs and middleware order, auth, EF Core, tests and upgrades to .NET 10. Use when building, reviewing or upgrading an ASP.NET Core app.

ChatGPT Apps SDK

Builds ChatGPT apps on the Apps SDK: reads current OpenAI docs first, picks an app archetype, plans MCP tools, adapts an official example or scaffolds a Node server and widget, then tests in Developer Mode. Use when building or fixing an app inside ChatGPT.

CLI creator from API docs

Builds a durable CLI from API docs, an OpenAPI spec, curls or a script: JSON output, doctor and dry-run commands, safe auth, installed on PATH and paired with a companion skill. Use when an agent keeps hitting the same service through ad hoc calls.

Define a measurable goal

Turns a fuzzy intention into one measurable goal with a validator, scope and stop condition, then registers it via get_goal and create_goal. Use before goal-backed or long-running agent work, when "done" needs a number or a check.

Address GitHub PR comments

Fetches all comments, reviews and inline threads on the current branch's GitHub PR with a gh GraphQL script, numbers them and fixes only the ones you pick. Use when a PR has review comments to work through and you want to choose which get changed.

Jupyter notebooks

Creates and tidies Jupyter notebooks for experiments or tutorials from bundled templates via a stdlib script, with structure patterns and a run-top-to-bottom checklist. Use when starting a notebook or turning a messy one into something others can rerun.

Linear issues and projects

Works with Linear issues, projects and cycles through Linear's MCP server in a fixed order: setup, scope, read, then write, with sample workflows for triage, sprints and releases. Use when an agent should read or update Linear as part of a task.

Deploy to Netlify

Deploys the current project to Netlify with `npx netlify`: checks the login, links the folder to a site by Git remote or creates one, builds locally and returns a preview or production URL. Use when you want to publish a site to Netlify from your machine.

Browser automation with Playwright CLI

Drives a real browser from the terminal with playwright-cli: snapshots give element refs for clicks and typing, plus screenshots, console, network and traces, with no test files written. Use when a task needs a browser clicked through step by step.

Deploy to Render

Deploys an app to Render from a Git repo: writes and validates a render.yaml Blueprint with services, databases and secrets, or creates one service through the Render MCP server, then checks status and logs. Use when an app needs hosting on Render.

Security best-practice review

Checks Python, JavaScript/TypeScript and Go code against bundled security specs for ten frameworks, writes a report by severity with line numbers and fixes one finding at a time. Use when you explicitly ask for a security best-practice review.

Repository threat model

Writes a repository-grounded threat model: trust boundaries, assets, attacker capabilities and ranked abuse paths with mitigations, asking you to confirm key assumptions before the final file. Use when you explicitly ask to threat model a codebase.

Sentry issues and events

Reads Sentry issues and events through the sentry CLI without changing anything: recent production errors, issue and event details, AI root-cause summaries, with PII redacted. Use when you ask what is failing in production according to Sentry.

Deploy to Vercel

Deploys a project to Vercel, as a preview unless told otherwise, through the Vercel CLI or, without an account, a bundled script that uploads the folder and returns a preview link and a claim link. Use when you want a shareable deployment link fast.

Figma MCP design context

Reads Figma frames through the Figma MCP server in a fixed order (design context, metadata, screenshot) and rebuilds them with the project's components and tokens; also covers server setup in Codex. Use when connecting Figma MCP or coding from a frame link.

Figma use_figma prerequisite

Sets the rules an agent must load before every use_figma call that runs Plugin API JavaScript in a Figma file: return values, page resets, colours, fonts, node IDs, small validated steps. Use when creating or editing anything inside a Figma file.

Implement a Figma design in code

Implements a Figma frame or component as code in your repo with 1:1 visual parity: fetches context and a screenshot, maps the output to project tokens and components, then runs a validation checklist. Use when a Figma link must become production UI.

Generate a Figma design from an app

Builds or updates a full screen in Figma from code or a description, section by section, using the file's published components, variables and styles instead of hardcoded values. Use when a page from your app should exist as a Figma screen.

Figma design system from a codebase

Builds a Figma design system library from a codebase in five supervised phases: discovery, variables and styles, page structure, components one by one, QA. Use when a product needs a Figma library that matches its code tokens and components.

Figma Code Connect components

Links published Figma components to the code components that implement them via Code Connect: finds unmapped ones, matches them in the codebase, maps only what the user approves. Use when a Figma library and its code both exist but are not linked.

Figma design system rules

Writes project rules for turning Figma designs into code into CLAUDE.md, AGENTS.md or a Cursor rules file, based on Figma's rule template and an analysis of the codebase. Use when setting up an agent for regular Figma-to-code work in a repo.

Create a new Figma file

Creates a blank Figma design file or FigJam board in your drafts, resolving the plan through whoami, and returns the file key and URL. Use when the next Figma step needs a fresh file to write into.