Skip to content
/ci-fixStable

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

DevOpsCI/CDΒ· 2 min read

Quick import: Download the .md file and save it to .claude/commands/ (Claude Code), .cursorrules (Cursor), or paste as a system prompt in ChatGPT, Gemini, or any LLM API.

#What it does

The /ci-fix skill diagnoses failing CI/CD pipelines by reading build logs, identifying the root cause, and applying targeted fixes. It handles GitHub Actions, GitLab CI, and other common CI systems.

#How to use

bash
/ci-fix
/ci-fix https://github.com/owner/repo/actions/runs/12345

#Workflow

  1. Identify -- Detects the CI system and locates the failing workflow
  2. Fetch -- Pulls the latest run logs and error output
  3. Diagnose -- Classifies the failure type (dependency, test, build, config, flaky)
  4. Fix -- Applies the appropriate fix and explains the root cause
  5. Prevent -- Suggests pipeline improvements to avoid future failures

#Common failures it resolves

  • Dependency issues -- Lock file conflicts, missing native dependencies, version mismatches
  • Environment mismatches -- Node/Python version differences, missing env vars, OS-specific paths
  • Flaky tests -- Race conditions, time-dependent assertions, external service calls
  • Resource limits -- Out of memory during build, disk space exhaustion, timeout errors
  • Config errors -- YAML syntax issues, incorrect step ordering, missing permissions

#Example

bash
> /ci-fix
 
# Fetching latest CI run...
Run #847 FAILED at step "Build" (2m 14s)
 
# Error:
TypeError: Cannot read properties of undefined (reading 'map')
  at generateSitemap (src/lib/sitemap.ts:23:18)
 
# Diagnosis:
Build-time data fetch returns undefined in CI (no API key set).
NEXT_PUBLIC_API_URL is configured locally but not in GitHub Secrets.
 
# Fix:
1. Added NEXT_PUBLIC_API_URL to .github/workflows/deploy.yml
2. Added fallback for missing env var in sitemap.ts
3. Re-triggered workflow
 
# Result: Build passing
Orel OhayonΒ·
View all skills