ralph-looplisted
Install: claude install-skill carinyaparc/skills
# Ralph loop
Run an autonomous loop. The plugin's stop hook re-feeds the loop prompt after
every turn, the agent executes exactly one step per iteration, and the loop
ends only when the completion promise is genuinely true or a safety rail
fires.
Seeding is a separate skill: **[ralph-loop-setup](../ralph-loop-setup/SKILL.md)**.
This skill assumes a seeded loop, except for a quick inline ad-hoc start.
## How the loop works
1. `/ralph-loop-setup` resolves configuration and runs
`scripts/seed-ralph-loop.sh`, which writes `{base}/active.md` plus a run
directory. `{base}` is `.claude/loop` or `.cursor/loop`, resolved from the
agent, with no pointer file.
2. `/ralph-loop start` verifies the seeded files and executes iteration 1.
3. The plugin hooks take over. After every turn the stop hook re-feeds the body
of `active.md`; the agent reads its own state and runs the next step.
4. The loop ends when the agent emits `<promise>TEXT</promise>` matching the
configured promise, `max_iterations` is reached, the 200-iteration hard
ceiling is hit, or the stall guard sees no state change for 3 consecutive
iterations.
## Safety rails
| Rail | Default | Enforced by |
| ---- | ------- | ----------- |
| max_iterations | 50 | stop hook, from frontmatter |
| hard ceiling | 200 | stop hook, applies even when unlimited |
| stall guard | 3 unchanged iterations | stop hook, watches the state file |
| session isolation | owning session only | stop hook, from `session_id` |
| f