# ralph-loop > Continuous self-referential AI loops for interactive iterative development, implementing the Ralph Wiggum technique. - Author: zero.one1step@gmail.com - Repository: fawetian/agent-skills - Version: 20260127001635 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/fawetian/agent-skills - Web: https://mule.run/skillshub/@@fawetian/agent-skills~ralph-loop:20260127001635 --- --- name: ralph-loop description: Continuous self-referential AI loops for interactive iterative development, implementing the Ralph Wiggum technique. source: https://github.com/anthropics/claude-plugins-official/tree/main/plugins/ralph-loop --- # Ralph Loop Ralph Loop implements the Ralph Wiggum technique: run a task in a continuous loop where the same prompt is fed back on each iteration, and the model sees its previous work in files and git history. ## /ralph-loop Start a Ralph loop in the current session by running the setup script in this skill: ```bash scripts/setup-ralph-loop.sh PROMPT [--max-iterations N] [--completion-promise TEXT] ``` After setup, work on the task. When you try to exit, the stop hook feeds the same prompt back for another iteration. CRITICAL RULE: If a completion promise is set, you may ONLY output it when the statement is completely and unequivocally true. ### Options - `--max-iterations `: Maximum iterations before auto-stop. - `--completion-promise `: Promise phrase to signal completion. ### Completion promises To signal completion, output: ``` YOUR_PROMISE ``` Do not output a false promise to escape the loop. ## /cancel-ralph Cancel an active Ralph loop (removes the loop state file): 1. Check if `.claude/ralph-loop.local.md` exists. 2. If missing, reply: "No active Ralph loop found." 3. If present: - Read it to get `iteration: N`. - Remove the file. - Reply: "Cancelled Ralph loop (was at iteration N)". ## /ralph-help Explain what Ralph Loop is and how to use it. Include: - The core loop concept and why it is self-referential. - The available commands: `/ralph-loop` and `/cancel-ralph`. - Examples: - `/ralph-loop "Refactor the cache layer" --max-iterations 20` - `/ralph-loop "Add tests" --completion-promise "TESTS COMPLETE"` - When to use and when not to use Ralph. - Links: - https://ghuntley.com/ralph/ - https://github.com/mikeyobrien/ralph-orchestrator ## Files - `.claude/ralph-loop.local.md`: loop state file created by the setup script. - `hooks/stop-hook.sh`: stop hook that enforces the loop. - `scripts/setup-ralph-loop.sh`: setup script that initializes the loop state.