Skip to content

Guide · Agent skill

How to use the Ralph Persistence Loop agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

Ralph is an agent skill from the oh-my-claudecode toolkit that keeps an AI coding agent working on a complex task until every item in its plan is finished and checked. This guide explains what the skill does, how to install it from a ZIP file, how to trigger it with plain requests, and what to watch for before letting it run unattended. By the end you will know when Ralph is the right tool and how to set it up in a repository.

Ralph Persistence LoopYeachan-Heo/oh-my-claudecode · MIT

Quick start

  1. 1Download the ZIP. Download the ralph skill ZIP from this page.
  2. 2Install the skill folder. Unzip it into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project. If you use the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
  3. 3Install the oh-my-claudecode toolkit. Set up the oh-my-claudecode toolkit so the omc command is available, since the skill calls omc ralph verify and omc ralph afk.
  4. 4Check the repository's feedback commands. Confirm the project has build, test or lint scripts, or add a feedbackCommands list to the PRD.
  5. 5Ask for the task with a trigger phrase. Describe the task and say it must complete, for example 'ralph: finish this migration and make sure tests pass'.
  6. 6Review the result. When the run ends, review the changes and the story notes before accepting the work.

What the ralph skill makes the agent do

Ralph is a PRD-driven persistence loop. PRD stands for product requirements document, and here it is a prd.json file that lists user stories. The agent works through the stories one at a time and keeps iterating until all of them are marked as passing and have been verified by a reviewer.

Ralph combines session persistence, automatic retry on failure, structured story tracking and a verification step before completion. Its stated purpose is to stop partial work from being declared done: tests get skipped and edge cases get forgotten when there is no checklist and no check.

  • Story tracking: each user story has acceptance criteria, and the agent checks each one before marking the story complete.
  • Progress notes: learnings across iterations are tracked in progress.txt.
  • Verification: the verify step runs feedback commands such as build, test and lint.
  • Reviewer sign-off: a separate reviewer (architect, critic or codex) checks the work before the task is finished.

Install the ralph skill from a ZIP file

Download the ZIP for the ralph skill from this page. Agent skills are folders that contain a SKILL.md file, and the ZIP holds the ralph skill's SKILL.md.

You can install it in one of two places. For a personal install, unzip it into your ~/.claude/skills/ folder. To limit it to one project, unzip it into that project's .claude/skills/ folder.

If you use the Claude apps instead of a folder on disk, you can upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your repository
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Install the oh-my-claudecode toolkit and the omc command

The skill depends on the oh-my-claudecode toolkit and its omc command-line tool. Ralph calls omc ralph verify to run feedback checks and omc ralph afk for headless runs, so the skill will not do its full job without them. The skill file does not spell out the toolkit's installation steps, so follow the oh-my-claudecode project's own documentation for that part.

The skill also needs a repository that has build, test or lint scripts, or a feedbackCommands list in the PRD. Without either, there is nothing for the verify step to run.

  • oh-my-claudecode toolkit with the omc command-line tool
  • A repository with build, test or lint scripts, or a feedbackCommands list in the PRD
  • Optional: codex access if you use --critic=codex
omc ralph verify --write-baseline --session <sessionId>

Trigger ralph with natural requests

You do not need special syntax to start the loop. The skill is meant to be triggered when you ask the agent to keep going on a task that has to be finished. The skill's own list of trigger phrases includes the word ralph, along with phrases such as don't stop, must complete, finish this and keep going until done.

Use it when the task needs guaranteed completion with checks, when it may take several rounds, or when you want reviewer sign-off. Describe the task clearly and say that it must be completed.

You can also add flags to the request. --critic=architect, --critic=critic or --critic=codex picks the completion reviewer for that run, and architect is the default. --no-deslop skips the cleanup pass after review, which the skill says to use only when cleanup is out of scope.

  • Example phrasing: 'ralph: add CSV export to the reports page. It must complete, with tests passing.'
  • Example phrasing: 'Keep going until done: migrate the auth module and make sure the build and lint pass.'
  • Reviewer choice: add --critic=codex to the request to use codex as the reviewer.

Understand what happens during a run

On the first iteration, before choosing a story, the agent records a feedback baseline with omc ralph verify and the --write-baseline flag. Later checks run omc ralph verify and act on its exit code: 0 means pass, and 1 means new failures that must be fixed. The skill says the agent must not run the test suite and judge the output by eye, because that is the failure the gate exists to prevent.

The PRD can list feedback commands in a feedbackCommands array, such as npm run build, npm test and npm run lint. If that list is missing, the skill detects them from the repository's package scripts.

The prd.json file is created automatically when Ralph starts if none exists. In session-based runs its active copy lives under .omc/state/sessions/ with the session ID in the path.

  • Exit code 0: pass; failures present in the baseline are recorded as warnings, not story failures.
  • Exit code 1: new failures that the agent must fix before continuing.
  • feedbackCommands example: ["npm run build", "npm test", "npm run lint"] in the PRD.

Safety notes before you run ralph unattended

Ralph runs scripts, which means it executes commands in your repository. It does not use the network, according to the skill's metadata. Because the loop repeats and edits code across iterations, you should be careful with unattended runs.

The skill's own guidance warns that headless mode (omc ralph afk) and repeated edits can change a repository without review. Keep the work in version control, review the diff afterwards, and avoid unattended runs on code you cannot easily roll back.

  • Runs scripts: yes. Commands from your package scripts and the feedbackCommands list will run.
  • Uses network: no, according to the skill metadata.
  • Unattended runs: omc ralph afk can modify code repeatedly without a human watching, so review the results afterwards.
  • Use a clean git branch so you can revert the changes easily.

Tips for getting good results

Write acceptance criteria that can be tested. The skill checks each story against them, so vague criteria give the reviewer nothing to verify. Keep stories small enough that one iteration can finish one of them.

Pick the repository quality class deliberately. The PRD carries a repoQualityClass value of prototype, production or library, and production is the default. Choosing the right class affects how strict the acceptance checks are.

Do not use ralph for a quick one-line fix or for exploratory planning. The skill's guidance points those cases to other tools.

  • Make each acceptance criterion specific and checkable.
  • Set feedbackCommands explicitly if your repository's scripts are unclear.
  • Use the plan skill to explore before committing to a task.
  • Use autopilot if you want a full pipeline from idea to code.

What people use it for

  • Finishing a multi-step feature where earlier attempts left parts unimplemented.
  • Working through a set of user stories with explicit acceptance criteria before sign-off.
  • Making sure a build, test and lint pass before a task is declared done.
  • Running a reviewer such as codex over a completed change before finishing.

Frequently asked questions

Is the ralph skill free to use?

The skill is published under the MIT licence, as listed on this page. The licence applies to the skill and its source, so check the oh-my-claudecode project for any other terms that apply to its toolkit.

What do I need to run the ralph skill?

You need the oh-my-claudecode toolkit with the omc command-line tool, and a repository with build, test or lint scripts or a feedbackCommands list in the PRD. Codex access is optional and only needed if you use --critic=codex.

Where do I put the ralph skill folder?

Unzip the download into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project to limit it to that project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

How do I trigger ralph?

Use natural requests that include the word ralph or phrases such as keep going until done, finish this or must complete. You can add --critic=architect, --critic=critic or --critic=codex to choose the reviewer for that run.

Does ralph run commands on my computer?

Yes. The skill runs scripts, including the build, test and lint commands from feedbackCommands or your package scripts. It does not use the network, according to its metadata.

When should I use something else instead of ralph?

For a quick one-shot fix, the skill's guidance suggests delegating directly to an executor agent. For exploring or planning before committing, use the plan skill. For a full pipeline from idea to code, use autopilot.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Ralph suits developers with multi-step coding tasks that keep ending up partly finished, especially teams that want acceptance criteria and reviewer sign-off before a task counts as done. It is the wrong choice for quick fixes, exploratory planning, or unattended runs on code you cannot easily review and revert.

Download the skill