Ralph Lab — AI skill for Claude Code
Gate-neutral Ralph loop driver in Python.
How to install Ralph Lab
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open dobachi/ralph-lab and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Ralph Lab does
Gate-neutral Ralph loop driver in Python. Wraps agent CLIs (claude/codex/gemini) in a subprocess loop until a user-supplied gate script exits 0. Multi-agent, multi-model, JSONL observability. Successor to agent-loop-lab.
Alternatives in AI
- Omniget — Udemy & Hotmart course downloader, YouTube downloader (yt-dlp GUI, 1,800+ sites) + desktop app for AI agents 13.9k ★
- Ralph For Claude Code — by Frank Bria - An autonomous AI development framework that enables Claude Code to work iteratively on project 8k ★
- Proxypal — A desktop app that lets you use your AI subscriptions (Claude, ChatGPT, Gemini, GitHub Copilot) with any codin 1.2k ★
README
ralph-lab
Gate-neutral **Ralph loop** driver in Python. Wraps agent CLIs (claude / codex / gemini / opencode) in a subprocess loop, runs them until a **user-supplied gate script** exits 0, and records everything as JSONL.
**Successor to [agent-loop-lab](https://github.com/dobachi/agent-loop-lab)** (archived). Full rewrite; see [Prior art](#prior-art) for the history.
Design principles
- Ralph faithful. Each iteration starts with a fresh subprocess. No shared context across iterations — context accumulation degrades quality past 100k-150k tokens (Ralph pattern, 2025).
- Gate-neutral. Any bash script that returns exit 0 / non-zero works.
loop-goal,pytest,cargo test,eslint,grep -q "…"— all first class.ralph-labdoesn't care what the gate does; it just reads stdout as feedback and exit code as verdict. - Multi-agent CLI. Switch between
claude,codex,gemini,opencodewithout changing the loop. - Multi-model. Run the same goal across N models to compare
(
--models m1,m2,m3), each in its own workspace, results in one JSONL for easy diffing. - Observability. Every iteration records subprocess exit, duration, gate result, and stdout/stderr sizes. Iteration-level metric only (turn/tool-call metric is inside the agent CLI subprocess and not exposed).
What ralph-lab does NOT do
- No custom LLM SDK.
openai-agents-python,anthropic-sdk, etc. belong to the agent CLI, not to ralph-lab. If you want to change which SDK is used, use a different agent CLI or add flags viaagent_flagsin the spec. - No built-in gate. Bring your own.
goals/examples/shows several patterns. - No multi-agent coordination. One agent CLI per run. For multi-agent workflows, orchestrate ralph-lab runs from outside.
Prior art
Based on:
- Geoffrey Huntley's Ralph loop pattern (2025)
- syuya2036/ralph-loop (bash reference)
Related Skills
So101 Physical AI Lab
A robot you talk to: a platform for operating, teaching and researching robot arms (SO-101 on a Jetson, Claude
Ralph Loop
A long-running AI agent loop. Ralph automates software development tasks by iteratively working through a task
Token Cost Tracker
Estimate, log, and report token usage using runtime-supplied billing rates; never rely on embedded model price
Claude PM
Claude PM - Multi-Subprocess Orchestration Framework for AI-driven project management
PersonaCore Agent
Windows-first voice-controlled AI agent (framework build). Talks to PersonaCore for LLM + Wyoming voice; local
Animated Drawing
Animate a SUPPLIED drawing/photo of a character with real motion capture (Meta AnimatedDrawings) → raster GIF/
Related Agents
Subprocess Safety Reviewer
Reviews changes that spawn or control external processes (tmux, git, gh, bash, agent CLIs) and changes touchin
Gsc Pagespeed
Per-URL Lighthouse / PageSpeed Insights driver. Returns lab + field CWV plus Lighthouse SEO / accessibility /
Kotlin Convention Validator
Kotlin-only. Detects and auto-fixes convention violations in changed .kt files (git diff HEAD). Exits immediat