analyze-ci — Claude Code skill: what it does, how to install
analyze-ci — a skill for Claude Code investigates failed GitHub Actions jobs and traces errors to their causes. Give it a job, workflow-run, or PR URL.
Apache-2.0 ★ 28,925 updated 2026-11-11
npx skills add mlflow/mlflow --skill analyze-ci -a claude-codeWhat analyze-ci does
analyze-ci runs on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. It accepts URLs for GitHub Actions jobs, workflow runs, or pull requests, fetches logs for failed jobs, and writes a focused summary for each one.
The report keeps the job URL, raw-log path, and relevant line ranges. It checks failed steps, pytest output, exceptions, stack traces, and full test names; package-version or snapshot-change ranges are included when they appear in the log. GitHub access requires a token supplied by gh auth token or GH_TOKEN. Without that token, the log-fetch step cannot run.
What it helps with
- trace a failed GitHub Actions job from its URL
- identify the root cause inside a CI log
- connect a failure to its test name and stack trace
- inspect package changes beside a failing job
- keep exact log ranges for a follow-up review
Example prompts for the agent
- Run
/analyze-ci https://github.com/mlflow/mlflow/pull/19601and summarize every failed job in this PR. - Use
/analyze-ci https://github.com/mlflow/mlflow/actions/runs/22626454465to explain why this workflow run failed. - Analyze
/analyze-ci https://github.com/mlflow/mlflow/actions/runs/12345/job/67890and show the relevant log lines.
How to install analyze-ci
1Skills CLI (Vercel)
npx skills add mlflow/mlflow --skill analyze-ci -a claude-code2Manually: put the files in place
~/.claude/skills/analyze-ci/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/analyze-ci/
1Skills CLI (Vercel)
npx skills add mlflow/mlflow --skill analyze-ci -a codex2Manually: put the files in place
.agents/skills/analyze-ci/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mlflow/mlflow --skill analyze-ci -a cursor2Manually: put the files in place
.cursor/skills/analyze-ci/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mlflow/mlflow .claude/skills/analyze-ci2Manually: put the files in place
.github/skills/analyze-ci/SKILL.md1Skills CLI (Vercel)
npx skills add mlflow/mlflow --skill analyze-ci -a gemini-cli2Platform CLI
gemini skills install https://github.com/mlflow/mlflow --path .claude/skills/analyze-ciManually: put the files in place
.devin/skills/analyze-ci/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mlflow/mlflow --skill analyze-ci -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about analyze-ci
How do I install analyze-ci in Claude Code?
Run npx skills add mlflow/mlflow --skill analyze-ci -a claude-code. The skill file is placed at ~/.claude/skills/analyze-ci/SKILL.md.
What does analyze-ci do?
It fetches logs for failed GitHub Actions jobs from a job, workflow-run, or PR URL. The result highlights the root cause, error messages, test names, and raw-log paths.
What does analyze-ci need to fetch logs?
A GitHub token is required. The skill reads it from gh auth token or GH_TOKEN; log retrieval cannot proceed without one.
Source text
SKILL.md · Apache-2.0
--- name: analyze-ci description: Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root cause and log paths. when_to_use: When CI is red or a check failed, when the user pastes a GitHub Actions job or run URL, or when asked why a PR's checks are failing. argument-hint: "url(s) of failed GitHub Action jobs, workflow runs, or PRs" --- # Analyze CI Failures Fetch logs from failed GitHub Action jobs and produce a focused per-job failure summary. URLs provided: $ARGUMENTS If no URLs are listed above, ask for a job, run, or PR URL and stop. `fetch-logs` requires at least one and exits 2 without. ## Prerequisites - **GitHub Token**: Auto-detected via `gh auth token`, or set `GH_TOKEN`. ## Steps 1. **Fetch logs.** Run, single-quoting each URL so the shell does not interpret `?` or other special characters in it: ```bash uv run --package skills skills fetch-logs '<url>' ['<url>' ...] ``` The command saves one raw log per job, preserving timestamps and removing ANSI colors. It prints all failed steps and inclusive, 1-based line ranges in that file, with multiple ranges separated by commas. Absent sections are omitted; no separate section files are created. For example (URL and ranges are illustrative): ```text ## Cross-version tests / Python 3.11 URL: https://github.com/mlflow/mlflow/actions/runs/123/job/456 Raw log: /tmp/fetch-logs/123/456.log Failed step lines: 850-1620, 1800-2100 Pytest summary lines: 1580-1618, 2060-2098 Package versions lines: 120-340 Snapshot changes lines: 350-375 ``` Snapshot changes are located in the existing raw log, not fetched or compared separately. 2. **Read the reported ranges and summarize each failure.** For every block, read all `Failed step lines:` and `Pytest summary lines:` ranges from the `Raw log:` file (for example, `sed -n '850,1620p' /tmp/fetch-logs/123/456.log`), then identify: - The root cause. - Specific error messages (assertion errors, exceptions, stack traces). - Full pytest test names where applicable (e.g. `tests/test_foo.py::test_bar`). - A short log snippet showing the error context. If `Package versions lines:` or `Snapshot changes lines:` is present, read those ranges in the same raw log too and summarize relevant package changes alongside the failure, including the baseline run link when available. Changes use uv's `Updated name vold -> vnew`, `Added name vversion`, and `Removed name vversion` format. Treat changes as diagnostic evidence, not proof of the root cause. Report unavailable baselines or comparison errors as such, not as package removals. Do not fetch artifacts or perform another comparison. Older or non-cross-version logs may have no snapshot changes block; analyze them normally. If no failed-step range is available (for example, step timestamps are missing), inspect the raw log directly. 3. **Format each summary** with these fields, then a blank line, then the 1-2 paragraph summary. - `## <workflow name> / <job name>` - `URL: <job_url>` - `Raw log: <raw_log_path>` - `Failed step lines: <ranges>` (if present) - `Pytest summary lines: <ranges>` (if present) - `Package versions lines: <ranges>` (if present) - `Snapshot changes lines: <ranges>` (if present) Preserve the `Raw log:` path and all reported ranges verbatim from step 1 so downstream agents can inspect the same evidence. If no failed step is recorded, preserve the `Conclusion:` field too. ## Invocation examples ```bash # All failed jobs on a PR /analyze-ci https://github.com/mlflow/mlflow/pull/19601 # All failed jobs in one workflow run /analyze-ci https://github.com/mlflow/mlflow/actions/runs/22626454465 # Specific job by URL /analyze-ci https://github.com/mlflow/mlflow/actions/runs/12345/job/67890 # Multiple URLs at once /analyze-ci https://github.com/mlflow/mlflow/actions/runs/123/job/456 https://github.com/mlflow/mlflow/actions/runs/789/job/012 ```
© mlflow · Apache-2.0 · mlflow/mlflow