Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By seanGSISGv1.0.0MITIn 1 marketplace
Continuous self-referential AI loops for iterative development, implementing the Ralph Wiggum technique. Run the agent in a while-true loop with the same prompt until task completion.
Claude loads one when your task matches it, or you run it by name.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
ralph, loop, iteration, self-referential, automation, iterative-development
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Ralph Loop runs Claude Code in a self-referential loop, feeding the same prompt back after every turn until the task is complete. It implements the Ralph Wiggum technique pioneered by Geoffrey Huntley.
A single Stop hook drives the loop. When Claude finishes a turn, Claude Code hands the hook the full final assistant message (last_assistant_message) along with stop_hook_active. The hook checks that message for a <promise> tag matching the completion phrase; if the promise hasn't appeared and the iteration limit hasn't been reached, it answers {"decision":"block","reason":"<the original prompt>"}, which sends Claude back around for another iteration. Claude sees its own previous edits in the working tree and git history, iterates on them, and repeats. The prompt never changes. The code does.
Claude Code ends a turn after 8 consecutive Stop-hook continuations. The cap is enforced by Claude Code, is not configurable, and there is no equivalent of the unbounded loop this plugin had on Cursor.
--max-iterations 50 still works, it just spans multiple turns.continue is enough) resets the per-turn counter and runs up to 8 more iterations, picking up at the same iteration number.If you want long unattended iteration, /loop is the native Claude Code alternative — it re-issues a prompt or slash command on an interval (or self-paced) with no continuation ceiling. Reach for Ralph when the point is replaying the same prompt against the agent's own accumulating work inside one turn; reach for /loop when you want it to keep going for hours.
/plugin install ralph-loop@agent-plugins
Start a ralph loop: "Build a REST API for todos. CRUD operations, input validation, tests. Output COMPLETE when done." --completion-promise "COMPLETE" --max-iterations 50
Claude will implement the API, run tests, see failures, fix them, and repeat until all requirements are met — 8 iterations per turn, resuming whenever you send another message.
ralph-loop starts the loop. Provide a prompt and options:
Start a ralph loop: "Refactor the cache layer" --max-iterations 20 --completion-promise "DONE"
--max-iterations <N> stops after N iterations (default: unlimited, subject to the per-turn ceiling)--completion-promise <text> sets the phrase that signals completioncancel-ralph removes the state file and stops the loop.
ralph-loop-help explains the technique and usage in detail.
The loop keeps one file, in your project:
.claude/ralph/scratchpad.md
---
iteration: 3
max_iterations: 20
completion_promise: "COMPLETE"
turn_continuations: 2
---
Build a REST API for todos with CRUD operations, input validation, and tests.
turn_continuations tracks how many continuations the current turn has spent against the ceiling of 8; it resets whenever a fresh user turn starts. Deleting the file cancels the loop.
Define explicit completion criteria. Vague goals like "make it good" give Claude nothing to verify against.
Build a REST API for todos.
When complete:
- All CRUD endpoints working
- Input validation in place
- Tests passing (coverage > 80%)
- Output: <promise>COMPLETE</promise>
Break large tasks into phases. Encourage self-correction by including test/fix cycles in the prompt. Always pass --max-iterations to prevent runaway loops.
Because the hook matches the first <promise> tag in the final message, tell Claude never to write the tag speculatively — the ralph-loop skill already carries that guardrail.
Works well for tasks with clear, verifiable success criteria: getting tests to pass, completing a migration, building a feature from a spec. Not a good fit for tasks that need human judgment, have ambiguous goals, or need to run unattended for a long time.
jq on PATH. If it is missing the hook exits quietly and turns end normally.
MIT
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub seangsisg/cstack --plugin ralph-loopPlugins from other owners that cover similar ground