# Build until pass

> Build until pass is an open-source agent skill for developer tools. Loops a failing build, typecheck, lint or test until the check exits 0. 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/LichAmnesia/lich-skills/tree/main/skills/build-until-pass
- **Repository:** https://github.com/lichamnesia/lich-skills
- **GitHub stars:** 233
- **License:** MIT
- **Skill name:** build-until-pass
- **Collection:** https://github.com/LichAmnesia/lich-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

Build Until Pass gives the agent a bounded fix loop for a failing check command. The agent locks in the command that defines green, runs it once unmodified to confirm the failure, then repeats a cycle: read the first error, apply the smallest targeted diff, and re-run until the exit code is 0 or an attempt cap is reached. Each round is reported in one line showing errors remaining and the change made.

The skill sets firm rules against cheating the check. Suppressing errors with ignore comments, loosening types, deleting tests or forcing a zero exit code are all treated as failures rather than passes. It also tells the agent to stop early when errors do not shrink or oscillate between states, and to hand the problem back to a human with the remaining errors and a hypothesis.

The skill is plain instructions with no bundled scripts. It expects a project with a runnable check command, found through the user's request, CI config, package.json scripts, a Makefile or the build tool's conventions. It is aimed at mechanical failures such as type errors, missing imports, signature mismatches and bundler configuration, and points logic bugs to a separate debugging skill.

## When your agent uses it

> Use when a build, typecheck, lint, or test command is failing and you want the agent to drive it to green on its own — run the check, read the errors, apply the smallest fix, re-run, repeat until exit code 0. Stops the human from being the while-loop (run → read error → fix one line → run again) and stops the agent from bulldozing huge speculative rewrites between checks.

## What it can access

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

- [Instructions only, no scripts](https://github.com/LichAmnesia/lich-skills/tree/HEAD/skills/build-until-pass)
- [License: MIT](https://github.com/LichAmnesia/lich-skills/tree/HEAD/skills/build-until-pass)

## Features

- **Locked check command:** Identifies and records the exact command that defines a passing build before any code changes.
- **Smallest-diff fix rounds:** Applies one targeted fix per round, addressing the first error only, followed by a re-run.
- **Attempt cap and escalation:** Stops after a default of ten rounds, or early when progress stalls, and reports what remains.
- **Anti-suppression safeguards:** Forbids silencing errors, deleting tests or loosening types to fake a passing result.
- **Per-round progress reporting:** Logs each round in a single line showing errors left and the change made.

## Good for

- Fix the TypeScript type errors that are blocking my build
- Get the failing test suite green before I commit
- Make the lint gate pass after my last refactor
- Reproduce our CI typecheck failure locally and fix it
- Resolve missing imports and signature mismatches until tsc exits cleanly

## Install

### Claude Code

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

```sh
/plugin marketplace add LichAmnesia/lich-skills
/plugin install lich-skills@lich-skills
```

Or copy only this skill to `~/.claude/skills/build-until-pass`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/build-until-pass &&
cp -R "$tmp/skills/build-until-pass" ~/.claude/skills/build-until-pass &&
rm -rf "$tmp"
```

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

### Codex

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/build-until-pass &&
cp -R "$tmp/skills/build-until-pass" ~/.agents/skills/build-until-pass &&
rm -rf "$tmp"
```

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

### Cursor

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/build-until-pass &&
cp -R "$tmp/skills/build-until-pass" ~/.cursor/skills/build-until-pass &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/build-until-pass` 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/LichAmnesia/lich-skills.git --path skills/build-until-pass
```

Or copy the folder to `~/.gemini/skills/build-until-pass` yourself.

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/build-until-pass &&
cp -R "$tmp/skills/build-until-pass" ~/.copilot/skills/build-until-pass &&
rm -rf "$tmp"
```

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/LichAmnesia/lich-skills.git
```

Then copy `lich-skills/skills/build-until-pass` into your agent's skills folder as `build-until-pass`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should the skill be used?

When a build, typecheck, lint or test command is failing and the cause is mechanical, such as type errors, missing imports, signature mismatches or bundler configuration.

### When should Build until pass not be used?

When the failure is a logic bug needing investigation, when a product decision is required, or when the build already passes. The skill points logic bugs to a separate debug-hypothesis skill.

### Does the skill run scripts or need extra files?

No. The folder contains a single SKILL.md file and no scripts.

### How does Build until pass decide the build is fixed?

Only a zero exit code from the locked check command counts as green. The agent is told not to judge success from log text.

### What happens if the loop does not converge?

The agent stops at the attempt cap, or earlier if the error count is not falling or errors oscillate, and reports the remaining errors with a hypothesis for a human.

### How do I install Build until pass in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/build-until-pass to use it in all your projects, or to .claude/skills/build-until-pass in one project. Or install the lich-skills plugin, which includes it: /plugin marketplace add LichAmnesia/lich-skills, then /plugin install lich-skills@lich-skills.

### Does Build until pass 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 Build until pass?

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 Build until pass?

The closest alternatives to Build until pass are Build fix edho ferdian, Verification loop, Fix ci, Ci and Vibe quality loop.

## Where this comes from

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

## Alternatives

- [Build fix edho ferdian](https://ai-powered.com/skills/build-fix-edho-ferdian): Build fix edho ferdian is an open-source agent skill for developer tools.
- [Verification loop](https://ai-powered.com/skills/verification-loop-nabwinsaud): Verification loop 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.
- [Ci](https://ai-powered.com/skills/ci-chachamaru127): Ci is an open-source agent skill for developer tools.
- [Vibe quality loop](https://ai-powered.com/skills/vibe-quality-loop): Vibe quality loop is an open-source agent skill for developer tools.
- [Loop on ci](https://ai-powered.com/skills/loop-on-ci): Loop on ci is an open-source agent skill for developer tools.
- [Principle build the lever](https://ai-powered.com/skills/principle-build-the-lever): Principle build the lever is an open-source agent skill for developer tools.
- [Verify](https://ai-powered.com/skills/verify-k1-c): Verify is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/build-until-pass
