Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
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.
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.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
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: Define Requirements β JTBD β Focus Topics β specs/*.md PLANNING Loop β Create/update IMPLEMENTATION_PLAN.md (do not implement) BUILDING Loop β Implement tasks, run tests (backpressure), update plan, commit The loop persists context via PROMPT.md + AGENTS.md (loaded each iteration) and the plan/specs on disk.
This skill generates instructions for OpenClaw agents to execute Ralph Loops using the exec and process tools. The agent calls exec tool with the coding agent command Uses pty: true to provide TTY for interactive CLIs Uses background: true for monitoring capabilities Uses process tool to monitor progress and detect completion Important: Users don't run these scripts directly - the OpenClaw agent executes them using its tool capabilities.
Some coding agents require a real terminal (TTY) to work properly, or they will hang: Interactive CLIs (need TTY): OpenCode, Codex, Claude Code, Pi, Goose Non-interactive CLIs (file-based): aider, custom scripts Solution: Use exec + process mode for interactive CLIs, simple loops for file-based tools.
Required: Goal / JTBD CLI (opencode, codex, claude, goose, pi, other) Mode (PLANNING, BUILDING, or BOTH) Max iterations (default: PLANNING=5, BUILDING=10) Optional: Completion sentinel (default: STATUS: COMPLETE in IMPLEMENTATION_PLAN.md) Working directory (default: $PWD) Timeout per iteration (default: 3600s) Sandbox choice Auto-approval flags (--full-auto, --yolo, --dangerously-skip-permissions) Auto-detect: If CLI in interactive list β use exec tool with pty: true Extract model flag from CLI requirements
If requirements are unclear: Break JTBD into focus topics Draft specs/<topic>.md for each Keep specs short and testable
PROMPT.md references: specs/*.md IMPLEMENTATION_PLAN.md Relevant project files AGENTS.md includes: Test commands (backpressure) Build/run instructions Operational learnings
The agent constructs command strings using these patterns: CLICommand String PatternOpenCodeopencode run --model <MODEL> "$(cat PROMPT.md)"Codexcodex exec <FLAGS> "$(cat PROMPT.md)" (requires git)Claude Codeclaude <FLAGS> "$(cat PROMPT.md)"Pipi --provider <PROVIDER> --model <MODEL> -p "$(cat PROMPT.md)"Goosegoose run "$(cat PROMPT.md)" Common flags: Codex: --full-auto, --yolo, --model <model> Claude: --dangerously-skip-permissions
Agent tool calls: exec tool: { command: "codex exec --full-auto --model anthropic/claude-opus-4 \"$(cat PROMPT.md)\"", workdir: "/path/to/project", background: true, pty: true, timeout: 3600 } # Then monitor with process tool as above
Use flexible regex to match variations: grep -Eq "STATUS:?\s*(PLANNING_)?COMPLETE" IMPLEMENTATION_PLAN.md Matches: STATUS: COMPLETE STATUS:COMPLETE STATUS: PLANNING_COMPLETE ## Status: PLANNING_COMPLETE
Codex: --full-auto (sandboxed, auto-approve) or --yolo (no sandbox!) Claude: --dangerously-skip-permissions Recommendation: Use sandboxes (docker/e2b/fly) and limited credentials
Stop: Ctrl+C Kill session: process tool with action: "kill" Rollback: git reset --hard HEAD~N
Start small: Test with 1-2 iterations first Workdir isolation: Prevent reading unrelated files Set timeouts: Default 1h may not fit all tasks Monitor actively: Check logs, don't terminate prematurely Requirements first: Clear specs before building Backpressure early: Add tests from the start
ProblemSolutionOpenCode hangsEnsure agent uses exec tool with pty: trueSession won't startCheck CLI path, git repo, command syntaxCompletion not detectedVerify sentinel format in IMPLEMENTATION_PLAN.mdProcess timeoutAgent should increase timeout parameter or simplify tasksParallel conflictsAgent should use git worktrees for isolationCan't see progressAgent should use process tool with action: "log"
MIT
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.
Agent frameworks, memory systems, reasoning layers, and model-native orchestration.
Largest current source with strong distribution and engagement signals.