ralph loop — Agent Skill
by anthropics · Updated
Interactive self-referential AI loops for iterative development, implementing the Ralph Wiggum technique. Claude works on the same task repeatedly, seeing its previous work, until completion.
At a glance
ralph-loop is an Agent Skill by anthropics in the Other category. In Claude Code it installs with `/plugin install ralph-loop@claude-plugins-official` after adding the anthropics/claude-plugins-official marketplace; other assistants use its SKILL.md instructions as rules. Its source repository has 45,039 GitHub stars (as of Oct 27, 2026).
How to install ralph loop in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install ralph loop in Claude CodeAnthropic's agentic CLI
Add the marketplace
claude/plugin marketplace add anthropics/claude-plugins-officialInstall the skill
claude/plugin install ralph-loop@claude-plugins-officialUse it
These are slash commands for a Claude Code session, not your shell. Claude auto-invokes the skill when your request matches its description — or type its slash command if it exposes one.
How to install ralph loop in Claude DesktopDesktop app (MCP config)
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Add the SKILL.md to your Skills folder
Settings → Capabilities → Skills → add the folder containing SKILL.md. Claude picks it up automatically.
How to install ralph loop in CursorAI-first code editor
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Convert to a Cursor rule
Create .cursor/rules/ralph-loop.mdc and paste the SKILL.md body. Set `alwaysApply` or a glob so the Agent loads it in context.
How to install ralph loop in Codex CLIOpenAI coding agent
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Reference in AGENTS.md
Add the skill's instructions (or a link) to AGENTS.md at your repo root — Codex reads it on every run.
How to install ralph loop in WindsurfCodeium's agentic IDE
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
How to install ralph loop in ClineVS Code autonomous agent
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
How to install ralph loop in VS CodeCopilot / MCP support
Clone the source
bashgit clone https://github.com/anthropics/claude-plugins-official.gitFind the skill
It lives in claude-plugins-official/plugins/ralph-loop — that folder contains the SKILL.md.
Add to your rules / context
Paste the SKILL.md instructions into this tool's custom rules or workspace instructions so the agent follows them.
Documentation
Full READMERalph Loop Plugin
Implementation of the Ralph Wiggum technique for iterative, self-referential AI development loops in Claude Code.
What is Ralph Loop?
Ralph Loop is a development methodology based on continuous AI agent loops. As Geoffrey Huntley describes it: "Ralph is a Bash loop" - a simple while true that repeatedly feeds an AI agent a prompt file, allowing it to iteratively improve its work until completion.
This technique is inspired by the Ralph Wiggum coding technique (named after the character from The Simpsons), embodying the philosophy of persistent iteration despite setbacks.
Core Concept
This plugin implements Ralph using a Stop hook that intercepts Claude's exit attempts:
# You run ONCE:
/ralph-loop "Your task description" --completion-promise "DONE"
# Then Claude Code automatically:
# 1. Works on the task
# 2. Tries to exit
# 3. Stop hook blocks exit
# 4. Stop hook feeds the SAME prompt back
# 5. Repeat until completionThe loop happens inside your current session - you don't need external bash loops. The Stop hook in hooks/stop-hook.sh creates the self-referential feedback loop by blocking normal session exit.
This creates a self-referential feedback loop where:
- The prompt never changes between iterations
- Claude's previous work persists in files
- Each iteration sees modified files and git history
- Claude autonomously improves by reading its own past work in files
Quick Start
/ralph-loop "Build a REST API for todos. Requirements: CRUD operations, input validation, tests. Output <promise>COMPLETE</promise> when done." --completion-promise "COMPLETE" --max-iterations 50Claude will:
Excerpt — the full document is on GitHub.
More Other skills
- Other184k
discernment nudge
Appends two or three short follow-up questions after a substantive answer to help users check key facts, probe the reasoning, and notice missing context
Anthropic Skills1 skillsby anthropics
- Other45k
claude md management
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Claude Plugins (Official)by anthropics
- Other16k
superpowers skills
Community-editable skills repository
awesome-claude-skillsby travisvn
- Other16k
Using Skills in Claude
How to enable and use skills
awesome-claude-skillsby travisvn
- Other16k
Claude Cookbooks - Skills
Example notebooks and tutorials
awesome-claude-skillsby travisvn
- Other16k
How to Create Your First Claude Skill
Step-by-step tutorial with examples
awesome-claude-skillsby travisvn
Catalog data refreshed . Something wrong? Report it.