Use when diagnosing CI/CD failures. Trigger with CI failure logs or pipeline errors.
npx claudepluginhub emasoft/emasoft-plugins --plugin emasoft-integrator-agentThis skill uses the workspace's default tool permissions.
This skill teaches you how to systematically diagnose and fix Continuous Integration (CI) failures. CI pipelines fail for predictable reasons that fall into identifiable pattern categories. By recognizing these patterns, you can quickly identify root causes and apply proven fixes.
README.mdexamples/ci-multiplatform.ymlexamples/dependabot.ymlexamples/lint-multilanguage.ymlexamples/pr-auto-labeler.ymlexamples/prepare-release.ymlexamples/quality-security.ymlexamples/stale-issues.ymlreferences/bot-categories.mdreferences/ci-concurrency-groups.mdreferences/ci-gate-job-pattern.mdreferences/ci-job-summaries.mdreferences/ci-linting-workflow.mdreferences/ci-minimum-permissions.mdreferences/ci-optimized-matrix.mdreferences/ci-path-filtered-triggers.mdreferences/ci-pr-auto-labeling.mdreferences/ci-security-scanning.mdreferences/claude-pr-handling.mdreferences/cross-platform-patterns.mdDiagnoses and fixes GitHub Actions CI failures in pull requests by fetching job logs, identifying root causes like build or test errors, and proposing targeted code changes.
Detects GitHub Actions CI failures in PRs, analyzes logs with gh CLI, fixes code, commits and pushes changes, then re-verifies up to 3 retries until passing.
Generic CI environment rules for GitHub Actions workflows. Use when operating in CI — covers security, CI monitoring, comment formatting, and investigating session logs from other runs.
Share bugs, ideas, or general feedback.
This skill teaches you how to systematically diagnose and fix Continuous Integration (CI) failures. CI pipelines fail for predictable reasons that fall into identifiable pattern categories. By recognizing these patterns, you can quickly identify root causes and apply proven fixes.
Before using this skill, ensure:
python3 available in PATH for running diagnostic scriptsFollow these steps to diagnose and fix CI failures:
python scripts/eia_diagnose_ci_failure.py --log-file ci.logCopy this checklist and track your progress:
python scripts/eia_diagnose_ci_failure.py --log-file ci.logUse this skill when:
This skill produces the following outputs:
| Output Type | Description |
|---|---|
| Diagnostic report | JSON or text report from eia_diagnose_ci_failure.py identifying failure patterns and suggested fixes |
| Platform issue scan | JSON or text report from eia_detect_platform_issue.py listing platform-specific code patterns that may cause CI failures |
| Fix recommendations | Step-by-step instructions from reference documents for resolving identified failure patterns |
| Verification steps | Commands and procedures to verify fixes locally before pushing to CI |
CI failures fall into six main categories:
| Category | Description | Reference Document |
|---|---|---|
| Cross-Platform | OS differences causing failures | cross-platform-patterns.md |
| Exit Codes | Shell/script exit code handling | exit-code-patterns.md |
| Syntax | Shell syntax, heredocs, quoting | syntax-patterns.md |
| Dependencies | Import paths, missing packages | dependency-patterns.md |
| Infrastructure | GitHub runners, labels, permissions | github-infrastructure-patterns.md |
| Language-Specific | Python, JS, Rust, Go peculiarities | language-specific-patterns.md |
| Bot Categories | PR author classification for automation | bot-categories.md |
| Claude PR Handling | Workflow for Claude Code Action PRs | claude-pr-handling.md |
Follow this decision tree to identify the failure category:
START: CI Failure Occurred
│
├─► Does error mention path or file not found?
│ ├─► YES → Check Cross-Platform Patterns (temp paths, separators, case sensitivity)
│ └─► NO ↓
│
├─► Does error show non-zero exit code?
│ ├─► YES → Check Exit Code Patterns (persistence, tool-specific codes)
│ └─► NO ↓
│
├─► Does error mention syntax error or unexpected token?
│ ├─► YES → Check Syntax Patterns (heredocs, quoting, line endings)
│ └─► NO ↓
│
├─► Does error mention import/require/module not found?
│ ├─► YES → Check Dependency Patterns (import resolution, versions)
│ └─► NO ↓
│
├─► Does error mention GitHub-specific resources (labels, runners)?
│ ├─► YES → Check Infrastructure Patterns (labels, permissions, runners)
│ └─► NO ↓
│
└─► Check Language-Specific Patterns for the failing language
| Pattern | Symptom | Quick Fix |
|---|---|---|
| Temp path differences | "File not found" on temp files | Use tempfile.gettempdir() (Python) or os.tmpdir() (JS) |
| Path separator | \ fails on Linux | Use path.join() or normalize paths |
| Exit code persistence | PowerShell shows wrong exit code | Add explicit exit 0 at script end |
| Heredoc terminator | "Unexpected end of file" | Ensure terminator at column 0, no trailing spaces |
| Missing labels | "Label X not found" | Create labels via API before workflow runs |
| Module import | "ModuleNotFoundError" | Check relative imports, PYTHONPATH, package structure |
File: references/cross-platform-patterns.md
Contents:
File: references/exit-code-patterns.md
Contents:
File: references/syntax-patterns.md
Contents:
File: references/dependency-patterns.md
Contents:
File: references/github-infrastructure-patterns.md
Contents:
File: references/language-specific-patterns.md
Contents:
File: references/bot-categories.md
Contents:
File: references/claude-pr-handling.md
Contents:
File: references/debug-procedures.md
Contents:
This skill includes two Python scripts for automated diagnosis:
Analyzes CI failure logs to identify patterns and suggest fixes.
# Analyze a log file
python scripts/eia_diagnose_ci_failure.py --log-file /path/to/ci.log
# Analyze from stdin
cat ci.log | python scripts/eia_diagnose_ci_failure.py --stdin
# Output as JSON
python scripts/eia_diagnose_ci_failure.py --log-file ci.log --json
Scans source code for platform-specific patterns that may cause CI failures.
# Scan a directory
python scripts/eia_detect_platform_issue.py --path /path/to/project
# Scan specific file types
python scripts/eia_detect_platform_issue.py --path . --extensions .py .js .sh
# Output as JSON
python scripts/eia_detect_platform_issue.py --path . --json
python scripts/eia_diagnose_ci_failure.py --log-file ci.log# CI log shows: FileNotFoundError: /tmp/build/output.txt
# Run diagnostic script
python scripts/eia_diagnose_ci_failure.py --log-file ci.log
# Output identifies cross-platform temp path issue
# Fix: Use tempfile.gettempdir() instead of hardcoded /tmp
# CI log shows: syntax error near unexpected token `newline`
# Cause: Heredoc EOF terminator has trailing whitespace
# Fix: Ensure EOF is at column 0 with no trailing spaces
Read the full error message and search for keywords in the reference documents. Common keywords:
This usually indicates a cross-platform issue. Check:
Check for: