Ralph Multimodel logo

Ralph Multimodel

Community
DNYoussef
ralph-multimodel

Ralph Wiggum persistence loop with intelligent multi-model routing (Gemini, Codex, Claude, Council)

Overview

PublisherDNYoussef
Repositorycontext-cascade
Skill nameralph-multimodel
Stars
32
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by DNYoussef on GitHub. Read the source before you install it.

Installation

Install the Ralph Multimodel AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/DNYoussef/context-cascade/tree/main/skills/orchestration/ralph-multimodel
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DNYoussef/context-cascade.git /tmp/context-cascade
mkdir -p .claude/skills
cp -r /tmp/context-cascade/skills/orchestration/ralph-multimodel .claude/skills/ralph-multimodel
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ralph Multimodel in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ralph Multimodel on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ralph Multimodel is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ralph Wiggum Multi-Model Persistence Loop


LIBRARY-FIRST PROTOCOL (MANDATORY)

Before writing ANY code, you MUST check:

Step 1: Library Catalog

  • Location: .claude/library/catalog.json
  • If match >70%: REUSE or ADAPT

Step 2: Patterns Guide

  • Location: .claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md
  • If pattern exists: FOLLOW documented approach

Step 3: Existing Projects

  • Location: D:\Projects\*
  • If found: EXTRACT and adapt

Decision Matrix

MatchAction
Library >90%REUSE directly
Library 70-90%ADAPT minimally
Pattern existsFOLLOW pattern
In projectEXTRACT
No matchBUILD (add to library after)

Purpose

Extend the Ralph Wiggum persistence pattern with intelligent model routing:

  • Gemini for research phases (search, megacontext, media)
  • Codex for autonomous iteration (yolo, full-auto, sandbox)
  • Claude for complex reasoning
  • LLM Council for critical decisions

Unique Capability

What This Adds:

  • Automatic model selection based on task phase
  • Best-of-breed capabilities per iteration
  • Fire-and-forget with optimal tool selection
  • Multi-model consensus for critical decisions

When to Use

Perfect For:

  • Complex tasks requiring multiple model strengths
  • Overnight autonomous development
  • Tasks mixing research + implementation + testing
  • Critical decisions needing consensus
  • Large codebase refactoring with validation

Don't Use When:

  • Simple single-model tasks
  • Time-critical (model switching adds latency)
  • Need human oversight at each step

How It Works

ITERATION N:
    |
    +---> Detect Task Phase
    |         |
    |         +---> Research? --> Gemini (search/megacontext)
    |         +---> Media?    --> Gemini (imagen/veo)
    |         +---> Iterate?  --> Codex (yolo/full-auto)
    |         +---> Decide?   --> LLM Council (consensus)
    |         +---> Reason?   --> Claude (agents)
    |
    +---> Execute with Optimal Model
    |
    +---> Check Completion Promise
    |         |
    |         +---> Found? --> EXIT SUCCESS
    |         +---> Not found? --> CONTINUE
    |
    +---> ITERATION N+1 (until max)

Usage

Basic Multi-Model Loop

bash
/ralph-multimodel "Build REST API, research best practices, implement, test, fix failures until all pass"

With Codex Sandbox Mode

bash
CODEX_MODE=sandbox /ralph-multimodel "Experiment with auth refactoring, verify tests"

With LLM Council for Decisions

bash
USE_COUNCIL=true /ralph-multimodel "Design authentication architecture with consensus"

Overnight Task

bash
MAX_ITERATIONS=100 /ralph-multimodel "Complete feature X with documentation, Output <promise>DONE</promise> when finished"

Command Pattern

bash
bash scripts/multi-model/ralph-multimodel.sh "<task>" "<loop_id>"

# Environment options:
MAX_ITERATIONS=30        # Maximum loop iterations
COMPLETION_PROMISE=DONE  # Text signaling completion
USE_COUNCIL=false        # Use LLM Council for decisions
CODEX_MODE=full-auto     # Codex mode: yolo, full-auto, sandbox

Phase Detection & Routing

Phase DetectedKeywordsModel Used
Research"search", "latest", "documentation", "best practices"Gemini
Megacontext"entire codebase", "all files", "architecture overview"Gemini --all-files
Media"diagram", "mockup", "image", "video"Gemini (Imagen/Veo)
Autonomous"fix tests", "debug", "iterate", "prototype"Codex (yolo/full-auto)
Decision"decide", "choose", "architecture decision"LLM Council
ReasoningDefaultClaude

Memory Integration

Results stored per iteration:

  • Gemini: multi-model/gemini/yolo/ralph-{iteration}
  • Codex: multi-model/codex/yolo/ralph-{iteration}
  • Council: multi-model/council/decisions/ralph-{iteration}

State files:

  • ~/.claude/ralph-wiggum/loop-state.json
  • ~/.claude/ralph-wiggum/loop-history.log

Integration with Meta-Loop

Ralph Multi-Model connects to the recursive improvement system:

META-LOOP INTEGRATION:
    |
    +---> PROPOSE (auditors detect issues)
    |         |
    |         +---> Ralph Multi-Model for implementation
    |
    +---> TEST (frozen eval harness)
    |
    +---> COMPARE (baseline vs candidate)
    |
    +---> COMMIT (if improved)
    |
    +---> MONITOR (7-day window)
    |
    +---> ROLLBACK (if regressed)

Real-World Examples

Example 1: Full-Stack Feature

bash
/ralph-multimodel "Build user dashboard:
1. Research React dashboard best practices (Gemini)
2. Generate UI mockup (Gemini Media)
3. Implement frontend components (Claude)
4. Build backend API (Codex yolo)
5. Write tests (Claude)
6. Fix all failing tests (Codex full-auto)
Output <promise>ALL_TESTS_PASS</promise> when done"

Example 2: Codebase Refactoring

bash
MAX_ITERATIONS=50 CODEX_MODE=sandbox /ralph-multimodel "
Refactor auth system:
1. Analyze entire codebase architecture (Gemini megacontext)
2. Identify all auth touchpoints
3. Implement new JWT pattern in sandbox (Codex)
4. Run tests and fix failures
Output <promise>REFACTOR_COMPLETE</promise> when all tests pass"

Example 3: Architecture Decision

bash
USE_COUNCIL=true /ralph-multimodel "
Decide database strategy:
1. Research PostgreSQL vs MongoDB for our use case (Gemini)
2. Get multi-model consensus on approach (Council)
3. Document decision
Output <promise>DECISION_MADE</promise>"

Success Indicators

  • Loop completes with COMPLETION_PROMISE found
  • Optimal model used for each phase
  • Memory contains full iteration history
  • State files show successful completion

Troubleshooting

Loop Never Completes

  • Check COMPLETION_PROMISE is achievable
  • Increase MAX_ITERATIONS
  • Verify task includes clear completion criteria

Wrong Model Selected

  • Be more explicit in task description
  • Use phase keywords (see routing table)

Codex Failures

  • Check Codex CLI is installed
  • Verify ChatGPT Plus subscription active
  • Try different CODEX_MODE

Related Resources

  • Ralph Wiggum Loop: skills/orchestration/ralph-loop/SKILL.md
  • Multi-Model Scripts: scripts/multi-model/
  • Meta-Loop: skills/recursive-improvement/
  • Memory Namespace: docs/MEMORY-NAMESPACE-SCHEMA.yaml

Frequently asked questions

What does the Ralph Multimodel AI skill do?

Ralph Wiggum persistence loop with intelligent multi-model routing (Gemini, Codex, Claude, Council)

Why use Ralph Multimodel on TypingMind?

Because you install it once and use it with any model. Ralph Multimodel is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ralph Multimodel in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/DNYoussef/context-cascade/tree/main/skills/orchestration/ralph-multimodel. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ralph Multimodel?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ralph Multimodel?

As many as you like. As long as a model supports skills, you can use Ralph Multimodel with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ralph Multimodel AI skill free?

Yes. It is published on GitHub by DNYoussef under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇