ralph

ralph is a skill for Claude Code from RobinNorberg/oh-my-copilot. It costs 15 tokens per session (6,910 once invoked), scanned A, a copy of ralph, MIT.

A repeated work loop that keeps checking and improving a task until it meets its completion requirements, with a reviewer for verification.

In plain words
What is it for?
Use it for work that needs persistence, such as implementing a feature across several steps and checking the result.
Why use it?
It helps prevent complex tasks from stopping after a partial implementation or an unverified attempt.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Part of the oh-my-copilot plugin — 63 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server shipped together

Good fit Use it for work that needs persistence, such as implementing a feature across several steps and checking the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robinnorberg/oh-my-copilot/ralph
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 RobinNorberg/oh-my-copilot --skill ralph
Clone the repo
git clone --depth 1 https://github.com/RobinNorberg/oh-my-copilot

Made for: Claude Code.

Or install oh-my-copilot, the plugin that ships this one along with the rest of its 63 skills, 21 commands, 20 agents, 11 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/ralph/github.svg)](https://agentmods.dev/skills/robinnorberg/oh-my-copilot/ralph)
Your own site
<a href="https://agentmods.dev/skills/robinnorberg/oh-my-copilot/ralph"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/ralph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ralph

Your own site · 80×15
<a href="https://agentmods.dev/skills/robinnorberg/oh-my-copilot/ralph"><img src="https://agentmods.dev/badge/skills/robinnorberg/oh-my-copilot/ralph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,910 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 91% copy Near-identical to another mod 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.00015 $0.06910
Opus 5.5 $0.00006 $0.02764
Sonnet 5.5 $0.00003 $0.01382
Haiku 4.5 $0.00002 $0.00691

Measured 5d ago against content hash 06bd9755d42a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ralph 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 5d 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.

Origin

This is a copy

91% identical to ralph — 52 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/ralph/SKILL.md · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

[RALPH - ITERATION {{ITERATION}}/{{MAX}}]

Your previous attempt did not output the completion promise. Continue working on the task.

  1. FIRST ITERATION, before picking a story: run omg ralph verify --write-baseline --session <sessionId> (session id: read OMC_SESSION_ID if set — omg ralph afk exports it — else the one in the Ralph continuation context / active PRD path; use the SAME id for every call in this run). This records the feedback baseline. If the command is unavailable or denied, STOP and report the failure — do not fall back to hand-rolled judgment.
  2. EVERY verification gate (story verification, post-deslop re-verification): run omg ralph verify --session <sessionId> and obey the exit code — 0 = pass (baseline-only failures are recorded warnings, never a story failure), 1 = new failures to fix.
  3. NEVER hand-roll the feedback diff (running the suite yourself and eyeballing the output is exactly the failure mode this gate exists to prevent). </Precondition_Feedback_Gate>

<Use_When>

  • Task requires guaranteed completion with verification (not just "do your best")
  • User says "ralph", "don't stop", "must complete", "finish this", or "keep going until done"
  • Work may span multiple iterations and needs persistence across retries
  • Task benefits from structured PRD-driven execution with reviewer sign-off </Use_When>

<Do_Not_Use_When>

  • User wants a full autonomous pipeline from idea to code -- use autopilot instead
  • User wants to explore or plan before committing -- use plan skill instead
  • User wants a quick one-shot fix -- delegate directly to an executor agent
  • User wants manual control over completion -- delegate directly to an executor agent
  • User already has an active Claude Code /goal and only wants that native goal loop monitored -- adopt the existing /goal explicitly or use artifact-only Ultragoal notes instead of starting Ralph as a competing persistence loop </Do_Not_Use_When>

<Why_This_Exists> Complex tasks often fail silently: partial implementations get declared "done", tests get skipped, edge cases get forgotten. Ralph prevents this by:

  1. Structuring work into discrete user stories with testable acceptance criteria (prd.json)
  2. Iterating story-by-story until each one passes
  3. Tracking progress and learnings across iterations (progress.txt)
  4. Requiring fresh reviewer verification against specific acceptance criteria before completion </Why_This_Exists>

<PRD_Mode> By default, ralph operates in PRD mode. A scaffold prd.json is auto-generated when ralph starts if none exists. Active transient PRD state is session-scoped at .omg/state/sessions/{sessionId}/prd.json when a session ID is available; legacy project-level prd.json / .omg/prd.json files are read as startup migration inputs.

Startup gate: Ralph always initializes and validates prd.json at startup. Legacy --no-prd text is sanitized from the prompt for backward compatibility, but it no longer bypasses PRD creation or validation.

Deslop opt-out: If {{PROMPT}} contains --no-deslop, skip the mandatory post-review deslop pass entirely. Use this only when the cleanup pass is intentionally out of scope for the run.

Reviewer selection: Pass --critic=architect, --critic=critic, or --critic=codex in the Ralph prompt to choose the completion reviewer for that run. architect remains the default.

Stale-state detection & reconciliation (#3669): If a PRD is left unfinished by an abnormal/non-Step 8 exit (crash, force-kill, cancel before /oh-my-copilot:cancel, session end), Ralph surfaces an explicit [STALE PRD WARNING] at startup/resume, in the continuation context, and at session end — with unfinished counts, last-touched age, and stale-pointer signals (PRD branchName merged/gone). Completion is NEVER inferred from PR/branch/merge status alone; git state is a warning signal only. A story is auto-reconciled to passes: true ONLY when the PRD carries configured observable evidence and every check passes:

Read the full file on GitHub · 349 lines

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. 5d ago Changed 06bd9755d42a
  2. 16d ago Changed 58d0d310b2df
  3. 22d ago Changed · +17 lines bd8006fbd623
  4. 1mo ago First seen · 332 lines · 15 tokens per session scan A 3c8fd385ebbf

Subscribe to this mod's changes

ralph is a skill published in the GitHub repository RobinNorberg/oh-my-copilot (5 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 6,910 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to ralph, differing in 52 lines, and is treated as a copy.