with one click
ci-fix
// Use when GitHub Actions CI is failing on the current branch. Fetches latest failed run, reads logs, finds root cause, fixes it. Triggers: fix CI, pipeline broken, build red.
// Use when GitHub Actions CI is failing on the current branch. Fetches latest failed run, reads logs, finds root cause, fixes it. Triggers: fix CI, pipeline broken, build red.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | ci-fix |
| description | Use when GitHub Actions CI is failing on the current branch. Fetches latest failed run, reads logs, finds root cause, fixes it. Triggers: fix CI, pipeline broken, build red. |
Fetch the failing GitHub Actions logs, find the root cause, fix the code. No reports — just fix it.
Pre-run on skill load — output replaces the line below:
gh run list --branch "$(git branch --show-current)" --status failure --limit 1 --json databaseId,name,conclusion,headBranch,event,createdAtIf the output is [], no failed runs exist — tell the user and stop.
If the user specifies a particular run ID or workflow name, use that instead.
Fetch only the failed step logs — this cuts noise dramatically:
gh run view <run-id> --log-failed
If the output is too large or unclear, drill into specific jobs:
gh run view <run-id> --json jobs --jq '.jobs[] | select(.conclusion == "failure") | {name, steps: [.steps[] | select(.conclusion == "failure") | {name, conclusion}]}'
Then fetch a specific job's failed logs:
gh run view <run-id> --job <job-id> --log-failed
Parse the error output. Common failure categories:
Extract the key signal: file path, line number, error message, test name.
Read the files identified in the error logs. Always read the full file context around the error — don't guess from the log alone.
If the error references a test, read both the test file and the source file it tests.
If the error is a build or type error, read the file at the reported line and check imports, types, and function signatures.
Fix the root cause, not symptoms:
Change as little as possible. Don't refactor, clean up, or improve unrelated code.
Run the same check that failed, locally:
If you can't determine the local equivalent of the CI command, check the workflow YAML:
gh run view <run-id> --json workflowName --jq '.workflowName'
Then read .github/workflows/<name>.yml to find the exact command.
Tell the user the result. If it passes, you're done. If it fails with a different error, go back to step 3.