Guide OpenClaw agents to execute Ralph Wiggum loops using exec and process tools. Agent orchestrates coding agents (Codex, Claude Code, OpenCode, Goose) with proper TTY support via pty:true. Plans/builds code via PROMPT.md + AGENTS.md, SPECS and IMPLEMENTATION_PLAN.md. Includes PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions. Users request loops, agents execute using tools.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Guide OpenClaw agents to execute Ralph Wiggum loops using exec and process tools. Agent orchestrates coding agents (Codex, Claude Code, OpenCode, Goose) with proper TTY support via pty:true. Plans/builds code via PROMPT.md + AGENTS.md, SPECS and IMPLEMENTATION_PLAN.md. Includes PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions. Users request loops, agents execute using tools.
Ralph Loop
Overview
This skill guides OpenClaw agents to execute Ralph Loop workflows using the exec and process tools. The agent orchestrates AI coding agent sessions following the Ralph playbook flow:
If CLI in interactive list → use exec tool with pty: true
Extract model flag from CLI requirements
2) Requirements → Specs (Optional)
If requirements are unclear:
Break JTBD into focus topics
Draft specs/<topic>.md for each
Keep specs short and testable
3) PROMPT.md + AGENTS.md
PROMPT.md references:
specs/*.md
IMPLEMENTATION_PLAN.md
Relevant project files
AGENTS.md includes:
Test commands (backpressure)
Build/run instructions
Operational learnings
4) Prompt Templates
PLANNING Prompt (no implementation):
You are running a Ralph PLANNING loop for this goal: <goal>.
Read specs/* and the current codebase. Only update IMPLEMENTATION_PLAN.md.
Rules:
- Do not implement
- Do not commit
- Create a prioritized task list
- Write down questions if unclear
Completion:
When plan is ready, add: STATUS: PLANNING_COMPLETE
BUILDING Prompt:
You are running a Ralph BUILDING loop for this goal: <goal>.
Context: specs/*, IMPLEMENTATION_PLAN.md, AGENTS.md
Tasks:
1) Pick the most important task
2) Investigate code
3) Implement
4) Run backpressure commands from AGENTS.md
5) Update IMPLEMENTATION_PLAN.md
6) Update AGENTS.md with learnings
7) Commit with clear message
Completion:
When all done, add: STATUS: COMPLETE
5) CLI Command Reference
The agent constructs command strings using these patterns:
Agent should increase timeout parameter or simplify tasks
Parallel conflicts
Agent should use git worktrees for isolation
Can't see progress
Agent should use process tool with action: "log"
License
MIT
Credits
This skill builds upon work by:
@jordyvandomselaar - Original Ralph Loop concept and workflow design
@steipete - Coding agent patterns and exec/process tool usage with pty support
Key improvement: Uses OpenClaw's exec tool with pty: true to provide TTY for interactive CLIs, solving the hanging issue that occurs with simple background bash execution.