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.
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a claude-codeWhat 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
-cand-Hinputs - 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-reviewand merge it
How to install ralph-loop
1Skills CLI (Vercel)
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a claude-code2Manually: put the files in place
~/.claude/skills/ralph-loop/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ralph-loop/
1Skills CLI (Vercel)
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a codex2Manually: put the files in place
.agents/skills/ralph-loop/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a cursor2Manually: put the files in place
.cursor/skills/ralph-loop/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mikeyobrien/ralph-orchestrator ralph-loop2Manually: put the files in place
.github/skills/ralph-loop/SKILL.md1Skills CLI (Vercel)
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a gemini-cli2Platform CLI
gemini skills install https://github.com/mikeyobrien/ralph-orchestrator --path skills/ralph-loopManually: put the files in place
.devin/skills/ralph-loop/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-loop -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.