ralph-loop/skills/ralph-loop/SKILL.md
Start a Ralph Loop for iterative self-referential development. Use when the user asks to run a ralph loop, start an iterative loop, or wants repeated autonomous iteration on a task until completion.
npx skillsauth add cursor/plugins ralph-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.md with 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.].
<promise>TEXT</promise> when the statement is completely and genuinely true.max_iterations as a safety net.completion_promise value in the YAML frontmatter if it contains special characters.Confirm the loop is active (prompt, iteration limit, promise if set), then start working on the task immediately.
development
Apply when you catch yourself writing the same instruction a second time, or notice a recurring correction. Encode the rule as a lint, metadata flag, runtime check, or script instead of more text.
tools
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks. Build the tool that does it or proves it (codemod, script, generator, or a skill your subagents follow) instead of working by hand. The tool is the artifact a reviewer can rerun.
tools
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
data-ai
Cut AI tells from any writing. Must always apply.