ralph-invoke
Skill34 starsChanged 11 months agoMITView on GitHub
Allows Claude to directly start Ralph-Wiggum autonomous loops without user commands. The ralph-wiggum plugin must be installed and enabled: Use this skill when: - User asks to "start a ralph loop" or "run ralph" - User wants autonomous iteration on a task - User says "keep working until done" or "iterate until complete" - A complex task would benefit from multiple iterations - User explicitly requests Claude to invoke ralph Run this bash command: Simple task: Complex refactor: When the…
In this repository9 other files it gives its agents.
- openspec/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-reviewSkill
- continuous-improvementSkill
- dev-workflowSkill
- git-workflowSkill
- openapi-workflowSkill
- security-scanSkill
- systematic-debuggingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this skill when:
- Distinctive: line 24
Run this bash command:
- Distinctive: line 71
When the task is genuinely complete, output the completion promise in XML tags:
- Distinctive: line 78
Only output the promise when the statement is TRUE
- Distinctive: line 79
Do NOT lie to exit the loop
- Distinctive: line 80
Do NOT output false promises even if stuck
- Distinctive: line 85
If needed, cancel with:
- Distinctive: line 98
Start small: - Test with 3-5 iterations first
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ralph Invoke Skill
Allows Claude to directly start Ralph-Wiggum autonomous loops without user commands.
Prerequisites
The ralph-wiggum plugin must be installed and enabled:
/plugin install ralph-wiggum@claude-code-plugins
/plugin enable ralph-wiggum@claude-code-pluginsTriggers
Use this skill when:
- User asks to "start a ralph loop" or "run ralph"
- User wants autonomous iteration on a task
- User says "keep working until done" or "iterate until complete"
- A complex task would benefit from multiple iterations
- User explicitly requests Claude to invoke ralph
How to Start a Ralph Loop
Run this bash command:
"$HOME/.claude/plugins/cache/claude-code-plugins/ralph-wiggum/1.0.0/scripts/setup-ralph-loop.sh" \
"<TASK_DESCRIPTION>" \
--max-iterations <N> \
--completion-promise "<PROMISE_TEXT>"Parameters
| Parameter | Required | Default | Description |
| TASK_DESCRIPTION | Yes | - | The task to work on |
| --max-iterations | Recommended | unlimited | Safety limit (use 20-100) |
| --completion-promise | Recommended | null | Text to output when truly done |
Example Invocations
Simple task:
"$HOME/.claude/plugins/cache/claude-code-plugins/ralph-wiggum/1.0.0/scripts/setup-ralph-loop.sh" \
"Fix all TypeScript type errors" \
--max-iterations 50 \
--completion-promise "ALL_ERRORS_FIXED"Complex refactor:
"$HOME/.claude/plugins/cache/claude-code-plugins/ralph-wiggum/1.0.0/scripts/setup-ralph-loop.sh" \
"Migrate all API handlers to the new v2 pattern" \
--max-iterations 100 \
--completion-promise "MIGRATION_COMPLETE"How the Loop Works
- Claude runs the setup script → Creates state file at
.claude/ralph-loop.local.md - Claude works on the task → Normal operation
- Claude tries to exit → Stop hook intercepts
- Hook re-injects prompt → Claude continues with same task
- Repeat until:
- Max iterations reached, OR
- Claude outputs
<promise>PROMISE_TEXT</promise>
Completing the Loop
When the task is genuinely complete, output the completion promise in XML tags:
<promise>ALL_ERRORS_FIXED</promise>CRITICAL RULES:
- Only output the promise when the statement is TRUE
- Do NOT lie to exit the loop
- Do NOT output false promises even if stuck
- Trust the process - if stuck, iterate and try differently
Canceling a Loop
If needed, cancel with:
rm .claude/ralph-loop.local.mdOr use: /ralph-wiggum:cancel-ralph
Best Practices
- Always set --max-iterations - Prevents runaway costs (50-100 is reasonable)
- Use specific completion promises - "ALL_TESTS_PASS" not "DONE"
- Include success criteria in task - Be explicit about what "done" means
- Monitor progress -
head -10 .claude/ralph-loop.local.md - Start small - Test with 3-5 iterations first
Cost Warning
Autonomous loops consume tokens rapidly. A 50-iteration loop can cost $50-100+ in API usage. Always use --max-iterations as a safety net.
Why This Skill Exists
The official ralph-wiggum plugin requires users to run /ralph-loop commands. This skill enables Claude to invoke loops directly, enabling:
- Claude-initiated iteration on complex tasks
- Programmatic loop triggers from other skills/agents
- Automated workflows without manual commands
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

