agentleFS
sjain-stanfordsjain-stanford/claude-workspace/skills/gh-fix-ci/SKILL.md

gh-fix-ci

Skill2 starsChanged 23 days agoApache-2.0View on GitHub

Inspect and fix failing GitHub Actions PR checks using gh, logs, and focused local verification. For external checks (e.g., Buildkite), report the details URL without attempting provider-specific fixes.

39 other projects use a version of this, 35 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use codebase-migrate, email-draft-polish and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ComposioHQSkill

    codebase-migrate

    Run large codebase migrations and multi-file refactors. Uses the Composio CLI to coordinate issue tracking, batched PRs, and CI verification while the agent executes the transforms locally across hundreds of files.

    Also in 5 projects that use this

  • ComposioHQSkill

    email-draft-polish

    Draft, rewrite, or condense emails with target tone, length, and audience; use for cold outreach, replies, status updates, or escalations where clarity and brevity matter.

    Also in 4 projects that use this

  • petestewartSkill

    datadog-logs

    Query Datadog logs via the Logs Search API v2. Use when the user asks to "check the logs", "search logs", "find errors in Datadog", "look up logs for", "show me production logs", "check for errors", "search Datadog", or any request involving log search, error investigation, or production debugging that requires Datadog log data.

    Also in 3 projects that use this

  • MicrosoftSkill

    deploy-pipeline

    Triggers a Power Platform Pipeline deployment run for a Power Pages solution. Selects a target stage, validates the package, optionally configures deployment settings (environment variables, connection references), then deploys and polls for completion. Use when asked to: "deploy pipeline", "run pipeline", "trigger deployment", "deploy to staging", "deploy to production", "run power platform pipeline", "deploy solution via pipeline", "promote solution", "push to staging", "push to production".

    Also in 3 projects that use this

  • +8 more from ComposioHQ

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 5 are common, 3 are distinctive, and 7 are very specific to this project.

  • 5

    Common

    Most of the 37 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use gh to locate failing PR checks, fetch GitHub Actions logs, summarize the cause, and implement the fix when the user requested it.

    line 12
  2. Very specific:

    Run gh auth status for the target host with normal permissions first.

    line 17
  3. Very specific:

    Add --json if you want machine-friendly output for summarization.

    line 31
  4. Very specific:

    Run gh auth status in the repo for the target host.

    line 36
  5. Very specific:

    If sandboxed auth status fails, rerun the command with sandbox_permissions=require_escalated to allow network/keyring access.

    line 37
  6. Distinctive:

    If unauthenticated, ask the user to log in before proceeding.

    line 38
  7. Very specific:

    Prefer the current branch PR: gh pr view --json number,url.

    line 40
  8. Common:

    If the user provides a PR number or URL, use that directly.

    line 41
  9. Very specific:

    Add --json for machine-friendly output.

    line 45
  10. Very specific:

    If a field is rejected, rerun with the available fields reported by gh.

    line 48
  11. Common:

    If the run log says it is still in progress, fetch job logs directly:

    line 53
  12. Common:

    If the check URL is not a GitHub Actions run, label it as external and only report the URL.

    line 56
  13. Common:

    Do not attempt Buildkite or other providers.

    line 57
  14. Common:

    Call out missing logs explicitly.

    line 60
  15. Distinctive:

    Run the relevant local checks and summarize their results.

    line 68

“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gh Pr Checks Plan Fix

Overview

Use gh to locate failing PR checks, fetch GitHub Actions logs, summarize the cause, and implement the fix when the user requested it. A diagnosis-only or plan-only request stops at that deliverable. Use the PR's development worktree and the repository's contribution and verification guidance.

Run gh auth status for the target host with normal permissions first. Request escalation only if the sandbox blocks network access. Distinguish authentication failures from rate limits and network errors; only authentication failures require the user to log in.

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 for the target host.
    • If sandboxed auth status fails, rerun the command with sandbox_permissions=require_escalated to allow network/keyring access.
    • If unauthenticated, ask the user to log in 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 link (or detailsUrl in legacy output) 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 the check URL 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.
    • State the proposed fix and verification. Save a plan under the workspace's plans/ directory for non-trivial work; no separate plan skill is required.
  7. Implement the requested fix.
    • Apply the fix within the user's authorized scope. Ask only for a material unresolved decision or an action outside that scope.
  8. Recheck status.
    • Run the relevant local checks and summarize their results. Remote checks still describe the pushed commit until the fix is published; do not claim CI passed based only on local tests. Respect workspace remote-write rules.

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

Offline helper checks: python3 -m pytest <path-to-skill>/tests.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.