open-ralph

Run an autonomous Open Ralph Wiggum coding loop using OpenCode Zen with free models and automatic fallback.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
3 · 1.6k · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description describe running an autonomous ralph coding loop using OpenCode models; the declared required binaries (ralph, git, opencode) broadly match that purpose. Minor note: the SKILL.md never invokes an opencode binary directly (it calls ralph with --agent opencode), so requiring a separate opencode executable may be unnecessary but is not strongly inconsistent. The SKILL.md includes a homepage URL, while registry metadata shows none — minor metadata mismatch.
Instruction Scope
The instructions are narrowly scoped to running the ralph CLI with specific models and fallbacks, require being inside a git repo, and advise safe practices (iteration limits, review diffs). They do not instruct reading unrelated files or environment variables. Note: the skill assumes the agent/system can run the ralph CLI which will perform code changes locally — the user should expect code edits/commits and explicitly review them before merging.
Install Mechanism
This is instruction-only with no install spec or archives to download, which minimizes install-time risk. No external packages or executable downloads are specified in the skill itself.
Credentials
The skill declares no required environment variables or credentials, which is coherent with the SKILL.md. However, in practice accessing OpenCode models may require API credentials or local opencode/ralph configuration (not documented in the SKILL.md). The skill does not request unrelated secrets.
Persistence & Privilege
always is false and disable-model-invocation is unset (normal). The skill does not request persistent system privileges or to modify other skills/configs. Autonomous invocation can change repo content via ralph, which is expected behavior for this skill type.
Assessment
This skill appears to do what it says: run the ralph CLI in a loop against OpenCode models. Before installing or running it: (1) ensure you have the ralph and git binaries (and opencode if your setup requires it); (2) confirm whether your OpenCode/Zen setup requires API keys or local auth (the SKILL.md doesn't document credentials) and only provide those you trust; (3) run it on a feature branch or a disposable clone so automated edits don't affect mainline unexpectedly; (4) keep max-iterations small at first and review diffs/commits before merging; (5) verify the model identifiers and the referenced GitHub homepage yourself (the registry metadata left homepage empty while SKILL.md points to a repo) to ensure the project is the expected source.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97cwq43zr82v78ny2hna2d7g980kxef

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🔁 Clawdis
Binsopencode, ralph, git

SKILL.md

What this skill does

This skill runs an autonomous Ralph Wiggum coding loop using the ralph CLI with OpenCode as the agent provider.

It repeatedly executes the same coding prompt until:

  • The success criteria are met, OR
  • The completion promise is printed, OR
  • Max iterations are reached

The loop is optimized for free OpenCode Zen models and includes a fallback chain in case models are rate-limited, disabled, or removed.


When to use

Use this skill when you want autonomous coding execution such as:

  • Fixing failing tests
  • Implementing scoped features
  • Refactoring codebases
  • Resolving lint/type errors
  • Running build-fix loops
  • Multi-iteration debugging

You MUST be inside a git repository before running Ralph.


Free model fallback order

Always attempt models in this order:

  1. opencode/kimi-k2.5-free ← Best coding performance (limited time free)
  2. opencode/minimax-m2.1-free
  3. opencode/glm-4.7-free
  4. opencode/big-pickle ← Free stealth model fallback

If a model fails due to availability or quota, immediately retry using the next model without changing the prompt or loop parameters.

Failure triggers for fallback

Fallback if you encounter errors like:

  • model disabled
  • model not found
  • insufficient quota
  • quota exceeded
  • payment required
  • rate limit
  • provider unavailable

How to run the loop

Attempt #1 (primary model)

Run:

ralph "<TASK PROMPT>

Success criteria:

  • <list verifiable checks>
  • Build passes
  • Tests pass

Completion promise: <promise>COMPLETE</promise>"
--agent opencode
--model opencode/kimi-k2.5-free
--completion-promise "COMPLETE"
--max-iterations 20


Attempt #2 (fallback)

If attempt #1 fails due to model issues, rerun with:

--model opencode/minimax-m2.1-free


Attempt #3 (fallback)

If attempt #2 fails:

--model opencode/glm-4.7-free


Attempt #4 (final fallback)

If attempt #3 fails:

--model opencode/big-pickle


Tasks mode (for large projects)

For multi-step execution:

ralph "<BIG TASK PROMPT>"
--agent opencode
--model opencode/kimi-k2.5-free
--tasks
--max-iterations 50

Fallback model order still applies.


Plugin troubleshooting

If OpenCode plugins interfere with loop execution, rerun with:

--no-plugins


Sanity check available Zen models

If free model availability changes, check:

https://opencode.ai/zen/v1/models

Update fallback order if needed.


Safety notes

  • Always run inside a git repo
  • Set iteration limits to avoid runaway loops
  • Ensure prompts contain verifiable success criteria
  • Review diffs before merging autonomous changes

Example usage

Fix failing TypeScript errors:

ralph "Fix all TypeScript errors in the repo.

Success criteria:

  • tsc passes
  • Build succeeds

Completion promise: <promise>COMPLETE</promise>"
--agent opencode
--model opencode/kimi-k2.5-free
--completion-promise "COMPLETE"
--max-iterations 20

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…