# Fix until green

> Fix until green is an open-source agent skill for developer tools. Runs test, lint and typecheck in a loop, fixing one root cause at a time until all pass. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ivy00johns/Skill-Madness/tree/main/skills/loops/fix-until-green
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** fix-until-green
- **Collection:** https://github.com/ivy00johns/Skill-Madness
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill tells an agent to repeatedly run the project's full gate of tests, lint and typecheck, read the highest-signal failure, fix its root cause, and re-run the whole gate. Success requires all three commands to exit clean in the same run, and the agent is told to assume failure until that happens.

The workflow resolves the gate commands first from a project profile file if one exists, then from declared scripts such as package.json or Makefile targets, and finally from a per-stack default reference. The commands are recorded in a fix plan so each iteration runs the same gate. Hard failures such as flaky tests are routed to a separate diagnosis loop rather than guessed at. Changes are checkpointed, and the loop stops on an iteration cap, three rounds without progress, or a budget limit.

The skill forbids weakening the gate, such as deleting tests or adding ignore directives, and escalates instead. It relies on a Stop-hook reference for a deterministic gate and on Claude Code tooling, and it is intended to be invoked explicitly rather than triggered automatically.

## When your agent uses it

> Drive a failing build to passing: run the full gate (tests, lint, typecheck), fix one root cause, re-run everything, until all three exit clean. Hard cap, no-progress detection, no cheating the gate. Use when asked to drive red tests or CI green, or as the QE inner loop; not merely because a test failed. Trigger on "fix until green", "make the tests pass", "get CI green", "loop until tests pass".

## What it can access

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

- [Instructions only, no scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/fix-until-green)
- [Asks for: Read, Write, Edit, Bash, Grep, Glob](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/loops/fix-until-green/SKILL.md)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/fix-until-green)

## Features

- **Whole-gate verification:** Runs test, lint and typecheck together and re-checks all three after every change.
- **Root-cause fixing:** Targets one underlying cause per iteration instead of patching many symptoms at once.
- **Gate command detection:** Resolves the commands from a project profile, declared scripts or a stack default.
- **Stop conditions:** Halts on an iteration cap, repeated failures with no progress, or a budget limit.
- **Anti-cheat rules:** Forbids deleting tests, skipping them or silencing checks to force a pass.
- **Stop-hook gate:** Includes a reference for a deterministic gate that blocks exit until checks pass.

## Good for

- Get failing CI tests passing on a feature branch
- Fix type errors and lint warnings until the build is clean
- Drive a red test suite to green before opening a pull request
- Run a QA inner loop that repeats fixes until the gate passes

## Install

### Claude Code

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

```sh
/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness
```

Or copy only this skill to `~/.claude/skills/fix-until-green`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/fix-until-green &&
cp -R "$tmp/skills/loops/fix-until-green" ~/.claude/skills/fix-until-green &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/fix-until-green` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/fix-until-green` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/fix-until-green &&
cp -R "$tmp/skills/loops/fix-until-green" ~/.agents/skills/fix-until-green &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/fix-until-green` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/fix-until-green` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/fix-until-green &&
cp -R "$tmp/skills/loops/fix-until-green" ~/.cursor/skills/fix-until-green &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/fix-until-green` 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/ivy00johns/Skill-Madness.git --path skills/loops/fix-until-green
```

Or copy the folder to `~/.gemini/skills/fix-until-green` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/fix-until-green`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/fix-until-green &&
cp -R "$tmp/skills/loops/fix-until-green" ~/.copilot/skills/fix-until-green &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/fix-until-green` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git
```

Then copy `Skill-Madness/skills/loops/fix-until-green` into your agent's skills folder as `fix-until-green`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Fix until green be used?

When asked to drive red tests or CI green, or as the QE inner loop. It is not meant to trigger merely because one test failed.

### Can the agent delete failing tests to get a pass?

No. The skill forbids removing, skipping or weakening tests and adding ignore directives, and asks the agent to surface genuinely wrong tests to a human.

### Does Fix until green need Claude Code?

The skill is marked as requiring Claude Code and uses Claude Code's allowed tools list.

### Does Fix until green run automatically?

No. Model invocation is disabled, so it runs when the user types the command or the orchestrator dispatches it.

### How do I install Fix until green in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/fix-until-green to use it in all your projects, or to .claude/skills/fix-until-green in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

### Does Fix until green 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 Fix until green?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Fix until green?

The closest alternatives to Fix until green are Self correcting loop, Build until pass, Check fix, Debugging and error recovery and Bugfix.

## Where this comes from

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

## Alternatives

- [Self correcting loop](https://ai-powered.com/skills/self-correcting-loop): Self correcting loop is an open-source agent skill for developer tools.
- [Build until pass](https://ai-powered.com/skills/build-until-pass): Build until pass is an open-source agent skill for developer tools.
- [Check fix](https://ai-powered.com/skills/check-fix): Check fix is an open-source agent skill for developer tools.
- [Debugging and error recovery](https://ai-powered.com/skills/debugging-and-error-recovery): Debugging and error recovery is an open-source agent skill for developer tools.
- [Bugfix](https://ai-powered.com/skills/bugfix): Bugfix is an open-source agent skill for developer tools.
- [Ci](https://ai-powered.com/skills/ci-chachamaru127): Ci is an open-source agent skill for developer tools.
- [Fix ci](https://ai-powered.com/skills/fix-ci): Fix ci is an open-source agent skill for developer tools.
- [Debug](https://ai-powered.com/skills/debug-jasgujral): Debug is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/fix-until-green
