# Loop on ci

> Loop on ci is an open-source agent skill for developer tools. Watches a pull request's CI checks and fixes failures until they pass. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/Kripu77/software-factory/tree/main/skills/loop-on-ci
- **Repository:** https://github.com/kripu77/software-factory
- **GitHub stars:** 6
- **License:** MIT
- **Skill name:** loop-on-ci
- **Collection:** https://github.com/Kripu77/software-factory
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill has the agent monitor every check attached to a pull request and work through failures until the required checks are green. It starts by resolving the PR for the current branch and inspecting the check set before waiting, so already-failed checks are diagnosed first. If checks are still running, the agent watches them with a fail-fast mode, and after each push it re-reads the full check list since new checks can appear.

The workflow relies on the GitHub CLI. The agent uses gh pr checks as the source of truth because it covers all PR-attached checks, not only GitHub Actions runs. When a failing check links to an Actions run, the agent pulls that run's failed-step logs to find the cause. Fixes are meant to stay scoped to one failure cause at a time, and the agent is told not to skip git hooks to force progress.

The skill also covers judgment calls. If a failure is unrelated to the branch and already fixed on main, the agent merges the latest main rather than adding unrelated changes to the PR. Flaky failures get one retry with the evidence reported. The skill ends with a summary of CI status, the fixes applied and the PR URL once checks pass. It is written to never merge the pull request itself.

## When your agent uses it

> Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Kripu77/software-factory/tree/HEAD/skills/loop-on-ci)
- [License: MIT](https://github.com/Kripu77/software-factory/tree/HEAD/skills/loop-on-ci)

## Features

- **Check set inspection:** Reads every check attached to the current PR, not only GitHub Actions workflows.
- **Fail-fast watching:** Waits on pending checks and stops as soon as one fails so diagnosis can start.
- **Failure log triage:** Pulls failed-step logs from linked GitHub Actions runs to locate the cause.
- **Scoped fixes:** Keeps each change tied to a single failure cause and avoids bypassing hooks.
- **Flake handling:** Retries suspected flaky failures once and reports the evidence.
- **Main sync for unrelated failures:** Merges latest main when a failure is unrelated to the branch and already fixed upstream.

## Good for

- Watch my open PR until all CI checks pass
- Diagnose why the checks on this branch are failing
- Fix the failing lint step on my pull request
- Check whether a red build is a flaky test and retry it
- Pull the failed logs from the GitHub Actions run for this PR

## Install

### Claude Code

This skill ships in the `software-factory` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Kripu77/software-factory
/plugin install software-factory@software-factory
```

Or copy only this skill to `~/.claude/skills/loop-on-ci`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/loop-on-ci &&
cp -R "$tmp/skills/loop-on-ci" ~/.claude/skills/loop-on-ci &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/loop-on-ci` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/loop-on-ci` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/loop-on-ci &&
cp -R "$tmp/skills/loop-on-ci" ~/.agents/skills/loop-on-ci &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/loop-on-ci` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/loop-on-ci` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/loop-on-ci &&
cp -R "$tmp/skills/loop-on-ci" ~/.cursor/skills/loop-on-ci &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/loop-on-ci` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Kripu77/software-factory.git --path skills/loop-on-ci
```

Or copy the folder to `~/.gemini/skills/loop-on-ci` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/loop-on-ci`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Kripu77/software-factory.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/loop-on-ci &&
cp -R "$tmp/skills/loop-on-ci" ~/.copilot/skills/loop-on-ci &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/loop-on-ci` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Kripu77/software-factory.git
```

Then copy `software-factory/skills/loop-on-ci` into your agent's skills folder as `loop-on-ci`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Loop on ci need to run?

It uses the GitHub CLI (gh) and works on the pull request for the current branch.

### Will Loop on ci merge the pull request?

No. The skill states it never merges and never runs gh pr merge.

### Why use gh pr checks instead of gh run list?

gh pr checks includes all PR-attached checks, while gh run list only covers GitHub Actions.

### How does Loop on ci handle flaky failures?

It retries a flaky failure once and reports the flake evidence.

### How do I install Loop on ci in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/loop-on-ci to use it in all your projects, or to .claude/skills/loop-on-ci in one project. Or install the software-factory plugin, which includes it: /plugin marketplace add Kripu77/software-factory, then /plugin install software-factory@software-factory.

### Does Loop on ci run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Loop on ci?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Loop on ci?

The closest alternatives to Loop on ci are Fix ci, Fix ci, Iterate PR, Gh fix ci and Ci.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Fix ci](https://ai-powered.com/skills/fix-ci): Fix ci is an open-source agent skill for developer tools.
- [Fix ci](https://ai-powered.com/skills/fix-ci-fumiya-kume): Fix ci is an open-source agent skill for developer tools.
- [Iterate PR](https://ai-powered.com/skills/iterate-pr): Iterate PR is an open-source agent skill for developer tools.
- [Gh fix ci](https://ai-powered.com/skills/gh-fix-ci): Gh fix ci is a free agent skill for developer tools.
- [Ci](https://ai-powered.com/skills/ci-chachamaru127): Ci is an open-source agent skill for developer tools.
- [Diagnose ci gate](https://ai-powered.com/skills/diagnose-ci-gate): Diagnose ci gate is an open-source agent skill for developer tools.
- [Ci forensics](https://ai-powered.com/skills/ci-forensics): Ci forensics is an open-source agent skill for developer tools.
- [Babysit](https://ai-powered.com/skills/babysit): Babysit is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/loop-on-ci
