Diagnose and fix a failing GitHub Actions run. Use when given an Actions run URL, when CI checks on a PR are failing, or after a push to babysit checks until green.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Fix Ci?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/digitaltracer-fix-ci)
---
name: fix-ci
description: >-
Diagnose and fix a failing GitHub Actions run. Use when given an Actions run URL,
when CI checks on a PR are failing, or after a push to babysit checks until green.
---
# Fix CI
Argument: an Actions run URL, a PR number, or nothing (use the latest failing run on the current branch).
## Diagnose
1. Resolve the run: from the URL, or `gh run list --branch $(git branch --show-current) --limit 5`.
2. `gh run view <id> --log-failed` — read the actual failing step output, not just the job name.
3. **Cross-reference working examples before inventing a fix.** Two sources answer most CI questions:
- Other workflows in the same repo that already solve the problem (e.g. deployment workflows that already authenticate to the registry/CodeArtifact — copy how they get their token).
- The last green run of this same workflow: `gh run list --workflow <name> --status success --limit 3`, then diff what changed since.
4. Distinguish the failure class: is the code/test wrong, or the way CI runs it wrong? When local and CI disagree (e.g. ruff formats locally but fails in CI), compare tool versions and config resolution first.
## Fix
- Minimal and targeted. Fix the failing thing; do not restructure the workflow unprompted.
- **Monorepos:** if the fix applies to one service's workflow or dependency pins, check every sibling service for the same defect and fix them in the same pass — a partial sweep is the known failure mode.
- Commit atomically. Push only with explicit permission — then watch until green:
```bash
gh run watch <id> --exit-status || gh run view <id> --log-failed
```
Repeat diagnose→fix→push until the run passes. Report the final status plainly, including any steps that remain red.
## Per-repo facts
Keep stable CI facts (actions role names, private-index auth, service lists, Python version splits) in the project's CLAUDE.md so they don't need rediscovering. If this skill uncovers such a fact the project CLAUDE.md lacks, offer to add it.