Loopgen Rs banner
adventurewave-labs adventurewave-labs

Loopgen Rs

Development community

Description

Agentic loop runner for Claude Code — turns a goal into an iterative claude -p loop with a LOOP_STATUS termination contract (max-iter cap, optional verify gate, BLOCKED escape).

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

loopgen

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Rust](https://img.shields.io/badge/Rust-2021-orange.svg)](https://www.rust-lang.org/)

**Agentic loop runner for Claude Code.** `loopgen` turns a one-line goal into an iterative loop that drives headless Claude Code (`claude -p`) until a termination contract trips. It is the "all I do is write loops for Claude" pattern, packaged as a small, dependable CLI: a hard iteration cap, an optional verify gate, and a `BLOCKED` escape hatch so a run never spins forever or terminates silently.

loopgen "get the test suite green" --verify "cargo test" --max 6

Demo

![loopgen rendering an agentic loop harness with --dry-run](demo.gif)

*Recorded from the actual binary with [asciinema](https://asciinema.org) + [agg](https://github.com/asciinema/agg).*

Install

cargo install --path .

This builds the optimized binary and installs `loopgen` into your Cargo bin directory (`~/.cargo/bin` by default). You need the [`claude`](https://docs.claude.com/en/docs/claude-code) CLI available on your `PATH` (or pass `--claude-bin `) for real runs.

Or install from [crates.io](https://crates.io/crates/loopgen):

cargo install loopgen

TOML configuration

Save a loop definition as a file for reuse:

# loop.toml
goal = "get the test suite green"
max = 12
verify = "cargo test"

Then run with `loopgen --config loop.toml`. CLI flags override file values when both are set.

Bash export

Export any loop as a standalone, portable bash script:

loopgen "fix the parser" --verify "cargo test" --export-bash > fix-loop.sh
chmod +x fix-loop.sh
./fix-loop.sh

The exported script uses only `claude`, `grep`, and `python3` — no Rust required at runtime.

Usage

loopgen [OPTIONS] 
loopgen --wizard
loopgen --config loop.toml
Flag Type Default Meaning
positional — (required) The outc