AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Agent Ralph Loop Claude

skill-tangledgroup-tangled-skills-agent-ralph-loop-claude · by tangledgroup

Implements the Ralph Wiggum technique as a Claude Code plugin for iterative, self-referential AI development loops. Use when building projects that require hands-free AI implementation through continuous bash-style loops inside a single Claude Code session, where the same prompt is repeatedly fed back until completion criteria are met.

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add skill-tangledgroup-tangled-skills-agent-ralph-loop-claude

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-tangledgroup-tangled-skills-agent-ralph-loop-claude)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
Archived

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Agent Ralph Loop Claude? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Ralph Loop Claude Plugin v1.0.0

Overview

Ralph Loop is a Claude Code plugin that implements the Ralph Wiggum technique — an iterative development methodology based on continuous AI agent loops. As Geoffrey Huntley describes it: "Ralph is a Bash loop" — a while true loop that repeatedly feeds an AI agent the same prompt, allowing it to iteratively improve its work until completion.

The plugin works entirely inside your current Claude Code session — no external bash loops needed. A Stop hook intercepts Claude's exit attempts and feeds the same prompt back, creating a self-referential feedback loop where Claude sees its own previous work in files and git history on each iteration.

When to Use

Good for:

  • Well-defined tasks with clear success criteria
  • Tasks requiring iteration and refinement (e.g., getting tests to pass)
  • Greenfield projects where you can walk away
  • Tasks with automatic verification (tests, linters, build checks)

Not good for:

  • Tasks requiring human judgment or design decisions
  • One-shot operations
  • Tasks with unclear success criteria
  • Production debugging (use targeted debugging instead)

Core Concepts

The Ralph Loop Mechanism

The core loop works like this:

  1. You run /ralph-loop with a task description once
  2. Claude works on the task, modifying files
  3. Claude tries to exit the session
  4. A Stop hook intercepts the exit attempt
  5. The Stop hook feeds the same prompt back to Claude
  6. Claude sees its previous work in files and git history
  7. Claude autonomously improves on its past work
  8. Repeat until completion criteria are met

The "self-referential" aspect comes from Claude seeing its own previous work persisted in files — not from feeding output text back as input. Each iteration starts fresh with the same prompt, but the workspace has evolved.

State Management

Ralph Loop uses a markdown state file at .claude/ralph-loop.local.md with YAML frontmatter:

---
active: true
iteration: 1
session_id: 
max_iterations: 20
completion_promise: "DONE"
started_at: "2025-01-15T10:30:00Z"
---

Your task prompt text here...

The state file tracks iteration count, session isolation, max iterations, and the completion promise. The Stop hook reads this file to decide whether to block exit and continue the loop.

Completion Promises

To signal genuine task completion, Claude outputs a `` tag:

TASK COMPLETE

The Stop hook extracts text from ` tags and compares it against the --completion-promise` value. The match must be exact — no partial or fuzzy matching.

Session Isolation

Each Ralph loop is scoped to a specific Claude Code session via session_id. If multiple Claude Code sessions are open in the same project, only the session that started the loop will be affected by its Stop hook.

Advanced Topics

Plugin Architecture: Internal structure — commands, hooks, scripts, and plugin manifest → [Plugin Architecture](reference/01-plugin-architecture.md)

Stop Hook Deep Dive: The exit-interception mechanism, transcript parsing, and loop continuation logic → [Stop Hook Deep Dive](reference/02-stop-hook-deep-dive.md)

Prompt Engineering: Writing effective Ralph prompts with clear completion criteria and self-correction patterns → [Prompt Engineering](reference/03-prompt-engineering.md)

Setup Script Reference: Argument parsing, state file creation, and validation logic → [Setup Script Reference](reference/04-setup-script-reference.md)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.