Back to Skills

ralph-loop

verified

Start a Ralph Loop - an autonomous iteration pattern for completing complex tasks. Triggers on: '/ralph-loop <prompt>', 'ralph loop', 'start ralph'. Creates state in .claude/ralph/, injects ultrawork mode, and iterates until completion or max iterations reached.

View on GitHub

Marketplace

oh-my-claude

TechDufus/oh-my-claude

Plugin

oh-my-claude

productivity

Repository

TechDufus/oh-my-claude
48stars

plugins/oh-my-claude/skills/ralph-loop/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TechDufus/oh-my-claude/blob/main/plugins/oh-my-claude/skills/ralph-loop/SKILL.md -a claude-code --skill ralph-loop

Installation paths:

Claude
.claude/skills/ralph-loop/
Powered by add-skill CLI

Instructions

# Ralph Loop Skill

Autonomous iteration pattern for completing complex tasks without intervention.

## What is a Ralph Loop?

A Ralph Loop is a self-driving execution pattern where Claude:
1. Receives a task prompt
2. Creates persistent state files
3. Works autonomously through iterations
4. Tracks progress in state files
5. Continues until completion or max iterations

Named after the concept of "wreck-it-ralph" - just keep smashing through the work.

## When This Skill Activates

| Category | Trigger Phrases |
|----------|-----------------|
| **Start loop** | `/ralph-loop <prompt>`, `ralph loop`, `start ralph` |
| **Check status** | `ralph status`, `loop status` |
| **Resume loop** | `resume ralph`, `continue ralph` |
| **Stop loop** | `stop ralph`, `end ralph`, `ralph stop` |

## CLI Syntax

```
/ralph-loop <prompt> [--max-iterations=N] [--completion-promise=WORD]
```

| Parameter | Default | Description |
|-----------|---------|-------------|
| `prompt` | (required) | The task to complete autonomously |
| `--max-iterations` | 20 | Maximum iterations before stopping |
| `--completion-promise` | DONE | Word to output when complete |

## Examples

```
/ralph-loop refactor all API endpoints to use the new validation pattern
/ralph-loop implement user authentication --max-iterations=30
/ralph-loop fix all linting errors --completion-promise=FINISHED
```

---

## Robustness Features

### Session Isolation

Each Ralph Loop is bound to the session that started it:

- State includes a `sessionId` field matching the originating session
- Loop only triggers for the session that started it
- Prevents cross-session interference when multiple sessions exist
- Other sessions can read state but won't trigger iterations

### Abort Handling

User interrupts (Ctrl+C) are handled gracefully:

- State is cleaned up when the user aborts
- No orphan state files left behind
- Loop can be cleanly restarted after abort
- Prevents stuck loops requiring manual cleanup

### Cooldown Mechan

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9624 chars