| name | ralph |
| description | Clawd's built-in autonomous iteration system for complex tasks.
|
| metadata | {"clawdbot":{"emoji":"🔄","requires":{"env":[]}}} |
Ralph Skill
Autonomous iteration for complex tasks.
Overview
Ralph is Clawd's built-in autonomous loop system. It enables iterative work on complex tasks, continuing until completion criteria are met.
How It Works
Ralph operates using a state file that tracks:
- Current task description
- Iteration count
- Completion promise
The loop continues until:
- Max iterations reached, OR
- You output
<promise>PROMISE_TEXT</promise>
Commands
ralph-loop "<TASK>" --max-iterations N --completion-promise "TEXT"
ralph-loop -s
ralph-loop -c
Parameters
| Parameter | Required | Default | Description |
|---|
| TASK | Yes | - | Task description |
| --max-iterations | Recommended | 50 | Safety limit |
| --completion-promise | Yes | - | Text to output when done |
Completing the Loop
When done, output the promise:
<promise>TASK_COMPLETE</promise>
Rules:
- Only output promise when TRUE
- Do NOT lie to exit
- If stuck, iterate and try differently
State File Location
$RALPH_STATE_FILE (default: $CLAWD_WORKSPACE/ralph/loop.local.md)
When to Use Ralph
- User asks to "start a loop" or "run ralph"
- Task needs multiple iterations
- Complex refactoring across many files
- User wants autonomous iteration until done
Cost Warning
Autonomous loops consume tokens rapidly. A 50-iteration loop can cost $50-100+. Always use --max-iterations.