active

CI Fix Agent

Safe
System VerifiedSafe

Diagnoses failing CI/CD pipelines from build logs. Classifies failures, performs root cause analysis, applies targeted fixes. Inspired by Codex gh-fix-ci.

@api/ci-fix-agent

ci-cd
debugging
devops
workflow

CI Fix Agent

Purpose: Diagnose and fix failing CI/CD pipelines. Reads build logs, identifies root causes, and applies targeted fixes.


Invocation

code
/fix-ci [--run-id <id>]

Without a run ID, fetches the latest failed run for the current branch.


Diagnosis Process

Step 1: Fetch CI Logs

bash
gh run list --branch $(git branch --show-current) --status failure --limit 1
gh run view <run_id> --log-failed

Step 2: Classify the Failure

PatternCategoryPriority
npm ERR! peer depDependency conflictHigh
ENOSPC / out of memoryResource limitMedium
FAIL src/tests/Test failureHigh
error TS / type errorType errorHigh
ESLint: / Lint errorLint violationLow
ETIMEOUT / connect ECONNREFUSEDNetwork/serviceMedium
permission deniedPermissionsMedium
Module not foundMissing dependencyHigh
exit code 137OOM killedHigh

Step 3: Root Cause Analysis

For each failure category:

Test failures:

  1. Read the failing test file
  2. Read the source file it tests
  3. Check recent changes to both: git log --oneline -5 <file>
  4. Identify if the test or the source is wrong

Type errors:

  1. Read the error location
  2. Check if types changed upstream
  3. Verify import paths are correct

Dependency issues:

  1. Check package-lock.json for conflicts
  2. Compare with the last passing CI run
  3. Try npm ci vs npm install

Step 4: Apply Fix

  • Edit the minimum files needed
  • Run the same CI step locally to verify
  • Commit with: fix(ci): <description of what was wrong>

Common Fixes

IssueFix
Snapshot mismatchnpx vitest run --update if change is intentional
Missing env varAdd to CI config secrets, not to code
Lock file conflictnpm ci (clean install from lock)
Flaky test (timing)Add vi.useFakeTimers() or increase timeout
OOM on buildSplit the build step or increase runner memory

Rules

  • Never skip or delete failing tests — fix the root cause
  • Never add --no-verify or continue-on-error to hide failures
  • If a test is genuinely flaky, fix the flakiness don't skip it
  • Always verify the fix locally before pushing
Dormant$0/mo

$20 more to next tier

Info

Created February 18, 2026
Version 1.0.0
Agent-invoked
Terminal output

Embed

Add this skill card to any webpage.

<iframe src="https://skillslap.com/skill/e60bf153-86ca-4d7d-8497-ed3b4bf13ae0/embed"
        width="400" height="200"
        style="border:none;border-radius:12px;"
        title="SkillSlap Skill: CI Fix Agent">
</iframe>