Ralph Loop
Starts an iterative Ralph Loop that feeds the same task prompt back each turn until completion.
- CCM score
- 58 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 20.2K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers setting up a self-referential development loop where the agent sees its own prior work on every iteration
- Gathers the task prompt, an optional
max_iterationscap (default unlimited), and an optionalcompletion_promisestring - Writes the loop state to
.cursor/ralph/scratchpad.mdwith YAML frontmatter tracking the current iteration count - Enforces that a
<promise>tag is emitted only when the stated completion is genuinely true, and recommends a max iteration limit
Install
$ npx -y skills add cursor/plugins --skill ralph-loop -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Ralph Loop
Trigger
The user wants to start a Ralph loop. An iterative development loop where the same prompt is fed back after every turn, and the agent sees its own previous work each iteration.
Workflow
-
Gather the user's task prompt and optional parameters:
max_iterations(number, default 0 for unlimited)completion_promise(text, or "null" if not set)
-
Create the directory
.cursor/ralph/if it doesn't exist, then write the state file at.cursor/ralph/scratchpad.mdwith this exact format:--- iteration: 1 max_iterations: <N or 0> completion_promise: "<TEXT>" or null --- <the user's task prompt goes here>Example:
--- iteration: 1 max_iterations: 20 completion_promise: "COMPLETE" --- Build a REST API for todos with CRUD operations, input validation, and tests. -
Confirm to the user that the Ralph loop is active, then begin working on the task.
-
The stop hook automatically intercepts each turn end and feeds the same prompt back as a followup message. You will see it prefixed with
[Ralph loop iteration N.].
Guardrails
Details
- Repository
- github.com/cursor/plugins
- Category
- Agent Workflow & Planning
- First seen
- Jun 23, 2026
Questions
What does the ralph-loop skill do?
The ralph-loop skill starts an iterative development loop where the same task prompt is fed back after every turn, so the agent sees its own previous work on each iteration. It writes a state file at .cursor/ralph/scratchpad.md that tracks the iteration count, an optional iteration limit, and an optional completion promise.
How do I install the ralph-loop skill?
Run npx -y skills add cursor/plugins --skill ralph-loop -y in your project. Once installed, asking the agent to run a ralph loop or start an iterative loop activates it.
Which other skills are in the same category as ralph-loop?
Ralph-loop sits in the Agent Workflow & Planning category, alongside grill-me, grill-with-docs, setup-matt-pocock-skills, grilling and prototype. It is specific to repeated autonomous iteration on one task until a completion condition is met.
Should I set a maximum number of iterations for ralph-loop?
Yes, the skill recommends setting max_iterations as a safety net. The default is 0, which means unlimited iterations, so a cap keeps the loop from running indefinitely.
More from cursor/plugins
All 93- Create Learning Path1K
- Run Learning Retrospective935
- Reproduce And Fix Issues882
- Triage Issue Reports859
- Setup Benny845
- Reframe127
- Check Agent Compatibility4
- Unslop39.7K
- Thermo Nuclear Code Quality Review25.4K
- Typescript Best Practices12.3K
- Deslop11.1K
- Blast Radius8.5K
- How7.5K
- Why7.2K
- Technical Writing7K
- Principle Fix Root Causes6.6K
- Principle Prove It Works6.5K
- Principle Encode Lessons In Structure6.5K
- Arena6.5K
- Architect6.4K
- Principle Guard The Context Window6.4K
- Principle Type System Discipline6.2K
- Create Verification Skill6.1K
- Principle Boundary Discipline6K
Similar to Ralph Loop
More Agent Workflow & Planningagent-loopPluginjmagly/aiwg232 starsIterative AI coding loops with automatic recovery - iteration beats perfection
ralph-wiggumSkillfstandhartinger/ralph-wiggum1.4K installsAutonomous bash loop that feeds specs to fresh agent contexts, finishing only when acceptance criteria pass.
ralph-planSkillmastra-ai/mastra2.6K installsInteractive planning assistant that builds focused ralph-loop commands through guided conversation.
ralphSkillyeachan-heo/oh-my-claudecode1.1K installsRalph: a PRD-driven persistence loop that retries until every user story passes reviewer verification.
prompt-optimizerSkillgetsentry/skills2.6K installsStructured workflow that creates, refines, and ports agent prompts against evals, keeping instructions causal.