Automates the setup of the Ralph Wiggum iterative coding methodology using backpressure-driven loops.

Install

mkdir -p .claude/skills/setup-ralph && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2729" && unzip -o skill.zip -d .claude/skills/setup-ralph && rm skill.zip

Installs to .claude/skills/setup-ralph

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Set up and configure Geoffrey Huntley's original Ralph Wiggum autonomous coding loop in any directory with proper structure, prompts, and backpressure.
151 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Initialize Ralph directory structure
  • Configure backpressure via tests and lints
  • Execute autonomous planning and building loops
  • Enable automatic GitHub repository backups

How it works

The agent runs a bash loop that feeds a prompt file to Claude, which then executes tasks, updates a shared plan file, and commits changes.

Inputs & outputs

You give it
PROMPT.md file
You get back
Committed code changes and updated implementation plan

When to use setup-ralph

  • Initialize an autonomous coding loop in a repository
  • Configure backpressure tests for the agent
  • Set up the planning and building phase prompts

About this skill

<essential_principles>

What is Ralph?

Ralph is Geoffrey Huntley's autonomous AI coding methodology that uses iterative loops with task selection, execution, and validation. In its purest form, it's a Bash loop:

while :; do cat PROMPT.md | claude ; done

The loop feeds a prompt file to Claude, the agent completes one task, updates the implementation plan, commits changes, then exits. The loop restarts immediately with fresh context.

Core Philosophy

The Ralph Wiggum Technique is deterministically bad in an undeterministic world. Ralph solves context accumulation by starting each iteration with fresh context—the core insight behind Geoffrey's approach.

Three Phases, Two Prompts, One Loop

  1. Planning Phase: Gap analysis (specs vs code) outputs prioritized TODO list—no implementation, no commits
  2. Building Phase: Picks tasks from plan, implements, runs tests (backpressure), commits
  3. Observation Phase: You sit on the loop, not in it—engineer the setup and environment that allows Ralph to succeed

Key Principles

Your Role: Ralph does all the work, including deciding which planned work to implement next and how to implement it. Your job is to engineer the environment.

Backpressure: Create backpressure via tests, typechecks, lints, builds that reject invalid/unacceptable work.

Observation: Watch, especially early on. Prompts evolve through observed failure patterns.

Context Efficiency: With ~176K usable tokens from 200K window, allocating 40-60% to "smart zone" means tight tasks with one task per loop achieves maximum context utilization.

File I/O as State: The plan file persists between isolated loop executions, serving as deterministic shared state—no sophisticated orchestration needed.

Remote Backup: The loop automatically creates a private GitHub repo and pushes after each commit. This protects against accidental data loss from autonomous operations. Requires gh CLI authenticated. Disable with RALPH_BACKUP=false.

Safety Rules: PROMPT_build.md includes critical safety rules prohibiting dangerous operations like rm -rf on project directories. Tests must run in isolated temp directories. </essential_principles>

<intake> What would you like to do?
  1. Set up a new Ralph loop - Initialize Ralph structure in a directory
  2. Understand Ralph concepts - Learn about the technique and how it works
  3. Customize existing loop - Modify prompts or configuration
  4. Troubleshoot Ralph - Debug loop issues or improve performance

Wait for response before proceeding. </intake>

<routing> | Response | Workflow | |----------|----------| | 1, "set up", "setup", "new", "initialize", "create" | `workflows/setup-new-loop.md` | | 2, "understand", "learn", "concepts", "explain", "how" | `workflows/understand-ralph.md` | | 3, "customize", "modify", "change", "update", "edit" | `workflows/customize-loop.md` | | 4, "troubleshoot", "debug", "fix", "problem", "issue" | `workflows/troubleshoot-loop.md` | | Other | Clarify intent, then select appropriate workflow |

After reading the workflow, follow it exactly. </routing>

<reference_index>

Domain Knowledge

All in references/:

Core Concepts: ralph-fundamentals.md - Three phases, two prompts, one loop Structure: project-structure.md - Required files and directory layout Prompts: prompt-design.md - Planning vs building mode instructions Backpressure: validation-strategy.md - Tests, lints, builds as steering Best Practices: operational-learnings.md - AGENTS.md guidance and evolution </reference_index>

<workflows_index>

WorkflowPurpose
setup-new-loop.mdInitialize Ralph structure in a directory
understand-ralph.mdLearn Ralph concepts and philosophy
customize-loop.mdModify prompts or loop configuration
troubleshoot-loop.mdDebug loop issues and improve performance
</workflows_index>

<success_criteria> Skill is successful when:

  • User understands which workflow they need
  • Appropriate workflow loaded based on intent
  • All required references loaded by workflow
  • User can set up and run Ralph loops independently </success_criteria>

When not to use it

  • Projects requiring human-in-the-loop real-time intervention
  • Environments lacking bash or git access

Prerequisites

gh CLI authenticatedBash environment

Limitations

  • Requires manual engineering of the environment
  • Limited by token window context efficiency

How it compares

Unlike manual coding, this technique uses a deterministic loop with fresh context per iteration to avoid context accumulation issues.

Compared to similar skills

setup-ralph side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
setup-ralph (this skill)116moReviewIntermediate
command-development169moReviewIntermediate
skill-forge119moReviewIntermediate
codex-skill125moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by glittercowboy

View all by glittercowboy

build-macos-apps

glittercowboy

Build professional native macOS apps in Swift with SwiftUI and AppKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode.

70217

build-iphone-apps

glittercowboy

Build professional native iPhone apps in Swift with SwiftUI and UIKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Targets iOS 26 with iOS 18 compatibility.

1483

create-subagents

glittercowboy

Expert guidance for creating, building, and using Claude Code subagents and the Task tool. Use when working with subagents, setting up agent configurations, understanding how agents work, or using the Task tool to launch specialized agents.

611

create-meta-prompts

glittercowboy

Create optimized prompts for Claude-to-Claude pipelines with research, planning, and execution stages. Use when building prompts that produce outputs for other prompts to consume, or when running multi-stage workflows (research -> plan -> implement).

428

debug-like-expert

glittercowboy

Deep analysis debugging mode for complex issues. Activates methodical investigation protocol with evidence gathering, hypothesis testing, and rigorous verification. Use when standard troubleshooting fails or when issues require systematic root cause analysis.

26

create-hooks

glittercowboy

Expert guidance for creating, configuring, and using Claude Code hooks. Use when working with hooks, setting up event listeners, validating commands, automating workflows, adding notifications, or understanding hook types (PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, etc).

13

You might also like

command-development

anthropics

This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.

16133

skill-forge

WilliamSaysX

Automated skill creation workshop with intelligent source detection, smart path management, and end-to-end workflow automation. This skill should be used when users want to create a new skill or convert external resources (GitHub repositories, online documentation, or local directories) into a skill. Automatically fetches, organizes, and packages skills with proactive cleanup management.

11115

codex-skill

feiskyer

Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.

12110

agent-factory

alirezarezvani

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

8109

subagent-driven-development

davila7

Use when executing implementation plans with independent tasks in the current session

1493

peekaboo

openclaw

Capture and automate macOS UI with the Peekaboo CLI.

1486

Search skills

Search the agent skills registry