Claude-skill-registry fix-ci-failures
Diagnose and fix CI/CD failures by analyzing logs, reproducing locally, and applying fixes. Use when CI checks fail on pull requests.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/fix-ci-failures" ~/.claude/skills/majiayu000-claude-skill-registry-fix-ci-failures && rm -rf "$T"
manifest:
skills/data/fix-ci-failures/SKILL.mdsource content
Fix CI Failures Skill
Diagnose and fix CI failures systematically.
When to Use
- CI checks fail on PR
- Workflow runs fail
- Tests pass locally but fail in CI
- Need to debug CI issues
Quick Reference
# View PR checks gh pr checks <pr-number> # View specific run details gh run view <run-id> --log-failed # Reproduce locally ./scripts/reproduce_ci.sh <run-id>
Workflow
- Check status - View failed PR checks
- Get logs - Download or view failure details
- Reproduce - Run same commands locally
- Fix issue - Apply necessary changes
- Verify - Test passes locally
- Push - Commit and push fix
- Monitor - Check CI passes
Common Failures
| Failure | Command | Fix |
|---|---|---|
| Trailing whitespace | | Stage and re-commit |
| Test failure | | Fix code, re-run tests |
| Markdown lint | | Commit fixes |
| Build error | Check imports/deps | Update and rebuild |
Diagnosis Workflow
# 1. View CI status gh pr checks 123 # 2. Get failure details gh run view <run-id> --log-failed # 3. Download logs for analysis gh run download <run-id> # 4. Reproduce issue locally ./scripts/reproduce_ci.sh <run-id> # 5. Fix the issue # ... make changes ... # 6. Verify locally ./scripts/run_ci_locally.sh # 7. Push fix git add . git commit -m "fix: address CI failure" git push # 8. Monitor CI gh pr checks 123 --watch
Error Handling
| Error | Cause | Fix |
|---|---|---|
| "Cannot find module" | Missing import or broken path | Fix import, check file structure |
| "Syntax error" | Invalid code | Correct syntax, test compile |
| "Test failed" | Logic error | Debug test, fix implementation |
| "Hook failed" | Formatting/whitespace | Run formatters, re-commit |
Scripts Available
- Download CI logsscripts/get_ci_logs.sh
- Reproduce locallyscripts/reproduce_ci_failure.sh
- Run CI checks locallyscripts/run_ci_locally.sh
- Auto-fix common issuesscripts/fix_common_ci_issues.sh
Prevention
- Run pre-commit before pushing
- Run tests locally
- Check formatting before commit
- Review CI logs regularly
References
- Related skill:
for lintingquality-run-linters - Related skill:
for pre-commit hooksrun-precommit - Workflow configuration:
.github/workflows/