skills/ralph-loop/SKILL.md
--- Skill name: ralph-loop Skill description: Iterative work-review loop using two AI models with fresh context per iteration. Use for complex tasks requiring multiple revisions with cross-model validation. Based on Geoffrey Huntley's technique found in Goose. roles: [] --- # Ralph Loop - Multi-Model Iterative Development Ralph Loop is an iterative development pattern that keeps AI agents working on tasks until completion using a work-review cycle with fresh context each iteration. It employs
npx skillsauth add abhiroopb/synthetic-mind skills/ralph-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ralph Loop is an iterative development pattern that keeps AI agents working on tasks until completion using a work-review cycle with fresh context each iteration. It employs two different AI models - one as the worker and another as the reviewer - to provide cross-model validation.
The skill includes three components:
ralph-loop.sh - Bash orchestration scriptralph-work.yaml - Worker phase instructions (Goose recipe format)ralph-review.yaml - Reviewer phase instructions (Goose recipe format)State Management (.goose/ralph/ directory):
task.md - Task descriptioniteration.txt - Current iteration numberwork-summary.txt - Worker's progress summarywork-complete.txt - Task completion signalreview-result.txt - "SHIP" or "REVISE" verdictreview-feedback.txt - Feedback for next iteration.ralph-complete - Success markerRALPH-BLOCKED.md - Blocked state indicatorIf you have Goose installed, you can use the original implementation:
# Create recipes directory
mkdir -p ~/.config/goose/recipes
# Copy the files from this skill directory
cp ralph-loop.sh ~/.config/goose/recipes/
cp ralph-work.yaml ~/.config/goose/recipes/
cp ralph-review.yaml ~/.config/goose/recipes/
chmod +x ~/.config/goose/recipes/ralph-loop.sh
# Basic usage
./ralph-loop.sh "your task description"
# Or with a task file
./ralph-loop.sh /path/to/task.md
Set environment variables to skip interactive prompts:
export RALPH_WORKER_MODEL="claude-sonnet-4.5"
export RALPH_WORKER_PROVIDER="anthropic"
export RALPH_REVIEWER_MODEL="gpt-4"
export RALPH_REVIEWER_PROVIDER="openai"
export RALPH_MAX_ITERATIONS="10"
./ralph-loop.sh "implement user authentication"
While this skill packages the Goose implementation, the pattern can be adapted for Claude Code workflows:
Create state files to maintain context between iterations:
# Initialize
mkdir -p .ralph
echo "Your task description" > .ralph/task.md
# After each work session
echo "Summary of changes made" > .ralph/work-summary.txt
# After review
echo "REVISE" > .ralph/review-result.txt
echo "Specific feedback for next iteration" > .ralph/review-feedback.txt
Ralph Loop runs multiple iterations with two models:
MAX_ITERATIONS × 2 × avg_cost_per_sessionThe script includes cost warnings and requires confirmation before execution.
ralph-loop.sh - Main orchestration script (215 lines)ralph-work.yaml - Worker phase reciperalph-review.yaml - Reviewer phase recipeBased on Geoffrey Huntley's Ralph Loop technique for the Goose AI agent framework.
Original implementation: https://block.github.io/goose/docs/tutorials/ralph-loop/
testing
Track TV shows and movies with Trakt.tv. Search, get watchlist, history, up-next, recommendations, trending, calendar, ratings, stats, add/remove from watchlist, mark watched, rate, and check in. Use when asked about what to watch, TV shows, movies, watch history, or Trakt.
development
Send and receive SMS messages via Twilio API. Used for text message notifications, forwarding important alerts, and two-way SMS communication.
documentation
Organizes files in the local Downloads folder into proper folders. Use when asked to organize, sort, or file downloaded documents.
tools
Book and manage appointments on Sutter Health MyHealth Online portal. Uses browser automation via Playwright MCP to interact with the patient portal.