Skip to main content
skill CX Codex

ralph-loop · mikeyobrien — Claude Code skill: what it does, how to install

Run, monitor, resume, and debug Ralph orchestrator loops directly from your AI agent. Useful for checking diffs, inspecting logs, and managing worktree merge queues.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a claude-code
Open on GitHub

What ralph-loop does

This skill teaches the agent to inspect, run, and control Ralph orchestrator loops through the CLI. It starts by running ralph loops list or its JSON variant to read active worktrees and loop states. When starting an execution, it supplies the core configuration with -c and hat sources with -H.

Troubleshooting follows strict rules before any state changes occur. The agent inspects logs, history, and diffs instead of editing .ralph files directly. Suspended runs are recovered by reading .ralph/suspend-state.json followed by ralph loops resume <id>. Removing lock files is permitted only after confirming the background process is dead.

Tasks and runtime memories form the canonical state rather than a temporary scratchpad. For worktrees waiting in needs-review, the agent reviews code changes before running merge or discard.

What it helps with

  • start Ralph runs with specific -c and -H inputs
  • resume hook-suspended loops using their loop ID
  • inspect logs, history, and diagnostics for stuck processes
  • review worktree diffs and merge completed tasks from the queue

Example prompts for the agent

  • Check the active Ralph loops using ralph loops list --json
  • Inspect diagnostics and resume the suspended loop with id loop-42
  • Review the diff for the loop in needs-review and merge it

How to install ralph-loop

1Skills CLI (Vercel)

npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a claude-code

2Manually: put the files in place

~/.claude/skills/ralph-loop/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ralph-loop/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ralph-loop

How do I install ralph-loop in Claude Code?

Run npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a claude-code.

What does ralph-loop do?

It provides operator workflows for managing Ralph orchestrator loops, reading diagnostics, inspecting worktree diffs, and unblocking merge queues.

How does the skill handle suspended loops?

The agent reads .ralph/suspend-state.json to inspect the saved state and then runs ralph loops resume <id>. Direct edits to files in .ralph are treated strictly as a last resort.

Source text

SKILL.md · MIT
---
name: ralph-loop
description: Run, monitor, resume, merge, and debug Ralph loops. Use this skill whenever the user asks to operate `ralph run` or `ralph loops`, inspect loop state, recover suspended loops, analyze diagnostics, or unblock merge queue issues.
---

# 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`

© mikeyobrien · MIT · mikeyobrien/ralph-orchestrator

Similar skills

All skills for Agent setup: memory, context, orchestration →

ralph-loop by other authors comes first.

From the same set16

playwriter Drives your local Chrome browser with Playwright Page scripts while keeping active logins and cookies. Useful for testing authenticated web dashboards. CX Codex +1 ★ 3,189repo stars pdd pdd turns a rough idea into requirements, research, a design document, and an implementation plan. It is for projects that need decisions recorded before coding. CX Codex +1 ★ 3,189repo stars find-code-tasks The skill lists every .code-task.md file in your repository with status and dates. Handy when you want to see what work is still open. CX Codex +1 ★ 3,189repo stars evaluate-presets Runs automated tests across Ralph hat collection presets using shell scripts. Helps validate agent routing logic and detect context leaks. CX Codex +1 ★ 3,189repo stars code-task-generator Turn a feature description or PDD plan into .code-task.md files with acceptance criteria. The skill shows its proposed task breakdown before writing anything. CX Codex +1 ★ 3,189repo stars code-assist A skill that walks the agent through Explore, Plan, Code, Commit: research and a plan first, then failing tests, then code. Useful when a task should go through TDD instead of straight to implementation. CX Codex +1 ★ 3,189repo stars ralph-hats Build and inspect Ralph hat collections, check event routing, and tune multi-hat workflows. Useful when creating or debugging a .ralph/hats/*.yml file. CX Codex +1 ★ 3,189repo stars ralph-docs This skill makes the agent look up Ralph Orchestrator answers in the published doc map instead of guessing. Handy when you need to understand a framework internal or scope a change to its repo. CX Codex +1 ★ 3,189repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor