ralph-loop

Initiates autonomous iterative task execution loops for Claude with flexible completion triggers.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/Gen-AI4/Personal-AI-Employee --skill ralph-loop-gen-ai4
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ralph-loop
Source: https://github.com/Gen-AI4/Personal-AI-Employee/tree/main/.claude/skills/ralph-loop
Command: npx skills add https://github.com/Gen-AI4/Personal-AI-Employee --skill ralph-loop-gen-ai4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables Claude to work autonomously on multi-step tasks until completion, preventing premature exits and ensuring tasks are fully resolved.

Core Features & Use Cases

  • Autonomous Iteration: Keeps Claude working on a task until a defined completion state is met.
  • Flexible Completion: Supports both promise-based (output token) and file-movement-based (file to /Done) completion strategies.
  • Use Case: Automatically process all items in a /Needs_Action folder, generating plans and moving processed items to /Done, without manual intervention for each step.

Quick Start

Start a Ralph loop to process all items in vault/Needs_Action, generating plans and moving them to vault/Done, outputting <promise>TASK_COMPLETE</promise> when finished.

Frequently Asked Questions about ralph-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Claude working autonomously on multi-step tasks until completion?▼

An autonomous task loop keeps Claude executing multi-step processes until a defined completion state is met. It prevents premature exits by using a stop hook to monitor progress and re-inject prompts, ensuring complex workflows are fully resolved without interruption.

How do I automate processing files in a folder until it is empty?▼

Automating folder processing involves starting an iterative loop that handles each item, generates plans, and moves processed files to a Done directory. The loop continues until all items are resolved, outputting a specific completion token when finished.

How does file system state trigger task completion in autonomous workflows?▼

File system state changes trigger task completion by monitoring for file movements to a designated directory like Done. This flexible completion strategy stops the autonomous loop when the observed file state matches the defined success condition.

Do I need a stop hook configured to run autonomous agent loops?▼

Yes, a configured stop hook is required to run autonomous loops. The hook monitors task progress during execution and re-injects prompts as needed, ensuring the agent continues iterating until the explicit completion state is reached.

What is the best way to stop an autonomous loop using output tokens?▼

Promise-based completion stops an autonomous loop by detecting a specific output token like TASK_COMPLETE. When the agent outputs this token, the loop recognizes the multi-step process is finished and safely terminates the iteration.

Why does my Claude workflow exit before all tasks are finished?▼

Workflows exit prematurely without an autonomous iteration loop to sustain execution. Implementing a continuous task loop with a stop hook prevents early termination, ensuring Claude processes all items until the final completion state is met.