ralph-help

ralph-help is a command for Claude Code from bjzgcai/carter-marketplace. It costs 9 tokens per session (1,553 once invoked), scanned A, original, MIT.

A command-line add-on that explains the Ralph Wiggum technique, a method for repeatedly sending the same task to an AI coding agent while its files and Git history preserve progress.

In plain words
What is it for?
Use it to learn the Ralph method and start a loop with a task prompt, an iteration limit, and a completion phrase.
Why use it?
It helps developers understand and start an iterative agent loop instead of relying on one response for a large coding task.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the useful-plugin plugin — 4 commands, 2 agents, 1 hook, 3 MCP servers shipped together

Good fit Use it to learn the Ralph method and start a loop with a task prompt, an iteration limit, and a completion phrase.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bjzgcai/carter-marketplace/ralph-help
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bjzgcai/carter-marketplace

Made for: Claude Code.

Or install useful-plugin, the plugin that ships this one along with the rest of its 4 commands, 2 agents, 1 hook, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ralph-help

README.md
[![agentmods](https://agentmods.dev/badge/commands/bjzgcai/carter-marketplace/ralph-help/github.svg)](https://agentmods.dev/commands/bjzgcai/carter-marketplace/ralph-help)
Your own site
<a href="https://agentmods.dev/commands/bjzgcai/carter-marketplace/ralph-help"><img src="https://agentmods.dev/badge/commands/bjzgcai/carter-marketplace/ralph-help/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ralph-help

Your own site · 80×15
<a href="https://agentmods.dev/commands/bjzgcai/carter-marketplace/ralph-help"><img src="https://agentmods.dev/badge/commands/bjzgcai/carter-marketplace/ralph-help.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.01553
Opus 5 $0.00005 $0.00776
Sonnet 5 $0.00002 $0.00311
Haiku 4.5 $0.00001 $0.00155

Measured 11d ago against content hash e96951bd0f6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ralph-help scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

useful-plugin/commands/ralph-help.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ralph Wiggum Plugin - Cross-Platform Edition

What is Ralph?

Ralph is a Bash loop. More specifically, it's a continuous self-referential AI agent loop that enables iterative, autonomous development within Claude Code.

The technique is simple: instead of running Claude once and getting one response, Ralph runs Claude in a while true loop, feeding it the same prompt repeatedly until completion. Between iterations, your work persists in files and git history, allowing you to build incrementally on previous attempts.

How It Works

Ralph uses a Stop hook that intercepts your exit attempts. When you try to leave the session:

  1. The hook blocks your exit
  2. It feeds the same original prompt back to you
  3. You see your previous work in files and git commit history
  4. You continue iterating until the task is complete

This creates a self-referential feedback loop where each iteration improves upon the last.

Available Commands

/ralph-loop - Start a Ralph Loop

Start a Ralph loop in your current session:

/ralph-loop "YOUR TASK PROMPT" --max-iterations <N> --completion-promise "<TEXT>"

Parameters:

  • PROMPT (required): Your task description
  • --max-iterations <N> (optional): Stop after N iterations (recommended: 20-50)
  • --completion-promise "<TEXT>" (optional): A phrase you'll output when truly done

Examples:

Basic usage with iteration limit:

/ralph-loop "Build a TODO REST API with CRUD operations and tests" --max-iterations 30

With completion promise for early exit:

/ralph-loop "Build a TODO API. Requirements: CRUD endpoints, validation, tests. Output <promise>COMPLETE</promise> when all tests pass." --completion-promise "COMPLETE" --max-iterations 50

/cancel-ralph - Cancel Active Loop

Stop the currently running Ralph loop:

/cancel-ralph

This removes the loop state file and allows normal session exit.

Cross-Platform Support

This plugin works on:

  • Linux - Uses bash scripts
  • macOS - Uses bash scripts
  • WSL (Windows Subsystem for Linux) - Uses bash scripts
  • Windows PowerShell - Uses PowerShell scripts
  • PowerShell Core - Uses PowerShell scripts

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 219 lines · 9 tokens per session scan A e96951bd0f6e

Subscribe to this mod's changes

ralph-help is a command published in the GitHub repository bjzgcai/carter-marketplace (8 stars, last pushed 7mo ago), licensed MIT. It adds 9 tokens to every session and 1,553 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.