agentleFS
cornch-kcornch-k/baton/skills/ralph-loop/SKILL.md

ralph-loop

Skill3 starsChanged 18 days agoApache-2.0View on GitHub

Repeats the same task every round in a fresh worker subagent, so only the repository carries over between rounds. Run with /baton:ralph-loop "<task>". (For the variant that keeps one session, use /baton:stateful-ralph.)

26 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • GoogleSkill

    to-issues

    Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

The file

Files
SKILL.md

ralph-loop

Arguments: $ARGUMENTS

Load the run protocol first (Skill tool → baton:protocol; if that fails, Read ${CLAUDE_PLUGIN_ROOT}/skills/protocol/SKILL.md) and follow it. This file only adds what is specific to ralph-loop.

Idea

Give the same prompt again and again to an agent with no memory. Each round has to rediscover the state from the repository, which keeps the repository honest: whatever isn't in the files is forgotten. Anthropic's own ralph-loop plugin repeats the prompt inside one session; that is /baton:stateful-ralph here. This flow restarts fresh every round.

Roles

Rolesubagent_typeModelSession
workerbaton:workerworker modelfresh every round

Turn prompt

The same every round, apart from the header:

BATON ralph-loop · turn <n>/<max> · role worker · run <run-id>

TASK:
<task, verbatim>

You start fresh. Only the workspace (files and git history of branch <branch>) carries over from earlier rounds. Orient from it, make the most valuable progress on the TASK you can this round, and leave the workspace ready for a cold start.

Stop

  • The budget is used up, or a turn fails (protocol).
  • Early stop, unless --no-early-stop: the streak: line shows done x2 or more and empty x1 or more.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.