ralph-loop

ralph-loop is a skill for Claude Code, Codex from mikeyobrien/ralph-orchestrator. It costs 54 tokens per session (455 once invoked), scanned A, original, MIT.

A set of instructions for operating Ralph loops, which are repeated agent tasks that can run, pause, and resume. It covers checking their state and handling their worktrees, logs, and results.

In plain words
What is it for?
Use it to start or continue Ralph runs, inspect loop history and diagnostics, resume suspended loops, and manage completed worktree changes.
Why use it?
It helps you understand what a loop is doing and recover when it is suspended, stuck, or ready for review. It also guides safe choices when merging, retrying, or discarding loop work.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the ralph-orchestrator plugin — 3 skills shipped together

Good fit Use it to start or continue Ralph runs, inspect loop history and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mikeyobrien/ralph-orchestrator/ralph-loop
About the project

Ralph Orchestrator is a framework that repeatedly runs AI-agent tasks until they finish or reach an iteration limit. Developers use it to coordinate autonomous coding work through command-line, web-dashboard, and MCP-server interfaces, with state managed per workspace. The catalogue entries provide agent skills, agents, instructions, and plugins for operating Ralph.

mikeyobrien/ralph-orchestrator · 3,126 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop
Clone the repo
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator

Made for: Claude Code, Codex.

Or install ralph-orchestrator, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ralph-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/ralph-loop.svg)](https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/ralph-loop)
Your own site
<a href="https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/ralph-loop"><img src="https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/ralph-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 455 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00455
Opus 5 $0.00027 $0.00228
Sonnet 5 $0.00011 $0.00091
Haiku 4.5 $0.00005 $0.00046

Measured 7d ago against content hash 0d4a71e5f07d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ralph-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ralph-loop/SKILL.md · 48 lines

What it actually says

Ralph Loop

Use this skill to operate Ralph loops from the outside.

Use This Skill For

  • Starting or continuing a Ralph run with the right -c and -H inputs
  • Inspecting loop state, worktrees, logs, history, and diffs
  • Resuming a hook-suspended loop
  • Merging or discarding completed worktree loops
  • Debugging unexpected loop behavior with current diagnostics files

Workflow

  1. Start with ralph loops list or ralph loops list --json to establish the current state.
  2. If the user wants execution, run ralph run ... with the right core config and hats source.
  3. If the loop is stuck or suspicious, inspect logs, history, and diff before changing state.
  4. If the loop is suspended, read .ralph/suspend-state.json and use ralph loops resume <id>.
  5. If a loop is queued or in needs-review, inspect the diff first, then use merge, process, retry, or discard as appropriate.
  6. Use diagnostics when you need detailed evidence about hats, events, tool calls, parse errors, or performance.

Guardrails

  • Prefer the CLI over direct edits to .ralph state files.
  • Treat tasks and memories as the canonical runtime systems; do not center scratchpad as the primary state model.
  • Inspect diffs before merging.
  • Only remove lock or queue artifacts when the underlying process is confirmed dead.
  • Manual edits under .ralph/ are last-resort recovery steps and should be called out explicitly when used.

Read These References When Needed

  • For command recipes and operator flows: references/commands.md
  • For diagnostics files and suspend-state details: references/diagnostics.md
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 48 lines · 54 tokens per session scan A 0d4a71e5f07d

Subscribe to this mod's changes

ralph-loop is a skill published in the GitHub repository mikeyobrien/ralph-orchestrator (3,126 stars, last pushed 4d ago), licensed MIT. It adds 54 tokens to every session and 455 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

chart

Use when the user asks to visualize data with charts, graphs, or plots using the chart tool (bar, line, scatter, pie, time series, etc.).

Kilo-Org/kilocode · 37 tokens

writing-tests

Write unit tests, component tests, and integration tests for AiderDesk using Vitest and React Testing Library. Use when creating new tests, adding test coverage, configuring mocks, setting up test files, or debugging failing tests.

hotovo/aider-desk · 48 tokens

nx-workspace

Run and generate NX targets, configure project.json, and visualize dependency graphs. Use when you say: 'run affected tests', 'nx generate a library', 'configure project.json', or 'show dependency graph'.

monkilabs/opencastle · 46 tokens

agent-memory

Creates, queries agent expertise profiles in AGENT-EXPERTISE.md; increments file-familiarity counters after each task; ranks candidate agents by recency, task-area match. Use when deciding which agent should handle a file, checking who last worked on a module, recording task outcomes, or assigning work based on past…

monkilabs/opencastle · 69 tokens

playwright-testing

Playwright E2E testing patterns, cross-browser configuration, page objects, and CI setup. Use when creating E2E specs, visual regression suites, or configuring Playwright in CI. Trigger terms: playwright, e2e, trace, page object, cross-browser.

monkilabs/opencastle · 58 tokens

data-engineering

Transforms, validates, loads data in ETL pipelines. Use when building scrapers, validating NDJSON feeds, or importing data into CMS/DB targets.

monkilabs/opencastle · 35 tokens