self-improve:ralph-loop

Execute prompts iteratively against a workspace until a completion promise or iteration limit.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jf3096/personal-configs --skill self-improve-ralph-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-improve:ralph-loop
Source: https://github.com/jf3096/personal-configs/tree/main/.codex/skills/self-improve-ralph-loop
Command: npx skills add https://github.com/jf3096/personal-configs --skill self-improve-ralph-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates repetitive execution of a prompt against a workspace, accumulating file changes until a completion condition is met, ideal for iterative development and refinement.

Core Features & Use Cases

  • Iterative Execution: Runs a stable prompt repeatedly, allowing file changes to accumulate between iterations.
  • Controlled Stops: Halts execution based on a defined completion promise, cancellation request, or iteration limit.
  • Use Case: Refine a complex code generation task by running it through multiple iterations, where each iteration builds upon the changes made by the previous one, until the code meets specific performance benchmarks.

Quick Start

Start a Ralph loop by running the script with your workspace, prompt file, and completion promise.

Frequently Asked Questions about self-improve:ralph-loop

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

FAQPage Schema
How do I automate iterative code refinement until a completion condition is met?

Iterative code refinement is automated by running a stable prompt repeatedly against a workspace, allowing file changes to accumulate between iterations until a completion promise or iteration limit is met.

What is a Ralph loop for code generation?

A Ralph loop is an iterative execution mechanism that repeatedly applies a prompt to a workspace, accumulating file changes across multiple runs to progressively refine deterministic code generation tasks.

How do I set up a workspace for repeated prompt execution with evolving file states?

Set up repeated prompt execution by providing a workspace, a prompt file, and a completion promise, which allows the system to run stable prompts while evolving file states accumulate changes.

Can I use iteration limits to control automated code testing loops?

Yes, you can control automated code testing loops using iteration limits, which halt execution alongside defined completion promises or cancellation requests to prevent infinite refinement cycles.

When should I use iterative model runs for code generation instead of single passes?

Use iterative model runs for code generation when deterministic tasks benefit from refinement, requiring repeated execution with stable prompts where each iteration builds upon previous file changes to meet performance benchmarks.

Does iterative workspace execution support structured iteration reports?

Iterative workspace execution supports structured iteration reports and case-driven todo lists, providing organized outputs that track the progress of file changes accumulated across refinement loops.