ralph-loop

Run autonomous task loops for Claude Code with iteration limits and state tracking.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/101mare/skill-library --skill ralph-loop-101mare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ralph-loop
Source: https://github.com/101mare/skill-library/tree/main/skills/workflow/ralph-loop
Command: npx skills add https://github.com/101mare/skill-library --skill ralph-loop-101mare

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables Claude Code to work autonomously on a task, iterating until completion or a set limit is reached, reducing the need for constant user intervention and prompt refinement.

Core Features & Use Cases

  • Autonomous Task Execution: Claude works on a defined task without requiring step-by-step user guidance.
  • Iteration Limiting: Prevents infinite loops and controls resource usage with a maximum iteration count.
  • State Management: Tracks progress and maintains context across multiple iterations.
  • Use Case: Use Ralph Loop to refactor a large codebase, fix all linting errors, or implement a new feature with tests, allowing Claude to manage the process until completion.

Quick Start

Use the ralph-loop skill to fix all linting errors in the project.

Frequently Asked Questions about ralph-loop

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

FAQPage Schema
How do I make Claude Code work autonomously on a coding task without prompt refinement?

Autonomous work loops enable Claude Code to iteratively process a user-defined task until completion or a maximum iteration count is reached. This reduces constant user intervention by managing task state and progress tracking through a dedicated file with a stop hook.

Can I set a maximum iteration limit for autonomous Claude Code tasks?

Yes, autonomous work loops prevent infinite loops and control resource usage by enforcing a maximum iteration count. A stop hook monitors completion signals or iteration limits to safely halt the process when the threshold is reached.

How does state management work for multi-step code generation tasks in Claude Code?

State management for code generation tracks progress and maintains context across multiple iterations using a dedicated file. This allows Claude Code to resume autonomous work loops seamlessly without losing the context of previous steps.

Do I need jq installed to run autonomous work loops for Claude Code?

Yes, jq is required as a dependency to run autonomous work loops for Claude Code. Ensure this command-line JSON processor is installed in your environment before initiating task automation to support state management operations.

What's the best way to fix all linting errors in a project using Claude Code?

Autonomous work loops are ideal for fixing all linting errors by allowing Claude Code to iteratively identify and resolve issues until completion. Define the linting task and let the loop manage the process without step-by-step guidance.

Why does my autonomous Claude Code loop stop before finishing the task?

Autonomous work loops stop before finishing when the maximum iteration count is reached or a completion signal is detected by the stop hook. This iteration limiting mechanism prevents infinite loops and controls resource usage during task execution.