Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By Ilm-Alan
Iterative development loops for Claude Code - run Claude in a while-true loop with the same prompt until task completion, allowing self-referential improvement through file and git history.
npx claudepluginhub Ilm-Alan/claude-devloop --plugin loopAn iterative development loop plugin for Claude Code. Evolved from ralph-loop with significant improvements for reliability, multi-session support, and anti-cheat enforcement.
Ralph-loop pioneered the concept of self-referential Claude loops, but had limitations. Loop improves on it with:
-m, -c) alongside long forms/plugin marketplace add Ilm-Alan/claude-loop
/plugin install loop@claude-loop
# Basic loop with iteration limit
/loop:start Build a REST API for todos -m 10
# Loop with completion promise (exits when genuinely true)
/loop:start Fix all type errors -c 'Zero TypeScript errors in build'
# Both options
/loop:start Implement auth -m 20 -c 'Login and logout working with tests'
| Flag | Long form | Description |
|---|---|---|
-m N | --max-iterations N | Stop after N iterations (default: unlimited) |
-c 'text' | --completion-promise 'text' | Exit early when statement is true |
/loop:start <prompt> [options] - Start a loop/loop:stop - Stop the active loop (user-only, not exposed to Claude)Each iteration, Claude must:
Short responses, summaries, or "complete" without changes are explicitly prohibited.
Set a completion promise for goal-oriented loops:
/loop:start Implement user registration -c 'Registration flow complete with validation'
Claude exits by outputting: <promise>Registration flow complete with validation</promise>
Claude is explicitly instructed:
The stop hook reminds Claude each iteration:
Loop iteration 3 | To exit: output <promise>TEXT</promise> (ONLY when statement is TRUE - do not lie to exit!)
Unlike ralph-loop's global state file, loop creates unique state files per session:
.claude/loop-1704067200-12345-9876.local.md
.claude/loop-1704067300-12346-5432.local.md
Each session is isolated via transcript path matching, so multiple Claude instances can run loops in the same directory without conflicts.
This prevents the race conditions and cross-session interference that plague global state approaches.
claude-loop/
├── .claude-plugin/
│ └── marketplace.json # Marketplace manifest
├── README.md # This file
└── loop/ # The plugin
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/
│ ├── start.md # /loop:start - comprehensive workflow instructions
│ └── stop.md # /loop:stop - user-initiated stop
├── hooks/
│ ├── hooks.json # Hook configuration (claim + stop)
│ ├── claim-hook.sh # Claims state files on UserPromptSubmit
│ └── stop-hook.sh # Intercepts exit, feeds prompt back
└── scripts/
├── setup-loop.sh # Argument parsing, state file creation
└── stop-loop.sh # Removes state file for current session
---
active: true
iteration: 3
max_iterations: 10
completion_promise: "All tests passing"
transcript_path: "/path/to/session/transcript.jsonl"
term_session_id: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
started_at: "2024-01-01T12:00:00Z"
---
Your task prompt here
Share bugs, ideas, or general feedback.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
連續自引用 AI 循環,用於互動式迭代開發。實現 Ralph Wiggum 技術,讓 Claude 在 while-true 循環中執行相同提示直到任務完成
Implementation of the Ralph Wiggum technique - continuous self-referential AI loops for interactive iterative development. Run Claude in a while-true loop with the same prompt until task completion.
loophaus — Control plane for coding agents
Self-referential development loop plugin - iteratively improves on tasks until completion
Automated development loop and ad-hoc workflow generation for orchestrating AI coding agents
Interactive self-referential AI loops for iterative development. Claude works on the same task repeatedly, seeing its previous work, until completion.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim