Loading...
Loading...
Use this skill whenever a user wants to run, install, configure, or understand open-ralph-wiggum (ralph). This skill can be used by any AI assistant or IDE agent (GitHub Copilot, Claude Code, Cursor, Windsurf, etc.). Triggers on: "ralph", "ralph wiggum", "agentic loop", "iterative AI loop", "autonomous coding loop", "how to install ralph", "how to use ralph with Claude Code / Codex / Copilot / OpenCode", "ralph --agent", "ralph --tasks", "ralph --status", "--max-iterations", "--rotation", "how do I run ralph in VS Code / Cursor / JetBrains / Neovim", or any question about looping an AI coding agent until a task is done. Even if the user doesn't say "ralph" explicitly — if they want to run an AI agent in a loop until a promise tag appears in its output, use this skill.
npx skill4agent add th0rgal/open-ralph-wiggum open-ralph-wiggumralph<promise>COMPLETE</promise>claudecodexcopilotopencodenpm install -g @th0rgal/ralph-wiggumbun add -g @th0rgal/ralph-wiggumgit clone https://github.com/Th0rgal/open-ralph-wiggum
cd open-ralph-wiggum
./install.shgit clone https://github.com/Th0rgal/open-ralph-wiggum
cd open-ralph-wiggum
.\install.ps1ralphralph "Create a hello.txt file with 'Hello World'. Output <promise>DONE</promise> when complete." \
--max-iterations 5ralph "Build a REST API with tests. Output <promise>COMPLETE</promise> when all tests pass." \
--agent claude-code --model claude-sonnet-4 --max-iterations 20ralph "Refactor auth module, ensure all tests pass. Output <promise>COMPLETE</promise> when done." \
--agent codex --model gpt-5-codex --max-iterations 20ralph "Implement login feature. Output <promise>COMPLETE</promise> when done." \
--agent copilot --max-iterations 15copilot /loginGH_TOKENopencode models~/.config/opencode/opencode.json{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-5"
}claude --versionclaude-opus-4claude-sonnet-4claude-haiku-4codex --versiongpt-5-codexo4-minicopilot /status # shows login state and available models
# If not logged in:
copilot /login
# Or set env var:
export GH_TOKEN=your_tokenfor bin in opencode claude codex copilot; do
if command -v "$bin" &>/dev/null; then echo "✅ $bin: $(which $bin)"; else echo "❌ $bin: not found"; fi
done && \
[[ -n "$GH_TOKEN" ]] && echo "✅ GH_TOKEN set (Copilot CLI)" || echo "ℹ️ GH_TOKEN not set (needed only for Copilot CLI)"| Agent | | Binary | Env override |
|---|---|---|---|
| OpenCode (default) | | | |
| Claude Code | | | |
| OpenAI Codex | | | |
| Copilot CLI | | | |
$PATH--agent AGENT Agent to use (opencode|claude-code|codex|copilot)
--model MODEL Model name (agent-specific, e.g. claude-sonnet-4, gpt-5-codex)
--max-iterations N Stop after N iterations (always set this as a safety net)
--min-iterations N Require at least N iterations before allowing completion (default: 1)
--completion-promise T Text that signals task completion (default: COMPLETE)
--abort-promise TEXT Text that signals early abort/precondition failure
--tasks / -t Enable Tasks Mode (structured multi-task tracking)
--prompt-file / -f PATH Read prompt from a file instead of CLI argument
--prompt-template PATH Use a custom Mustache-style prompt template
--no-commit Skip git auto-commit after each iteration
--no-plugins Disable OpenCode plugins (useful to avoid plugin conflicts)
--allow-all Auto-approve all tool permission prompts (default: on)
--status Show live loop status from another terminal
--add-context TEXT Inject a hint for the next iteration without stopping the loop
--clear-context Remove pending context
--list-tasks List current tasks (Tasks Mode)
--add-task TEXT Add a task (Tasks Mode)
--remove-task N Remove task by index (Tasks Mode)
--rotation LIST Cycle through agent/model pairs each iteration (comma-separated agent:model)
--verbose-tools Print every tool line (disable compact tool summary)
--last-activity-timeout DURATION Kill and restart iteration after inactivity (e.g., 30m, 1h)
--no-questions Disable interactive question handling (agent will loop on questions)
--task-promise T Text that signals task completion (default: READY_FOR_NEXT_TASK)
--no-stream Buffer agent output and print at the end
--no-allow-all Require interactive permission prompts
--config PATH Use custom agent config file
--init-config [PATH] Write default agent config to PATH and exit
--questions Enable interactive question handling (default: enabled)Ctrl+`` View → Terminalralph "Your task. Output <promise>COMPLETE</promise> when done." --max-iterations 20ralph "Your task. Output <promise>COMPLETE</promise> when done." \
--agent claude-code --model claude-sonnet-4 --max-iterations 20ralph "Your task. Output <promise>COMPLETE</promise> when done." \
--agent codex --model gpt-5-codex --max-iterations 20ralph "Your task. Output <promise>COMPLETE</promise> when done." \
--agent copilot --max-iterations 20Note:uses the standalone Copilot CLI, not the VS Code extension. Both can be active at the same time.--agent copilot
ralph --statusralph --add-context "Focus on fixing the auth module first"Alt+F12:split | terminal ralph "Your task. Output <promise>COMPLETE</promise> when done." --max-iterations 20:split | terminal ralph "Your task. Output <promise>COMPLETE</promise> when done." --agent claude-code --model claude-sonnet-4 --max-iterations 20:split | terminal ralph "Your task. Output <promise>COMPLETE</promise> when done." --agent codex --model gpt-5-codex --max-iterations 20:split | terminal ralph "Your task. Output <promise>COMPLETE</promise> when done." --agent copilot --max-iterations 20toggleterm.nvimralph --prompt-file ./task.md --max-iterations 30ralph --prompt-file ./task.md --agent claude-code --model claude-sonnet-4 --max-iterations 30ralph --prompt-file ./task.md --agent codex --model gpt-5-codex --max-iterations 30ralph --prompt-file ./task.md --agent copilot --max-iterations 30# Start a loop in Tasks Mode
ralph "Build a full-stack app" --tasks --max-iterations 50
# Manage tasks while the loop is idle (or before starting)
ralph --add-task "Set up database schema"
ralph --add-task "Implement REST API"
ralph --list-tasks
ralph --remove-task 2.ralph/ralph-tasks.md<promise>READY_FOR_NEXT_TASK</promise>ralph --status # Shows iteration progress, history, struggle indicators
ralph --add-context "The bug is in utils/parser.ts line 42" # Guide the agent
ralph --clear-context # Remove queued hint--status--rotationBuild a todo APIBuild a REST API for todos with:
- CRUD endpoints (GET, POST, PUT, DELETE)
- Input validation
- Tests for each endpoint
Run tests after each change.
Output <promise>COMPLETE</promise> when all tests pass.--max-iterations--tasks--prompt-file# Iteration {{iteration}} / {{max_iterations}}
## Task
{{prompt}}
## Instructions
Check git history to see what was tried. Fix what failed.
Output <promise>{{completion_promise}}</promise> when done.
{{context}}{{iteration}}{{max_iterations}}{{min_iterations}}{{prompt}}{{completion_promise}}{{abort_promise}}{{task_promise}}{{context}}{{tasks}}ralph "Your task" --prompt-template ./my-template.md# Alternate between OpenCode and Claude Code
ralph "Build a REST API" \
--rotation "opencode:claude-sonnet-4,claude-code:claude-sonnet-4" \
--max-iterations 10
# Three-way rotation
ralph "Refactor the auth module" \
--rotation "opencode:claude-sonnet-4,claude-code:claude-sonnet-4,codex:gpt-5-codex" \
--max-iterations 15agent:model--rotation--agent--model~/.config/opencode/opencode.json{
"$schema": "https://opencode.ai/config.json",
"model": "your-provider/model-name"
}--no-pluginsralph-wiggumralph "Refactor the auth module and ensure tests pass" \
--agent claude-code --model claude-sonnet-4 --max-iterations 15ralph "Generate unit tests for all utility functions" \
--agent codex --model gpt-5-codex --max-iterations 10copilot /login # or set GH_TOKEN / GITHUB_TOKEN env varnpm install -g @github/copilot
# or
brew install copilot-cliralph "Refactor the auth module and add tests" \
--agent copilot --max-iterations 15
# With a specific model
ralph "Build a REST API" \
--agent copilot --model claude-opus-4.6 --max-iterations 10--model--no-plugins--allow-all--allow-all--no-ask-user--prompt-file<promise>COMPLETE</promise>{
"features": [
{
"category": "functional",
"description": "Feature description",
"steps": ["Step 1", "Step 2"],
"passes": false
}
]
}Read features.json. Work through each feature. Update "passes" to true when verified. Output <promise>COMPLETE</promise> when all pass.| Symptom | Fix |
|---|---|
| Install Bun: |
| Re-run install, or check |
| Set a default model in |
| Plugin conflicts (OpenCode) | Run with |
| Windows "command not found" | Set |
| Agent loops on a question | Either answer interactively or use |
| Loop never terminates | Check your prompt includes the completion promise tag; reduce |
npm uninstall -g @th0rgal/ralph-wiggum