# Loop controller

> Loop controller is an open-source agent skill for developer tools. Sets up loops that run an agent until a provable condition holds, with guardrails. 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/ivy00johns/Skill-Madness/tree/main/skills/loops/loop-controller
- **Repository:** https://github.com/ivy00johns/skill-madness
- **GitHub stars:** 12
- **License:** MIT
- **Skill name:** loop-controller
- **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 is a harness for building loops where an agent keeps working until something can be verified mechanically. It walks through choosing a stop condition, picking the right execution primitive (such as a goal check, a recurring schedule, a Stop hook or a bash-driven loop), and installing mandatory limits like an iteration cap, a budget, and detection of stalled progress. It also routes common loop intents to existing loop configurations in the same family.

The skill guides the agent through a five-part loop contract covering trigger, action, proof, memory and stop conditions, and recommends storing progress as path-addressable files and JSON criteria that default to failing. It also covers keeping a fresh evaluator separate from the worker and avoiding loops that weaken their own gate.

It expects a Python environment for the bundled runner script that wraps bounded command adapters, and it allows Read, Write, Edit, Bash, Glob, Grep, Agent and Workflow tools. It is meant to be invoked deliberately rather than firing automatically.

## When your agent uses it

> The harness every loop skill builds on: a verifiable stop condition, the mandatory guardrails (iteration cap, enforced budget, no-progress detection), and the right primitive (/goal, /loop, Stop hook, bash Ralph loop, workflow). Use when work must continue until something is provably true, or to author a new loop. Trigger on "loop until", "keep going until", "author a new loop", "overnight build".

## What it can access

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

- [Runs Python scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/loop-controller)
- [Asks for: Read, Write, Edit, Bash, Glob, Grep, Agent, Workflow](https://github.com/ivy00johns/Skill-Madness/blob/HEAD/skills/loops/loop-controller/SKILL.md)
- [No network calls found in its scripts](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/loop-controller)
- [License: MIT](https://github.com/ivy00johns/Skill-Madness/tree/HEAD/skills/loops/loop-controller)

## Features

- **Verifiable stop conditions:** Guides defining a mechanical proof of the real goal so the loop ends on evidence rather than self-assessment.
- **Primitive selection:** Explains when to use a goal check, a recurring scheduler, a Stop hook, or a bash loop for a given job.
- **Mandatory guardrails:** Covers iteration caps, budget enforcement, and no-progress or oscillation detection for loops.
- **Loop contract template:** Provides a five-part contract of trigger, action, proof, memory and stop for documenting a loop.
- **Bounded runner script:** Includes a Python wrapper that reserves call and cost budgets, enforces wall-time limits and locks runs.
- **Routing to existing loops:** Maps common intents such as fixing failing tests or raising coverage to ready-made loop configurations.

## Good for

- Keep fixing failing tests until the whole suite passes
- Build a new loop that runs until a set of criteria is met
- Run an overnight build with a hard budget and iteration cap
- Decide whether a repetitive task is worth turning into a loop
- Set up a fresh-context evaluator to grade subjective work

## 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/loop-controller`:

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

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

### Codex

Copy the skill folder to `~/.agents/skills/loop-controller` 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/loop-controller &&
cp -R "$tmp/skills/loops/loop-controller" ~/.agents/skills/loop-controller &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/loop-controller` 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/loop-controller &&
cp -R "$tmp/skills/loops/loop-controller" ~/.cursor/skills/loop-controller &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/loop-controller` 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/loop-controller
```

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

### VS Code

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

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

For one project only, put the folder in `.github/skills/loop-controller` 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/loop-controller` into your agent's skills folder as `loop-controller`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Loop controller trigger?

It is meant to be invoked deliberately. Its triggers include phrases such as "loop until", "keep going until", "author a new loop" and "overnight build".

### Does Loop controller start loops automatically?

No. The skill sets disable-model-invocation to true, so it must be typed as a slash command or dispatched by the orchestrator.

### What tools does Loop controller need?

It allows Read, Write, Edit, Bash, Glob, Grep, Agent and Workflow. Its scripts are written in Python.

### Which clients does Loop controller support?

The content does not tie it to specific clients, and it notes that it does not require Claude Code, so it is listed for all supported agents.

### How do I install Loop controller in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/loop-controller to use it in all your projects, or to .claude/skills/loop-controller 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 Loop controller run scripts?

Yes. It runs Python scripts. No network calls were found in its 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 controller?

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 controller?

The closest alternatives to Loop controller are Overnight loop, Continuous agent loop, Autonomous loops, Autonomous loops and Loop engine.

## Where this comes from

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

## Alternatives

- [Overnight loop](https://ai-powered.com/skills/overnight-loop): Overnight loop is an open-source agent skill for developer tools.
- [Continuous agent loop](https://ai-powered.com/skills/continuous-agent-loop): Continuous agent loop is an open-source agent skill for developer tools.
- [Autonomous loops](https://ai-powered.com/skills/autonomous-loops): Autonomous loops is an open-source agent skill for developer tools.
- [Autonomous loops](https://ai-powered.com/skills/autonomous-loops-abdullayevtemurmalik): Autonomous loops is an open-source agent skill for developer tools.
- [Loop engine](https://ai-powered.com/skills/loop-engine): Loop engine is an open-source agent skill for developer tools.
- [Orchestrator task loop](https://ai-powered.com/skills/orchestrator-task-loop): Orchestrator task loop is an open-source agent skill for developer tools.
- [Harness loop](https://ai-powered.com/skills/harness-loop-chachamaru127-2): Harness loop is an open-source agent skill for developer tools.
- [Start](https://ai-powered.com/skills/start-localixai): Start is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/loop-controller
