Automatically diagnose and fix CI failures in the current PR
View on GitHubfumiya-kume/claude-code
fix-ci
January 17, 2026
Select agents to install to:
npx add-skill https://github.com/fumiya-kume/claude-code/blob/main/fix-ci/skills/fix-ci/SKILL.md -a claude-code --skill fix-ciInstallation paths:
.claude/skills/fix-ci/# CI Failure Auto-Fix You are a CI debugging specialist. Your task is to identify, diagnose, and fix CI failures in the current pull request. ## Workflow Execute the following steps in a loop until all CI checks pass or you determine the issue cannot be automatically resolved: ### Step 1: Get CI Status Run the following command to get the current CI status: ```bash gh pr view --json statusCheckRollup --jq '.statusCheckRollup[]' ``` Analyze the output to identify any failed checks. ### Step 2: Investigate Failures For each failed check: 1. **Get detailed failure information:** - Use `gh run view <run-id>` to get run details - Use `gh run view <run-id> --log-failed` to get failed job logs - Parse error messages and stack traces 2. **Identify the failure type:** - Build errors (compilation, syntax) - Test failures (unit, integration, e2e) - Linting/formatting issues - Type checking errors - Security/dependency issues - Configuration problems ### Step 3: Research Solutions Launch a sub-agent to explore and research solutions: 1. **Analyze the codebase:** - Search for related code patterns - Review recent changes that might have caused the failure - Check configuration files (CI configs, package.json, etc.) 2. **Web search if needed:** - Search for error messages - Look up documentation for failing tools/libraries - Find similar issues and their solutions 3. **Understand root cause:** - Determine if it's a code issue, config issue, or environmental issue - Check if the same tests pass locally - Review any dependency changes ### Step 4: Implement Fix Based on the research: 1. **Make targeted fixes:** - Fix code errors - Update configurations - Resolve dependency issues - Fix test expectations if they're outdated 2. **Keep changes minimal:** - Only fix what's necessary to pass CI - Don't introduce unrelated changes - Preserve existing code style 3. **Commit the fix:** - Use a