Agent skill

Fix CI

by llama-farm in llama-farm/llamafarm

Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan.

Apache-2.0Auto-check: notesTesting & QA

Install Fix CI

skills CLI
$ npx skills add llama-farm/llamafarm --skill fix-ci -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install llama-farm/llamafarm fix-ci --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/llama-farm/llamafarm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/fix-ci .claude/skills/fix-ci && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fix-ci
GitHub stars
836
Token cost
~2.2k tokens
SKILL.md length
845 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan.

  • Works in 12 steps: Prerequisites Check → Parse Arguments → Fetch Failed Run → …
  • Tasks that involve Failing and flaky tests
  • SKILL.md covers Execution Workflow, Error Handling, Output Format and Notes for the Agent
  • Calls gh, uv and brew

What it does

Fix CI is an agent skill from llama-farm/llamafarm. Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan. Use /fix-ci for current branch or /fix-ci <run-id for a specific run.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Failing and flaky tests and Root cause analysis. It works with GitHub. The repository describes itself as: Deploy any AI model, agent, database, RAG, and pipeline locally or remotely in minutes. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Failing and flaky tests
  • Tasks that involve Root cause analysis

Example prompts

  • “/fix-ci”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Grep, Glob, Task, AskUserQuestion, EnterPlanMode

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Prerequisites Check
  2. Parse Arguments
  3. Fetch Failed Run
  4. Get Failure Details
  5. Download Artifacts (if available)
  6. Analyze Failure Type
  7. Map to Local Test Commands
  8. Reproduce Locally
  9. Analyze Root Cause
  10. Enter Plan Mode
  11. User Approval Gate
  12. Execute Fix (after approval only)

What it can do on your machine

Read from SKILL.md and the folder at commit 6244d46. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Grep
    • Glob
    • Task
    • AskUserQuestion
    • EnterPlanMode

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • uv
    • brew
    • ruff
    • go
    • git
    • nx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, uv, git and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fix CI loads about 2.2k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 845 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Grep, Glob, Task, AskUserQuestion, EnterPlanMode

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from llama-farm/llamafarm at commit 6244d46, republished under its Apache-2.0 licence (© llama-farm). 845 words, ~2,245 tokens.

Download SKILL.mdSave it as .claude/skills/fix-ci/SKILL.md (or your agent's skills folder).
name
fix-ci
description
Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan. Use `/fix-ci` for current branch or `/fix-ci <run-id>` for a specific run.
allowed-tools
Bash, Read, Grep, Glob, Task, AskUserQuestion, EnterPlanMode

Fix CI Skill

Automates CI troubleshooting by fetching GitHub Actions failures, analyzing logs, reproducing issues locally, and creating a fix plan for user approval.


Execution Workflow

Step 1: Prerequisites Check

Verify the GitHub CLI is installed and authenticated:

bash
gh --version && gh auth status

If gh is not installed:

  • Inform user: "GitHub CLI is required. Install with: brew install gh"
  • Exit gracefully

If not authenticated:

  • Inform user: "Please authenticate with: gh auth login"
  • Exit gracefully
Step 2: Parse Arguments

Determine the mode based on arguments:

  • No arguments (/fix-ci): Fetch failures for the current branch only
  • With run-id (/fix-ci <run-id>): Fetch specific run (bypasses branch scoping)
Step 3: Fetch Failed Run

Default mode (current branch):

bash
BRANCH=$(git branch --show-current)
gh run list --branch "$BRANCH" --status failure --limit 1 --json databaseId,name,headBranch,workflowName,createdAt

Specific run mode:

bash
gh run view <run-id> --json databaseId,name,headBranch,workflowName,jobs,conclusion

If no failures found:

  • Report: "No failed runs found for branch $BRANCH. CI is green!"
  • Optionally show recent successful runs:
bash
gh run list --branch "$BRANCH" --limit 3 --json databaseId,conclusion,workflowName,createdAt
  • Exit gracefully
Step 4: Get Failure Details

Once a failed run is identified, gather comprehensive details:

bash
RUN_ID=<the-run-id>

# Get failed jobs with their steps
gh run view $RUN_ID --json jobs --jq '.jobs[] | select(.conclusion == "failure") | {name, conclusion, steps: [.steps[] | select(.conclusion == "failure")]}'

# Get failed step logs (critical for debugging)
gh run view $RUN_ID --log-failed 2>&1 | head -500

# Get verbose run info
gh run view $RUN_ID --verbose

Log handling:

  • Truncate logs to 500 lines to avoid context overflow
  • Note to user: "Showing first 500 lines of failed logs. Full logs available on GitHub."
Step 5: Download Artifacts (if available)

Attempt to download any debug artifacts:

bash
# Try common artifact names - failures are OK (not all runs have artifacts)
gh run download $RUN_ID -n "coverage" -D /tmp/ci-debug/ 2>/dev/null || true
gh run download $RUN_ID -n "test-results" -D /tmp/ci-debug/ 2>/dev/null || true
gh run download $RUN_ID -n "logs" -D /tmp/ci-debug/ 2>/dev/null || true

If artifacts downloaded, read them for additional context.

Step 6: Analyze Failure Type

Categorize the failure based on log patterns:

PatternFailure TypeRoot Cause Area
FAIL:, --- FAIL, FAILEDTest FailureSpecific test case
ruff check, ruff formatLint ErrorCode style/formatting
ModuleNotFoundError, ImportErrorImport ErrorMissing dependency
TypeError, AttributeErrorRuntime ErrorType mismatch
SyntaxErrorSyntax ErrorInvalid code
AssertionErrorAssertion FailureTest expectation mismatch
TimeoutError, timed outTimeoutPerformance/hang
PermissionError, EACCESPermission ErrorFile/resource access
ConnectionError, ECONNREFUSEDNetwork ErrorExternal service

Extract key information:

  • Failed test name/file (if applicable)
  • Error message
  • Stack trace location (file:line)
  • Environment variables or config issues
Step 7: Map to Local Test Commands

Determine the appropriate local command based on the CI job:

CI Workflow/JobLocal Command
test-clicd cli && go test ./...
test-python (server)cd server && uv run pytest -v
test-python (rag)cd rag && uv run pytest -v
test-python (config)cd config && uv run pytest -v
test-python (runtime)cd runtimes/universal && uv run pytest -v
lint (python)uv run ruff check .
lint (go)cd cli && golangci-lint run
type-checkuv run mypy .
build-clinx build cli
build-designercd designer && npm run build

For specific test failures, narrow down the command:

  • Python: cd <dir> && uv run pytest -v <test_file>::<test_name>
  • Go: cd cli && go test -v -run <TestName> ./...
Step 8: Reproduce Locally

Run the mapped local command to confirm the failure reproduces:

bash
# Example for Python test
cd server && uv run pytest -v tests/test_api.py::test_health_check

Outcome A - Failure reproduces locally:

  • Good! Continue to fix plan
  • Report: "Successfully reproduced failure locally"

Outcome B - Failure does NOT reproduce locally:

  • Note: "Could not reproduce locally. Possible causes:"
    • Flaky test (timing-dependent)
    • Environment difference (CI has different deps/config)
    • Race condition
  • Suggest: "Consider re-running CI with gh run rerun $RUN_ID"
  • Ask user how to proceed (investigate further or skip)
Step 9: Analyze Root Cause

Based on the failure type and logs, identify:

  1. What failed: Specific test, lint rule, or build step
  2. Why it failed: The actual error condition
  3. Where to fix: File(s) and line(s) that need changes
  4. How to fix: Proposed changes

Use available tools to explore:

  • Read the failing test file
  • Read the code being tested
  • Search for related patterns in the codebase
  • Check recent changes that might have caused the failure
Show full SKILL.md (301 more words)Show less
Step 10: Enter Plan Mode

Use EnterPlanMode to create a formal fix plan. The plan should include:

markdown
# CI Fix Plan

## Problem Statement
[Summary of the CI failure from logs]

## Failure Details
- **Run ID**: <run-id>
- **Workflow**: <workflow-name>
- **Job**: <job-name>
- **Error Type**: <categorized-type>

## Root Cause Analysis
[Explanation of why the failure occurred]

## Affected Files
- `path/to/file1.py` (line X)
- `path/to/file2.py` (line Y)

## Proposed Changes

### Change 1: [Brief description]
[Specific edit to make]

### Change 2: [Brief description]
[Specific edit to make]

## Verification Steps
1. Run: `<local-test-command>`
2. Expected: All tests pass
3. Optional: Run full test suite with `<full-suite-command>`

## Notes
- [Any caveats or considerations]
Step 11: User Approval Gate

Present the plan and wait for explicit user approval:

  • User approves: Proceed to execute fixes
  • User modifies: Incorporate feedback, update plan
  • User rejects: Exit gracefully without changes

CRITICAL: Never make code changes without user approval.

Step 12: Execute Fix (after approval only)
  1. Make the proposed code changes using Edit tool
  2. Run local tests to verify the fix:
bash
<local-test-command>
  1. Report results:
    • Success: "Fix verified locally. Tests pass."
    • Failure: "Fix did not resolve the issue. [details]"

IMPORTANT: Do NOT auto-commit changes. Leave committing to the user or /commit-push-pr skill.


Error Handling

ScenarioAction
gh CLI not installedDirect user to install: brew install gh
gh not authenticatedDirect user to: gh auth login
No failures foundReport CI is green, exit gracefully
Rate limit exceededSuggest waiting or using gh auth refresh
Run not foundVerify run ID, suggest gh run list to find valid IDs
Large logs (>500 lines)Truncate, note full logs on GitHub
Local reproduction failsNote as flaky/env issue, offer re-run option
Network errorsSuggest retry, check connection

Output Format

On finding a failure:

CI Failure Found
Run: #12345 (workflow-name)
Branch: feature-branch
Failed Job: test-python
Error Type: Test Failure

Analyzing logs...
[Summary of failure]

Reproducing locally...
[Result]

Entering plan mode to propose fix...

On success (after fix):

Fix Applied
- Modified: path/to/file.py
- Verification: Tests pass locally

Next steps:
- Review the changes
- Run `/commit-push-pr` to commit and push
- CI will re-run automatically on push

Notes for the Agent

  1. Always scope to current branch by default - Users expect /fix-ci to fix their current work, not random failures
  2. Truncate logs wisely - CI logs can be huge; extract the relevant error sections
  3. Reproduce before fixing - Don't propose fixes for issues that can't be reproduced
  4. Plan mode is mandatory - Always use EnterPlanMode before making changes
  5. Never auto-commit - The user controls when changes are committed
  6. Be specific in analysis - Generic advice isn't helpful; identify exact files and lines
  7. Handle flaky tests - If reproduction fails, acknowledge it might be flaky

© llama-farm, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/fix-ci of llama-farm/llamafarm.

Open the folder on GitHubat commit 6244d46

Compare with similar skills

Fix CI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fix CI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fix CI this skillllama-farm/llamafarm836—~2.2kAutomated safety check: NotesApache-2.0
GreptimeDB Fuzz CI Failure InvestigationGreptimeTeam/greptimedb6.7k—~4.4kAutomated safety check: PassApache-2.0
MAUI CI Investigatordotnet/maui23k—~2kAutomated safety check: PassMIT
Bug To Patch GeneratorArabelaTso/Skills-4-SE253—~4.4kAutomated safety check: PassApache-2.0
Megatron-LM CI Failure TriageNVIDIA/Megatron-LM18k—~1.6kAutomated safety check: PassApache-2.0
CI TriageMentra-Community/MentraOS2.4k—~582Automated safety check: PassApache-2.0

Similar skills

  • Diagnoses a failed GreptimeDB fuzz CI job by pulling its GitHub Actions logs and fuzz artifacts, then matching the evidence to the local source code.

    6.7k GitHub stars~4.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Official

    Adds dotnet/maui-specific context for investigating failing PR checks and broken nightly builds: pipelines, Helix logs, binlogs and merge-readiness verdicts.

    23k GitHub stars~2k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Bug To Patch Generator

    ArabelaTso/Skills-4-SE

    Generate code fixes and patches from bug reports, failing test cases, error messages, and stack traces.

    253 GitHub stars~4.4k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Official

    Investigates a failing GitHub Actions run or job for Megatron-LM, finds the root cause plus the PR and test author involved, and files a structured bug issue.

    18k GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • CI Triage

    Mentra-Community/MentraOS

    Triage failing GitHub PR checks: list failures with gh, fetch capped Actions logs, skip non-Actions checks, and summarize root cause.

    2.4k GitHub stars~582 tokensUpdated today
    DevelopmentAuto-check passed
  • Investigate CI

    ClickHouse/ClickHouse

    Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL.

    50k GitHub stars~11k tokensUpdated today
    DatabasesAuto-check: notes

More from llama-farm/llamafarm

All 19 skills in this repo
  • Reflect

    llama-farm/llamafarm

    Analyze the current session and propose improvements to skills.

    836 GitHub stars~1.5k tokensUpdated 4 mo ago
    Auto-check: notes
  • Temp Files

    llama-farm/llamafarm

    Guidelines for creating temporary files in system temp directory.

    836 GitHub stars~515 tokensUpdated 4 mo ago
    Auto-check: notes
  • CLI Skills

    llama-farm/llamafarm

    CLI best practices for LlamaFarm. An agent skill from llama-farm/llamafarm.

    836 GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Code Review

    llama-farm/llamafarm

    Comprehensive code review for diffs. An agent skill from llama-farm/llamafarm.

    836 GitHub stars~2.3k tokensUpdated 4 mo ago
    Auto-check: notes
  • Commit Push PR

    llama-farm/llamafarm

    Commit changes, push to GitHub, and open a PR. An agent skill from llama-farm/llamafarm.

    836 GitHub stars~2.3k tokensUpdated 4 mo ago
    Auto-check: notes
  • Common Skills

    llama-farm/llamafarm

    Best practices for the Common utilities package in LlamaFarm.

    836 GitHub stars~885 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Categories

Questions about Fix CI

What does Fix CI do?

Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan. Fix CI is an agent skill from llama-farm/llamafarm. Fetch GitHub CI failure information, analyze root causes, reproduce locally, and propose a fix plan.

When should I use Fix CI?

Fix CI fits situations like: tasks that involve Failing and flaky tests; tasks that involve Root cause analysis.

How do I install Fix CI in Claude Code?

Run `npx skills add llama-farm/llamafarm --skill fix-ci -a claude-code`. Or copy the skill folder (.claude/skills/fix-ci in llama-farm/llamafarm) into .claude/skills/fix-ci in your project. Claude Code loads it when a task matches its description.

How do I install Fix CI in Codex?

Run `npx skills add llama-farm/llamafarm --skill fix-ci -a codex`. Or copy the skill folder (.claude/skills/fix-ci in llama-farm/llamafarm) into .agents/skills/fix-ci in your project. Codex loads it when a task matches its description.

Can I use Fix CI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add llama-farm/llamafarm --skill fix-ci -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-ci, .gemini/skills/fix-ci, .github/skills/fix-ci and .opencode/skills/fix-ci in your project.

What does Fix CI need to run?

Going by SKILL.md and its folder, Fix CI needs the command-line tools its instructions call (gh, uv, brew, ruff, go and git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Grep, Glob, Task, AskUserQuestion, EnterPlanMode.

Does Fix CI access the network?

SKILL.md contains no URLs. Its commands use gh, uv, git and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Fix CI safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Fix CI use?

Fix CI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fix CI use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fix CI?

Skills that share tags, products or a category with Fix CI: GreptimeDB Fuzz CI Failure Investigation (GreptimeTeam/greptimedb, 6.7k stars), MAUI CI Investigator (dotnet/maui, 23k stars), Bug To Patch Generator (ArabelaTso/Skills-4-SE, 253 stars) and Megatron-LM CI Failure Triage (NVIDIA/Megatron-LM, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fix CI?

llama-farm (a GitHub organization) maintains it in llama-farm/llamafarm, which has 836 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on June 10, 2026.

Source: llama-farm/llamafarm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.