debug-ci
This skill retrieves GitHub Actions logs to identify root causes of build failures like panics and assertion errors.
Install
mkdir -p .claude/skills/debug-ci && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4305" && unzip -o skill.zip -d .claude/skills/debug-ci && rm skill.zipInstalls to .claude/skills/debug-ci
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Debug failed CI tests by fetching workflow logs from GitHub Actions and analyzing failures. Use when the user mentions CI failures, test failures, or wants to understand why their PR's CI is failing.Key capabilities
- →Fetch GitHub Actions workflow execution logs
- →Strip ANSI color codes from log outputs
- →Identify failure patterns like panic and assertion errors
- →Correlate workflow failures with PR diffs
- →Organize logs by branch or PR number
How it works
Orchestrates API calls through the GitHub CLI to download log blobs, pipes them through regex filters, and performs string analysis for common error markers.
Inputs & outputs
When to use debug-ci
- →Analyze failed CI test logs
- →Extract error messages from GitHub Actions
- →Correlate PR code changes with test failures
About this skill
Debug CI
Debug failed CI tests by fetching workflow logs and analyzing failures.
Prerequisites
ghCLI installed and authenticated (gh auth login)
Instructions
Step 1: Identify Current PR
Get PR info for current branch:
gh pr view --json number,title --jq '"\(.number) \(.title)"' 2>/dev/null || echo "no-pr"
If no PR exists, use branch name for the log directory.
Step 2: Get Latest Workflow Run
Get latest "Rust" workflow run for current branch:
BRANCH=$(git branch --show-current)
gh run list --workflow=Rust --branch=$BRANCH --limit=1 --json databaseId,conclusion,headSha,createdAt
Step 3: Get Job Information
List all jobs from the run:
gh run view <run-id> --json jobs --jq '.jobs[] | {id: .databaseId, name: .name, conclusion: .conclusion}'
Step 4: Download Logs
Create directory and download all job logs, stripping ANSI color codes:
mkdir -p ci-logs/pr-<PR_NUMBER>/
# or: mkdir -p ci-logs/branch-<BRANCH_NAME>/
gh run view --job <job-id> --log | perl -pe 's/\e\[[0-9;]*m//g' > ci-logs/pr-<PR_NUMBER>/<job_name>_<job_id>.log
Sanitize job names for filenames (replace spaces/special chars with underscores).
Step 5: Analyze Failures
- Read downloaded log files
- Search for failure patterns:
FAILED,error[E,panicked at,assertion failed - Extract test names and error messages
- Read PR diff (
gh pr diff) to correlate failures with changes - Categorize failures:
- Real failure: Error in code touched by PR
- Flaky test: Known flaky or unrelated to changes
- Infrastructure: Network/timeout issues
Step 6: Report
Provide summary:
- PR number and title
- Run status and commit SHA
- List of downloaded log file paths
- Categorized failures with file:line references
- Recommendations for next steps
Notes
- The
ci-logs/directory should be in.gitignore - Focus on relevant log sections; files can be large
When not to use it
- →When CI failures are related to local machine environment configuration
- →When the user has not authenticated with the GitHub CLI
- →For debugging local development server crashes
Prerequisites
Limitations
- →Sensitive to changes in GitHub log formatting
- →Requires active internet connection and GitHub repo permissions
- →Parsing large files may consume significant local disk space
How it compares
It automates the tedious manual process of opening browser tabs and scrolling through massive log files to identify specific failure strings.
Compared to similar skills
debug-ci side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| debug-ci (this skill) | 1 | 6mo | Review | Beginner |
| analyze-failures | 1 | 6mo | Caution | Intermediate |
| moai-workflow-testing | 1 | 2mo | Review | Intermediate |
| triage-ci-flake | 1 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Sovereign-Labs
View all by Sovereign-Labs →You might also like
analyze-failures
saleor
Analyze Playwright E2E test failure reports from CI. Parses merged blob reports, groups similar errors, and delegates to specialized subagents for investigation and fixes. Use when CI tests fail or when asked to fix E2E test failures.
moai-workflow-testing
modu-ai
Comprehensive development workflow specialist combining DDD testing, debugging, performance optimization, code review, PR review, and quality assurance into unified development workflows
triage-ci-flake
payloadcms
Use when CI tests fail on main branch after PR merge, or when investigating flaky test failures in CI environments
cts-triage
gfx-rs
Run CTS test suites and investigate failures
detect-flaky-tests
Sovereign-Labs
Identify flaky tests by comparing failures across multiple CI runs. Use when the user suspects flaky tests, sees intermittent failures, or wants to analyze test reliability.
ci-loop
hyodotdev
Run the full CI pipeline locally and iterate until all tests pass.