Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.
68
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Programmatically diagnose CI failures for a PR and generate a plan to fix them.
This skill provides a deterministic workflow to check CI status for a PR, extract failure logs, analyze errors, and create a plan (not code changes) to resolve issues. The output is always a plan document that can be reviewed before execution.
Get the current branch and check if a PR exists:
# Get current branch
git branch --show-current
# Check for PR
GH_PAGER=cat gh pr view <branch-name> --json number,title,url,stateIf no PR exists, inform the user and offer to create one using the create-pr skill.
Fetch the status of all CI checks:
GH_PAGER=cat gh pr view <branch-name> --json statusCheckRollupParse the output to identify:
If CI is still running, inform the user which checks have already failed or passed, highlight the checks that are still running, and suggest waiting for completion before diagnosis.
For each failed check, pull the logs using the run ID from the status check:
GH_PAGER=cat gh run view <run-id> --log-failedFocus on extracting:
Group errors by type:
cargo fmt failurescargo clippy warnings/errorsCreate a plan document (using create_plan tool) with:
The plan should reference the fix-errors skill for detailed guidance on resolving specific error types.
GH_PAGER=cat on every gh invocation. The GitHub CLI does not support --no-pager as a global option; GH_PAGER and PAGER are its documented paging controlsfix-errors skillFormatting + Clippy (MacOS)Formatting + Clippy (Linux)Run MacOS testsRun Linux testsRun Windows testsCheck CI results (summary check)WASM buildGet PR status with details:
GH_PAGER=cat gh pr view --json number,title,state,statusCheckRollupGet logs from specific failed run:
GH_PAGER=cat gh run view 12345678 --log-failedCheck for specific error in logs:
GH_PAGER=cat gh run view 12345678 --log-failed 2>&1 | grep -A 5 "error:"69b4753
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.