A persistence loop that runs tasks until they are finished and architect-verified.

Install

mkdir -p .claude/skills/ralph-yangyuan-zhen && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17505" && unzip -o skill.zip -d .claude/skills/ralph-yangyuan-zhen && rm skill.zip

Installs to .claude/skills/ralph-yangyuan-zhen

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

[OMX] Self-referential loop until task completion with architect verification
77 charsno explicit “when” trigger
Advanced

Key capabilities

  • →Persist task progress across sessions
  • →Execute independent agent calls in parallel
  • →Require architect verification for task completion
  • →Handle tasks spanning multiple iterations
  • →Generate a context snapshot for tasks
  • →Break down tasks into user stories with acceptance criteria

How it works

Ralph operates as a persistence loop that continues working on a task until it is complete and architect-verified. It wraps parallel execution with session persistence and automatic retry on failure.

Inputs & outputs

You give it
User task: "build a todo app with React and TypeScript"
You get back
A context snapshot, PRD, and progress ledger, followed by a task execution loop

When to use ralph

  • →Ensure complex bug fix completion
  • →Run multi-iteration tasks
  • →Automate verified feature implementation

About this skill

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

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

<Purpose> Ralph is a persistence loop that keeps working on a task until it is fully complete and architect-verified. It wraps ultrawork's parallel execution with session persistence, automatic retry on failure, and mandatory verification before completion. </Purpose>

<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 parallel execution with architect sign-off at the end </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 -- use ultrawork directly </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 looping until work is genuinely complete, requiring fresh verification evidence before allowing completion, and using explicit architect native-subagent verification to confirm quality. </Why_This_Exists>

<Execution_Policy>

  • Fire independent agent calls simultaneously -- never wait sequentially for independent work
  • Use run_in_background: true for long operations (installs, builds, test suites)
  • The documented-leader preflight is not a general native-session gate. Run omx ralplan preflight --json only when native role routing reports role_routing_unavailable and Ralph attempts adapted Ralplan Planner, Architect, or Critic authority, adapted role-intent, or adapted consensus authority. On unsupported_documented_leader_proof, stop before that adapted authority and use a Codex surface with documented root proof or a reviewed alternative workflow. Do not infer root authority from session_id, undocumented thread_id, session/pointer/transcript/cwd state, absent child data, or prompt labels. Ordinary native planning, lifecycle, state, status, health, HUD, runtime, setup, install, sync, and unrelated delegation remain outside this preflight boundary and under their existing controls.
  • When the native surface exposes agent_type role routing, set agent_type to an installed OMX role and never omit it for OMX work; use reasoning_effort for per-dispatch intensity when needed.
  • OMX adapted role-pass protocol: when native routing is role_routing_unavailable, do not fabricate agent_type. On the exact reviewed Codex releases 0.144.5, 0.145.0, 0.146.1, and 0.148.0-alpha.5, only an attempted adapted Ralplan Planner, Architect, Critic, role-intent, or consensus authority path requires omx ralplan preflight --json and fails closed on unsupported_documented_leader_proof; every other version remains unknown and fails closed. Do not use prompt labels, task-name carriers, pending intents, markers, or omx ralplan role-intent write as substitutes.
  • Preserve legacy Ralph tier intent through native reasoning effort: LOW -> low, STANDARD -> medium, THOROUGH -> xhigh
  • Deliver the full implementation: no scope reduction, no partial completion, no deleting tests to make them pass
  • Apply the shared workflow guidance pattern: outcome-first framing, concise visible updates for multi-step execution, local overrides for the active workflow branch, validation proportional to risk, explicit stop rules, and automatic continuation for safe reversible steps. Ask only for material, destructive, credentialed, external-production, or preference-dependent branches.
  • Integrate with Codex goal mode when goal tools are available: inspect the active thread goal with get_goal, preserve it as the top-level stop condition, and only call update_goal({status: "complete"}) after a Ralph completion audit proves the objective is actually achieved. </Execution_Policy>
<Steps> 0. **Pre-context intake (required before planning/execution loop starts)**: - Assemble or load a context snapshot at `.omx/context/{task-slug}-{timestamp}.md` (UTC `YYYYMMDDTHHMMSSZ`). - Minimum snapshot fields: - task statement - desired outcome - known facts/evidence - constraints - unknowns/open questions - likely codebase touchpoints - If an existing relevant snapshot is available, reuse it and record the path in Ralph state. - If request ambiguity is high, gather brownfield facts first. `omx explore` is deprecated; use normal repository inspection tools/subagents for simple read-only repository lookups and `omx sparkshell` only for explicit shell-native read-only evidence. Then run `$deep-interview --quick <task>` to close critical gaps. - Do not begin Ralph execution work (delegation, implementation, or verification loops) until snapshot grounding exists. If forced to proceed quickly, note explicit risk tradeoffs. - A Ralplan-originated handoff alone does not require preflight. Before intake, run `omx ralplan preflight --json` only when native role routing is unavailable and the handoff attempts adapted Ralplan Planner, Architect, Critic, role-intent, or consensus authority. On `unsupported_documented_leader_proof`, record the reason in Execution Policy and stop before that authority; otherwise follow the existing intake controls. 1. **Review progress**: Check TODO list and any prior iteration state 2. **Continue from where you left off**: Pick up incomplete tasks 3. **Delegate in parallel**: Route tasks to specialist native agents with explicit `agent_type` and appropriate `reasoning_effort` - Simple lookups: `reasoning_effort="low"` -- "What does this function return?" - Standard work: `reasoning_effort="medium"` -- "Add error handling to this module" - Complex analysis: `reasoning_effort="xhigh"` -- "Debug this race condition" - When Ralph is entered as a ralplan follow-up, start from the approved **available-agent-types roster** and make the delegation plan explicit: implementation lane, evidence/regression lane, and final sign-off lane using only known agent types 4. **Run long operations in background**: Builds, installs, test suites use `run_in_background: true` 5. **Visual task gate (when screenshot/reference images are present)**: - Run the Visual Ralph verdict step **before every next edit**. - Require structured JSON output: `score`, `verdict`, `category_match`, `differences[]`, `suggestions[]`, `reasoning`. - Persist verdict to `.omx/state/{scope}/ralph-progress.json` including numeric + qualitative feedback. - Default pass threshold: `score >= 90`. - **URL-based visual cloning tasks**: When the task description contains a target URL (e.g., "clone https://example.com"), route the work through `$visual-ralph`. `$web-clone` is hard-deprecated; Visual Ralph owns the migrated live-URL visual implementation use case and uses its built-in visual verdict step for measured visual scoring. 6. **Verify completion with fresh evidence**: - If Codex goal mode is available, call `get_goal` before final verification to restate the active objective and include it in the evidence checklist. a. Identify what command proves the task is complete b. Run verification (test, build, lint) c. Read the output -- confirm it actually passed d. Check: zero pending/in_progress TODO items 7. **Architect verification** (native role): - <5 files, <100 lines with full tests: `task(agent_type="architect", reasoning_effort="medium", prompt="...")` minimum - Standard changes: `task(agent_type="architect", reasoning_effort="medium", prompt="...")` - >20 files or security/architectural changes: `task(agent_type="architect", reasoning_effort="xhigh", prompt="...")` - Ralph floor: always run an explicit `architect` native subagent, even for small changes - On `role_routing_unavailable`, do not invoke `omx ralplan role-intent write` or manufacture an Architect identity. Run the documented-leader preflight only if Architect verification would attempt adapted Ralplan Architect authority; on the exact reviewed Codex releases 0.144.5, 0.145.0, 0.146.1, and 0.148.0-alpha.5 that adapted path is unavailable, while every other version remains unknown and fails closed. Surface the leader-proof diagnostic and the supported-surface recovery guidance, then stop before that authority. Ordinary Ralph delegation remains under its existing controls. Use an adapted route only after its documented positive root proof has been reviewed and implemented. 7.5 **Mandatory Deslop Pass**: - After Step 7 passes, run `oh-my-codex:ai-slop-cleaner` on **all files changed during the Ralph session**. - Scope the cleaner to **changed files only**; do not widen the pass beyond Ralph-owned edits. - Run the cleaner in **standard mode** (not `--review`). - If the prompt contains `--no-deslop`, skip Step 7.5 entirely and proceed with the most recent successful verification evidence. 7.6 **Regression Re-verification**: - After the deslop pass, re-run all tests/build/lint and read the output to confirm they still pass. - If post-deslop regression fails, roll back cleaner changes or fix and retry. Then rerun Step 7.5 and Step 7.6 until the regression is green. - Do not proceed to completion until post-deslop regression is green (unless `--no-deslop` explicitly skipped the deslop pass). 8. **On approval**: If Codex goal mode is active, call `update_goal({status: "complete"})` before `/cancel`; report final elapsed time and token-budget usage when the tool returns it. Then run `/cancel` to cleanly exit and clean up all state files. 9. **On rejection**: Fix the issues raised, then re-verify with the same `agent_type` and `reasoning

Content truncated.

When not to use it

  • →When a full autonomous pipeline from idea to code is desired
  • →When the user wants to explore or plan before committing to a task
  • →When a quick one-shot fix is needed

Limitations

  • →Does not provide a full autonomous pipeline from idea to code
  • →Requires architect verification before task completion
  • →Does not offer manual control over completion

How it compares

Ralph ensures guaranteed task completion with mandatory verification and persistence across sessions, unlike a single-shot execution that might not track progress or require sign-off.

Compared to similar skills

ralph side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ralph (this skill)06moNo flagsAdvanced
executing-plans65moNo flagsIntermediate
task-think13moNo flagsAdvanced
map-workflows-guide07moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry