All Skills
OtherClaude Plugins (Official)

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).

Source 45kGitHub stars

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

  1. Add the marketplace

    claude
    /plugin marketplace add anthropics/claude-plugins-official
  2. Install the skill

    claude
    /plugin install ralph-loop@claude-plugins-official
  3. Use 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.

Documentation

Full README

Ralph 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:

bash
# 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 completion

The 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

bash
/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 50

Claude will:

Excerpt — the full document is on GitHub.

More Other skills

Catalog data refreshed . Something wrong? Report it.