# Ralph

> Clawd's built-in autonomous iteration system for complex tasks.

- Skill: `thesethrose/ralph` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add thesethrose/ralph`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thesethrose/ralph/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: thesethrose (https://skillmd.com/u/thesethrose)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/thesethrose/ralph

---


# 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

```bash
# Start a new loop
ralph-loop "<TASK>" --max-iterations N --completion-promise "TEXT"

# Check status
ralph-loop -s

# Cancel loop
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`.

