Agent skill · Security

ralph-loop

Start a Ralph Wiggum autonomous task loop that keeps Claude working until a task is complete. Uses the Stop hook pattern to re-inject prompts when Claude tries to exit before finishing. Supports two completion strategies: promise-based (Claude outputs a completion token) and file-movement-based (task file moves to /Done). Use when a multi-step task requires Claude to iterate until completion, such as processing all items in /Needs_Action or generating a complete audit.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill ralph-loop-gen-ai4-personal-ai-employee --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/agent/ralph-loop-gen-ai4-personal-ai-employee/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Ralph Wiggum Autonomous Task Loop Keep Claude working on a task autonomously until it reaches a defined completion state. ## How It Works 1. **Start**: Create a loop state file with the task prompt and completion criteria 2. **Iterate**: Claude works on the task 3. **Check**: At exit, the Stop hook checks if the task is complete 4. **Continue**: If not complete, the prompt is re-injected (up to max iterations) 5. **Done**: When complete (or max iterations hit), Claude is allowed to exit ## Two Completion Strategies ### Strategy 1: Promise-Based (Simple) Claude outputs `<promise>TASK_COMPLETE</promise>` in its response to signal completion. ``` Example task prompt: "Process all files in /Needs_Action. When all items are processed and moved to /Done, output: <promise>TASK_COMPLETE</promise>" ``` ### Strategy 2: File-Movement-Based (Gold Tier) The Stop hook watches for a specific task file to move to `/Done`. More reliable because completion is a natural part of the workflow. ``` Example: Start a loop watching for "TASK_20260223_inbox_sweep" in /Done When the file appears in /Done, the loop exits naturally. ``` ## Usage ### Start a Ralph Loop (Promise Strategy) ```python from ralph_

What's inside
Steps it walks through
  1. How It Works
  2. Two Completion Strategies
  3. Strategy 1: Promise-Based (Simple)
  4. Strategy 2: File-Movement-Based (Gold Tier)
  5. Usage
  6. Start a Ralph Loop (Promise Strategy)
  7. Start a Ralph Loop (File Movement Strategy)
  8. Check Active Loops
  9. Stop Hook Configuration
  10. Security Notes
  11. Example: Complete Inbox Processing Loop
Ships with 1 file
  • metadata.json
Commands it runs
In Claude Code settings (settings.json or CLAUDE.md):
Add stop hook:
python src/ralph_loop.py ./vault
More from claude-skill-registry
All skills →
About this skill
What does the ralph-loop skill do?

Start a Ralph Wiggum autonomous task loop that keeps Claude working until a task is complete. Uses the Stop hook pattern to re-inject prompts when Claude tries to exit before finishing. Supports two completion strategies: promise-based (Claude outputs a completion token) and file-movement-based (task file moves to /Done). Use when a multi-step task requires Claude to iterate until completion, such as processing all items in /Needs_Action or generating a complete audit.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill ralph-loop-gen-ai4-personal-ai-employee --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going