ralph-loop
Skill1 starsChanged 37 days agoMITView on GitHub
Run a bounded self-correcting loop that re-feeds the same prompt every time Claude stops, until a completion promise is genuinely true or an iteration cap is reached. Use when a task has a machine-checkable finish line such as a passing test suite or a clean linter, and iterating unattended beats steering each step by hand.
26 other projects use a version of this.
Adopted by
Most recently taken up by
- shawnclybor/clybor-claude-toolingtheir own version, first seen Nov 8, 2026
- ZhouYinLong-lab/Dog-Skillstheir own version, first seen Nov 8, 2026
- belumume/claude-skillstheir own version, first seen Nov 3, 2026
- burakkaygusuz/ralph-wiggumtheir own version, first seen Nov 1, 2026
- harness-mini/harness-minitheir own version, first seen Nov 1, 2026
- cornch-k/batontheir own version, first seen Nov 1, 2026
Used with
Projects with it also use to-issues and review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.Other versions26 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 26
- mikeyobrien/ralph-orchestrator★ 3.2ksame name
- zrosenfield/sharepoint-ai-skills★ 96same name
- dannys-code-corner/incan★ 73same name
- yylo-dev/yylo★ 66same name
- regression-io/coder-config★ 47same name
- belumume/claude-skills★ 46same name
- xfstudio/skills★ 9same name
- mnzralee/claude-multi-agent-architecture★ 8same name
- shyamsridhar123/kevin-copilot★ 7same name
- ZhouYinLong-lab/Dog-Skills★ 7same name
16 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debug-systematicallySkill
- safe-operationsSkill
- secrets-hygieneSkill
- token-harnessSkill
- verify-before-claimingSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 22 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
When invoked as /ralph-loop <task>, start the loop with the task and continue working on it in the same turn:
- Very specific: line 28
Use single quotes, so the shell leaves $ and backticks in the prompt alone.
- Very specific: line 30
Check it with rcskills loop status and stop it with rcskills loop cancel.
- Very specific: line 54
Every iteration re-reads the whole context, so a loop multiplies whatever the session already costs.
- Distinctive: line 60
Only the session that started a loop is ever blocked by it.
“Common” is measured: kept by at least 6 in 10 of the 22 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ralph Loop
The Ralph technique (Geoffrey Huntley) is a loop around one prompt. You work, try to stop, and get the same prompt back. Your earlier work is still there in the files and git history, so each pass picks up where the last one left off.
This is an independent Node implementation. It needs no jq or perl, so it runs
under Git Bash on Windows, and it requires the standard or strict profile, which
wires its Stop hook.
Start
When invoked as /ralph-loop <task>, start the loop with the task and continue
working on it in the same turn:
rcskills loop start 'Make npm test pass with no skipped tests' --completion-promise 'ALL TESTS PASS' --max-iterations 15--max-iterationsdefaults to 10 and is capped at 100. There is no unlimited mode.--completion-promiseis the exact phrase that ends the loop. Without one, the loop runs to the cap.- Use single quotes, so the shell leaves
$and backticks in the prompt alone.
Check it with rcskills loop status and stop it with rcskills loop cancel.
The promise rule
End the loop only by writing <promise>PHRASE</promise> in your own reply, and only
when that statement is completely true and verified by output you actually saw. Do
not write the tag to explain, plan or quote it — a written tag counts. If you are
stuck, say so plainly and let the cap end the loop; a false promise is a lie told to
escape, and it ships broken work as finished.
Write prompts that can finish
A loop is only as good as its finish line.
- Name a check a command can prove: tests pass,
tscis clean, the linter reports 0. - Break large goals into phases the prompt lists in order.
- Say what to do when blocked: record what was tried and what is in the way.
Good fits: getting a suite green, clearing lint or type errors, working through a mechanical migration. Bad fits: design decisions, anything needing human judgment, production incidents, tasks with no objective check.
Cost
Every iteration re-reads the whole context, so a loop multiplies whatever the session
already costs. Keep caps small, prefer a fresh session for a long loop, and expect the
[next] compaction line to appear sooner than usual.
Guarantees
- Only the session that started a loop is ever blocked by it.
- State lives in
~/.claude/token-harness/loops/, never in the project. - Unreadable state ends the loop rather than trapping the session.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

