
Ralph Loop
Autonomous iterative loop mode that reruns Claude Code against a fixed prompt until explicit completion criteria pass.
- skills.sh installs
- 211
- GitHub stars
- 46
- last updated
- Aug 21, 2026
What it does
- Covers the setup, completion methods, configuration, and safety controls for persistent unattended task execution
- Defines a state file at
.claude/ralph-loop.local.mdwith anactiveflag and anmax_iterationscap, defaulting to 20 - Supports completion via a
[x] ALL_TASKS_COMPLETEmarker inTODO.mdor a matchingcompletion_promisetag - Designed for well-defined refactors, migrations, and test-driven tasks; not for work needing design decisions
Install
$ npx -y skills add belumume/claude-skills --skill ralph-loop -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Ralph Wiggum Loop Mode
Named after the Simpsons character who "never stops despite being confused," this technique runs Claude Code in a loop where the prompt stays the same but the codebase accumulates changes. Each iteration reads previous work and continues until completion.
When to Use Ralph Mode
Ideal for:
- Well-defined implementation tasks with clear completion criteria
- Refactoring or migration work (e.g., React v16 to v19)
- Test-driven development cycles (run until tests pass)
- Batch processing or repetitive tasks
- Overnight autonomous work sessions
Not ideal for:
- Tasks requiring design decisions or human judgment
- Exploratory work without clear end states
- Tasks where requirements may change mid-execution
- First-time implementations where you need to learn the code
Activation Protocol
Step 1: Validate Task Suitability
Before activating, confirm:
- Task has clear, measurable completion criteria
- Success can be verified programmatically (tests, build, specific file state)
- The work is in a git-tracked directory
- You understand what success looks like
Step 2: Create State File
Details
- Repository
- github.com/belumume/claude-skills
- Categories
- Agent Workflow & Planning, AI Agents & LLM Apps, Workflow Automation
- First seen
- Jun 3, 2026
Similar to Ralph Loop
More Agent Workflow & Planning
ralph-reviewedPlugin0xBigBoss/claude-code49 starsIterative Ralph loops with Codex CLI review gates at completion
ralph-wiggumSkillfstandhartinger/ralph-wiggum1.4K installsAutonomous bash loop that feeds specs to fresh agent contexts, finishing only when acceptance criteria pass.
autonomous-loopsSkillaffaan-m/ecc6K installsLoop architectures for Claude Code, from sequential claude -p pipelines to RFC-driven multi-agent DAG orchestration.
ralphSkillyeachan-heo/oh-my-claudecode1.1K installsRalph: a PRD-driven persistence loop that retries until every user story passes reviewer verification.
codex-autoresearch-loopSkillreason-machines/trending-skills1.2K installsSelf-directed modify-verify-revert loop that iterates on a measurable code goal until interrupted or capped.