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.zipInstalls 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 verificationKey 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
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
autopilotinstead - User wants to explore or plan before committing -- use
planskill instead - User wants a quick one-shot fix -- delegate directly to an executor agent
- User wants manual control over completion -- use
ultraworkdirectly </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 tiered architect review to confirm quality. </Why_This_Exists>
<Execution_Policy>
- Fire independent agent calls simultaneously -- never wait sequentially for independent work
- Use
run_in_background: truefor long operations (installs, builds, test suites) - Always pass the
modelparameter explicitly when delegating to agents - Read
docs/shared/agent-tiers.mdbefore first delegation to select correct agent tiers - Deliver the full implementation: no scope reduction, no partial completion, no deleting tests to make them pass
- Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail
- Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints
- If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the execution loop is grounded
- Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent </Execution_Policy>
<Tool_Usage>
- Before first MCP tool use, call
ToolSearch("mcp")to discover deferred MCP tools - Use
ask_codexwithagent_role: "architect"for verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integration - Skip Codex consultation for simple feature additions, well-tested changes, or time-critical verification
- If ToolSearch finds no MCP tools or Codex is unavailable, proceed with architect agent verification alone -- never block on external tools
- Use
state_write/state_readfor ralph mode state persistence between iterations - Persist context snapshot path in Ralph mode state so later phases and agents share the same grounding context </Tool_Usage>
State Management
Use the omx_state MCP server tools (state_write, state_read, state_clear) for Ralph lifecycle state.
- On start:
state_write({mode: "ralph", active: true, iteration: 1, max_iterations: 10, current_phase: "executing", started_at: "<now>", state: {context_snapshot_path: "<snapshot-path>"}}) - On each iteration:
state_write({mode: "ralph", iteration: <current>, current_phase: "executing"}) - On verification/fix transition:
state_write({mode: "ralph", current_phase: "verifying"})orstate_write({mode: "ralph", current_phase: "fixing"}) - On completion:
state_write({mode: "ralph", active: false, current_phase: "complete", completed_at: "<now>"}) - On cancellation/cleanup:
run
$cancel(which should callstate_clear(mode="ralph"))
Scenario Examples
Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.
Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ralph (this skill) | 0 | 3mo | No flags | Advanced |
| executing-plans | 6 | 2mo | No flags | Intermediate |
| task-think | 1 | 17d | No flags | Advanced |
| map-workflows-guide | 0 | 4mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by yangyuan-zhen
View all by yangyuan-zhen →You might also like
executing-plans
obra
Use when you have a written implementation plan to execute in a separate session with review checkpoints
task-think
telegramdesktop
Orchestrate a multi-phase implementation workflow for this repository with artifact files under .ai/task-slug and optional fresh codex exec child runs per phase. Use when the user wants one prompt to drive context gathering, planning, implementation, verification, and review iterations while keeping the main session context clean.
map-workflows-guide
diegosouzapw
Comprehensive guide for choosing the right MAP workflow based on task type and requirements
executing-plans
liujiarui0918
Use to execute a written plan. Run tasks in batches with human checkpoints.
aif-improve
vanyastaff
Refine and enhance an existing implementation plan with a second iteration. Re-analyzes the codebase, checks for gaps, missing tasks, wrong dependencies, and improves the plan quality. Use after /aif-plan to polish the plan before implementation, or to improve an existing /aif-fix plan.
brainstorming
doviettung96
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements, and design before implementation.