Set up a Ralph Wiggum task - runs Phase 1 (requirements interview) and Phase 2 (implementation planning), then stops with instructions to run the building loop. Creates namespaced specs in specs/[task-name]/.
A Claude Code skill for setting up autonomous coding tasks using the Ralph Wiggum methodology.
Ralph Wiggum is an AI-assisted development technique created by Geoffrey Huntley. Named after the Simpsons character who "makes mistakes but never stops," it runs an AI coding agent in a loop until objective completion criteria are met.
The key insight most implementations miss: each iteration spawns fresh context. Memory persists only through the filesystem (git commits, markdown files, the codebase itself). This avoids "context rot" from accumulating conversation history.
This skill executes Phases 1 and 2 of the Ralph methodology:
| Phase | What Happens | Output |
|-------|--------------|--------|
| Phase 1: Requirements | Structured interview to define JTBD, topics, success criteria | specs/[task-name]/PRD.md, topic specs, BACKPRESSURE.md, AGENTS.md |
| Phase 2: Planning | Detailed implementation plan with ordered tasks | specs/[task-name]/IMPLEMENTATION_PLAN.md |
It then stops and hands off to the user with instructions to run Phase 3 (the building loop) via ./ralph.sh.
--dangerously-skip-permissions and should be sandboxed# In your project directory
/ralph-method receipt-upload-ui
The skill will:
main — offer to create a feature branchspecs/receipt-upload-ui/BUILD_PROMPT.md and ralph.sh to project rootThen run Phase 3:
# One task at a time (HITL - watch the output)
./ralph-one.sh # Lists tasks, prompts for selection
./ralph-one.sh receipt-upload-ui # Run specific task directly
# Full loop (AFK - autonomous until done)
./ralph.sh # Lists tasks, prompts for selection
./ralph.sh receipt-upload-ui # Run specific task directly
./ralph.sh receipt-upload-ui 20 # With custom max iterations
After running the skill:
your-project/
├── BUILD_PROMPT.md # Instructions for each loop iteration
├── ralph.sh # Loop runner script (AFK mode)
├── ralph-one.sh # Single-task runner (HITL mode)
└── specs/
└── receipt-upload-ui/ # Namespaced task specs
├── PRD.md # Product requirements with checkboxes
├── IMPLEMENTATION_PLAN.md # Ordered tasks with verification steps
├── BACKPRESSURE.md # Feedback loops (tests, lint, build)
├── AGENTS.md # Task-specific learnings, updated during building (<60 lines)
├── 01-topic-one.md # Topic specification
└── 02-topic-two.md # Topic specification
Focus on outcomes, not features. "User needs to authenticate securely" not "add login form."
Each topic must be describable in one sentence without "and." If you need "and," split into multiple topics.
Automated signals that reject invalid work: tests, type checks, linters, build. The agent can't commit unless all pass.
Each loop iteration starts a new Claude session. The filesystem (specs, git, code) is the only memory. This prevents context degradation on long-running tasks.
Monitor the loop but don't intervene unless you see:
<result>STUCK</result> markers in output (loop auto-stops)<result>COMPLETE</result> signal (loop auto-stops)Unlike CLAUDE.md (project-wide instructions), AGENTS.md is task-specific and lives in specs/[task-name]/. The building loop both reads and updates this file — when the agent discovers build quirks, gotchas, or patterns, it adds brief notes for future iterations.
The skill checks if you're on main or master before starting. If so, it offers to create a feature branch (feature/[task-name]). This keeps building loop commits off your main branch until you're ready to merge.
Run a single task with visible output. Best for:
./ralph-one.sh task-name # Execute next unchecked task, then exit
Output streams directly to terminal. Run again to continue to the next task.
Run the full loop autonomously until completion. Best for:
./ralph.sh task-name 20 # Run up to 20 iterations
The ralph.sh script includes several safety features:
| Signal | Behavior |
|--------|----------|
| <result>COMPLETE</result> in output | Loop stops — all tasks done |
| <result>STUCK</result> in output | Loop stops — human review needed |
| Max iterations reached | Loop stops — default 15 |
| Ctrl+C | Manual stop |
The loop runs with --verbose for debugging visibility.
The building loop requires --dangerously-skip-permissions for autonomous operation. Run in a sandboxed environment:
~/.claude/skills/ralph-method/
├── README.md # This file
├── SKILL.md # Skill instructions (Phases 1 + 2)
└── resources/
├── BUILD_PROMPT.md # Deployed to project for Phase 3
├── ralph.sh # Loop runner for AFK execution
└── ralph-one.sh # Single-task runner for HITL observation
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer