# Fix Failing Pipelines

Should be used when the user asks to "fix pipelines", "fix CI", "check staging...

- Repository: https://github.com/a5c-ai/babysitter (1887 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add a5c-ai/babysitter --skill fix-failing-pipelines -g -a claude-code -y`
Codex: `npx skills add a5c-ai/babysitter --skill fix-failing-pipelines -g -a codex -y`
Cursor: `npx skills add a5c-ai/babysitter --skill fix-failing-pipelines -g -a cursor -y`
Gemini CLI: `npx skills add a5c-ai/babysitter --skill fix-failing-pipelines -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add a5c-ai/babysitter`

## Description

This skill should be used when the user asks to "fix pipelines", "fix CI", "check staging pipelines", "fix failing workflows", "fix failing actions", or wants to find and fix failing GitHub Actions workflows on the staging branch of the babysitter repo.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Fix Failing Pipelines

Check GitHub Actions workflows on the `staging` branch of https://github.com/a5c-ai/babysitter/actions, identify workflows whose most recent run is failing, and dispatch `/babysitter:yolo` to fix each one.

## Workflow

### Step 1: Fetch Most Recent Run Per Workflow

Use the `gh` CLI to list recent workflow runs on the `staging` branch:

```bash
gh run list --repo a5c-ai/babysitter --branch staging --limit 50 --json databaseId,workflowName,status,conclusion,createdAt,headBranch
```

Group the results by `workflowName`. For each workflow, keep only the **most recent** run (by `createdAt`). Discard workflows where the most recent run is still `in_progress` -- we only care about completed runs.

### Step 2: Identify Failures

From the grouped results, select only workflows where the most recent completed run has `conclusion: "failure"`. Skip workflows whose latest run succeeded, was cancelled, or is still running.

If no workflows have a failing most-recent run, report that all staging pipelines are green and stop.

### Step 3: Get Failure Details

For each failing workflow run, fetch the failed job and step details:

```bash
gh run view <run_id> --repo a5c-ai/babysitter --json jobs --jq '.jobs[] | select(.conclusion == "failure") | {name, conclusion, steps: [.steps[] | select(.conclusion == "failure") | .name]}'
```

Then fetch the logs to understand the actual error:

```bash
gh run view <run_id> --repo a5c-ai/babysitter --log-failed 2>&1 | tail -100
```

### Step 4: Present Failures

Display the list of failing workflows to the user with:
- Workflow name
- Run ID and link
- Failed job name(s) and failed step name(s)
- Brief summary of the error from the logs

### Step 5: Fix via Babysitter

For each failing workflow, invoke the `babysitter:yolo` skill with a prompt that includes the failure context:

The rest: https://github.com/a5c-ai/babysitter/blob/HEAD/.claude/skills/fix-failing-pipelines/SKILL.md
