ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 2/5

ralph-loop

Generate copy-paste bash scripts for Ralph Wiggum/AI agent loops (Codex, Claude Code, OpenCode, Goose). Use when asked for a “Ralph loop”, “Ralph Wiggum loop”, or an AI loop to plan/build code via PROMPT.md + AGENTS.md, SPECS, and IMPLEMENTATION_PLAN.md, including PLANNING vs BUILDING modes, backpressure, sandboxing, and completion conditions.

Why use this skill?

Automate your AI coding workflow with Ralph Loop. Generate ready-to-run bash scripts for iterative planning and building with Claude Code, Codex, and Goose.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/jordyvandomselaar/ralph-loop
Or

What This Skill Does

The Ralph Loop skill is an advanced automation orchestrator for AI coding agents. It provides a standardized framework for developers to execute complex coding tasks through an iterative, loop-based approach. By structuring work into Planning and Building phases, the skill ensures that AI agents remain aligned with project goals, technical specifications, and defined constraints. It leverages a combination of PROMPT.md, AGENTS.md, and IMPLEMENTATION_PLAN.md to persist context across multiple CLI interactions, allowing tools like Claude Code, Codex, or Goose to perform reliable multi-step software development without losing context.

Installation

You can add this skill to your OpenClaw environment by running the following command in your terminal: clawhub install openclaw/skills/skills/jordyvandomselaar/ralph-loop

Use Cases

The Ralph Loop is designed for non-trivial coding tasks where the agent needs to maintain a high degree of state. Use this skill when:

  • Refactoring large codebases where step-by-step verification is required.
  • Implementing complex features from scratch, requiring a clear progression from specs to implementation.
  • Maintaining long-running AI agent sessions that need to adhere to strict 'backpressure' (tests/linting) constraints.
  • Managing projects with multiple requirements that need individual specification files for clarity.

Example Prompts

  1. "Ralph loop: I need to build a secure authentication module using NextAuth. Create the specs, set up a planning loop, and then proceed with building."
  2. "Start a Ralph loop with claude-code for my Python backend refactor. Use 'pytest' as my backpressure command. Here is the goal: decouple the database layer from the API controllers."
  3. "Run a building loop using Goose. Focus on the 'authentication' topic in specs/. Stop once the IMPLEMENTATION_PLAN.md reaches the STATUS: COMPLETE marker."

Tips & Limitations

  • Backpressure is crucial: Always define meaningful test commands in your AGENTS.md to prevent the agent from introducing regressions.
  • Keep specs modular: One topic per spec file ensures that the agent doesn't get overwhelmed by context window limitations.
  • Monitor auto-approval: Use caution when setting --full-auto or --dangerously-skip-permissions. Only enable these if you have a robust test suite that can catch errors immediately.
  • Context is king: The loop relies on the files on your disk. Ensure PROMPT.md is updated if you significantly shift the scope of the project.

Metadata

Stars1947
Views13
Updated2026-03-04
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-jordyvandomselaar-ralph-loop": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#coding#automation#agent-loops#cli#devops
Safety Score: 2/5

Flags: file-write, file-read, code-execution