diagnose-ci-failures
warpdotdev/common-skills
Diagnose CI failures for a PR, extract error logs, and generate a fix plan using GitHub CLI.
What is diagnose-ci-failures?
This skill checks CI status for a PR, extracts failure logs from failed checks, categorizes errors by type, and generates a plan document to fix them. Use it when you need to triage test failures, investigate build issues, or understand why a PR's CI is failing.
- Verify a PR exists for the current branch
- Fetch and parse CI status from all checks
- Extract failure logs from failed CI runs
- Categorize errors by type (formatting, linting, compilation, tests, platform-specific)
- Generate a structured plan document with problem statement, current state, proposed fixes, and validation steps
How to install diagnose-ci-failures
npx skills add https://github.com/warpdotdev/common-skills --skill diagnose-ci-failures- GitHub CLI (gh) installed and authenticated
- Git repository with an active PR on the current branch
How to use diagnose-ci-failures
- 1.Run the skill and provide the branch name or let it detect the current branch
- 2.The skill verifies a PR exists for that branch
- 3.It fetches CI status and identifies failed checks
- 4.For each failed check, it extracts logs and error messages
- 5.Errors are categorized by type (formatting, linting, compilation, tests, platform-specific)
- 6.A plan document is generated with the problem statement, current state, proposed fixes, and validation commands
- 7.Review the plan before executing any fixes
Use cases
- Investigate why a PR's CI checks are failing and determine what needs to be fixed
- Triage multiple test failures across different platforms (macOS, Linux, Windows)
- Extract compilation errors and linting issues from CI logs to understand what went wrong
- Create a fix plan before making code changes to resolve CI failures
- Identify platform-specific build failures (WASM, OS-specific issues) and plan fixes
- Developers debugging CI failures on their PRs
- Teams triaging test failures across multiple platforms
- Engineers who want a structured plan before fixing CI issues
diagnose-ci-failures FAQ
The skill will inform you which checks have already failed or passed and highlight checks still in progress. It suggests waiting for completion before diagnosis.
No. It only generates a plan document for review. You must approve the plan before making any changes. For detailed error resolution, it references the fix-errors skill.
The skill checks test status in CI first. If tests passed in CI but fail locally, they may be environment-specific or flaky and not flagged as issues.
Errors are grouped by category: formatting issues, linting issues, compilation errors, test failures, and platform-specific issues. The plan recommends fixing one category at a time.
It works with common check names like 'Formatting + Clippy (MacOS)', 'Run Linux tests', 'WASM build', and others. It parses any check name from the status rollup.
Full instructions (SKILL.md)
Source of truth, from warpdotdev/common-skills.
name: diagnose-ci-failures description: Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.
diagnose-ci-failures
Programmatically diagnose CI failures for a PR and generate a plan to fix them.
Overview
This skill provides a deterministic workflow to check CI status for a PR, extract failure logs, analyze errors, and create a plan (not code changes) to resolve issues. The output is always a plan document that can be reviewed before execution.
Workflow
1. Verify PR exists for current branch
Get the current branch and check if a PR exists:
# Get current branch
git branch --show-current
# Check for PR
gh --no-pager pr view <branch-name> --json number,title,url,state
If no PR exists, inform the user and offer to create one using the create-pr skill.
2. Check CI status
Fetch the status of all CI checks:
gh pr view <branch-name> --json statusCheckRollup
Parse the output to identify:
- Completed checks vs. in-progress checks
- Successful checks
- Failed checks with their names and details URLs
If CI is still running, inform the user which checks have already failed or passed, highlight the checks that are still running, and suggest waiting for completion before diagnosis.
3. Extract failure logs
For each failed check, pull the logs using the run ID from the status check:
gh run view <run-id> --log-failed
Focus on extracting:
- Error messages and their locations (file paths, line numbers)
- Compilation errors (unused imports, type mismatches, etc.)
- Linting/clippy errors with specific lint names
- Test failure messages and stack traces
- Build failures and their root causes
4. Categorize errors
Group errors by type:
- Formatting issues:
cargo fmtfailures - Linting issues:
cargo clippywarnings/errors - Compilation errors: Type errors, missing imports, signature mismatches
- Test failures: Failing tests with their names and failure reasons
- Platform-specific issues: WASM, Linux, macOS, Windows-specific failures
5. Generate fix plan
Create a plan document (using create_plan tool) with:
- Problem Statement: Summary of failing checks
- Current State: What errors were found and where
- Proposed Changes: Specific fixes needed for each error category
- Validation Steps: Commands to verify fixes (fmt, clippy, tests, presubmit)
The plan should reference the fix-errors skill for detailed guidance on resolving specific error types.
Important Notes
- Always create a plan first: Never make code changes directly. Generate a plan for user review
- Check test status in CI: Even if tests fail locally, verify they passed in CI before flagging as issues
- Unrelated test failures: If tests passed in CI but fail locally, they may be environment-specific or flaky
- Multiple error types: Fix one category at a time (e.g., all clippy errors before tests)
- Cross-reference fix-errors skill: For detailed error resolution strategies, use the
fix-errorsskill
Common CI Check Names
Formatting + Clippy (MacOS)Formatting + Clippy (Linux)Run MacOS testsRun Linux testsRun Windows testsCheck CI results(summary check)WASM build
Example Commands
Get PR status with details:
gh --no-pager pr view --json number,title,state,statusCheckRollup
Get logs from specific failed run:
gh run view 12345678 --log-failed
Check for specific error in logs:
gh run view 12345678 --log-failed 2>&1 | grep -A 5 "error:"
Related skills
More from warpdotdev/common-skills and the wider catalog.
spec-driven-implementation
Write PRODUCT.md and TECH.md specs before implementation to drive clarity and quality for substantial features.
write-product-spec
Write detailed PRODUCT.md specs for significant Warp features, focused on user-visible behavior and invariants.
review-pr
Review pull request diffs and write structured feedback to review.json for workflow publication.
resolve-merge-conflicts
Extract conflict hunks and compact diffs to resolve Git merge conflicts without loading full files.
write-tech-spec
Write a TECH.md spec translating product intent into an implementation plan grounded in codebase structure.
fix-errors
Fix compilation errors, linting issues, and test failures in the warp Rust codebase.