Ralph Wiggum logo

Ralph Wiggum

Community
jkitchin
ralph-wiggum

Autonomous AI coding loop for unattended development - lets Claude work continuously on tasks while you sleep, with mandatory sandbox enforcement for safety

Overview

Publisherjkitchin
Repositoryknowhow
Skill nameralph-wiggum
Stars
45
Forks
9
Bundled files
19
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.

  • 19 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Ralph Wiggum 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/jkitchin/knowhow/tree/main/skills/development/ralph-wiggum
  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/jkitchin/knowhow.git /tmp/knowhow
mkdir -p .claude/skills
cp -r /tmp/knowhow/skills/development/ralph-wiggum .claude/skills/ralph-wiggum
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ralph Wiggum 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 Wiggum 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 Wiggum 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 Mode

"Me fail English? That's unpossible!" - Ralph Wiggum

Ralph Wiggum Mode is an autonomous AI coding loop that enables Claude Code to work continuously on tasks without human intervention. Named after the persistently optimistic Simpsons character, this technique lets Claude work "overnight shifts" while you sleep.

Key Principle

Progress persists in files and git, not in the LLM's context window.

When context fills up, the loop restarts Claude with fresh context. The new instance picks up from the filesystem state (your code, git history, and task tracking files).

When to Use This Skill

Use Ralph Wiggum mode for:

  • Overnight feature development
  • Bug bashes (fixing multiple issues)
  • Test coverage improvement
  • Refactoring large codebases
  • Documentation generation
  • Any multi-step task you'd like completed while away

Security Model

CRITICAL: Ralph requires a sandboxed environment.

Ralph uses --dangerously-skip-permissions which can:

  • Delete files without confirmation
  • Read credentials (~/.ssh, ~/.aws)
  • Make network requests
  • Run arbitrary commands

Ralph will REFUSE to start unless it detects:

  • Container environment (Docker/Kubernetes)
  • Network isolation (cannot reach internet)
  • Non-root user
  • No access to sensitive paths

Quick Start

1. Initialize Ralph in Your Project

bash
# Run the init script to scaffold Ralph files
./ralph-init.sh

This creates:

  • RALPH_PROMPT.md - The prompt fed to Claude each iteration
  • IMPLEMENTATION_PLAN.md - Task tracking file
  • ralph.sh - The main loop script
  • ralph-sandbox.sh - Docker wrapper
  • Dockerfile.ralph - Sandbox container definition

2. Define Your Work

bash
# Create specs directory for requirements
mkdir -p specs

# Write your requirements
cat > specs/my-feature.md << 'EOF'
## Feature: User Dashboard

### Requirements
- Show user's recent activity
- Display usage statistics
- Allow date range filtering
EOF

# Update the implementation plan
cat > IMPLEMENTATION_PLAN.md << 'EOF'
## Tasks

- [ ] Create Dashboard component
- [ ] Add activity feed API endpoint
- [ ] Implement date range picker
- [ ] Write tests for dashboard
EOF

3. Run Ralph (In Sandbox)

bash
# Recommended: Use the Docker wrapper
./ralph-sandbox.sh

# With iteration limit
./ralph-sandbox.sh . 20

# Check progress from another terminal
tail -f ralph.log
git log --oneline -10

4. Review Results

bash
# See what Ralph did
git log --oneline

# Check task completion
cat IMPLEMENTATION_PLAN.md

# Verify tests pass
pytest

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                    EXTERNAL BASH LOOP                            │
│                                                                  │
│   while :; do                                                    │
│       ┌─────────────────────────────────────────────────┐       │
│       │           CLAUDE SESSION                         │       │
│       │                                                  │       │
│       │  1. Read RALPH_PROMPT.md                        │       │
│       │  2. Check IMPLEMENTATION_PLAN.md                │       │
│       │  3. Pick a task, implement it                   │       │
│       │  4. Run tests, commit changes                   │       │
│       │  5. Context fills → Session ends                │       │
│       └─────────────────────────────────────────────────┘       │
│                           ↓                                      │
│       Git commit saves progress                                  │
│       Loop restarts with fresh context                           │
│   done                                                           │
└─────────────────────────────────────────────────────────────────┘

Files Reference

RALPH_PROMPT.md

The prompt loaded each iteration. Customize this for your use case:

markdown
# Ralph Mode Instructions

You are operating in autonomous Ralph mode.

## Each Iteration
1. Read IMPLEMENTATION_PLAN.md and git log
2. Pick ONE pending task, mark it in-progress
3. Implement fully with tests
4. Mark complete, commit changes

## Rules
- Never skip tests
- Commit after each meaningful change
- If blocked, document why and continue

IMPLEMENTATION_PLAN.md

Persistent task tracking (survives context resets):

markdown
## Tasks

- [x] Task 1 (completed in iteration 1)
- [x] Task 2 (completed in iteration 2)
- [ ] Task 3 (in progress)
- [ ] Task 4 (pending)

ralph.sh

The main loop with sandbox enforcement. Key features:

  • Refuses to run outside sandbox
  • Configurable iteration limits
  • Git commits after each iteration
  • Graceful shutdown handling

ralph-sandbox.sh

Docker wrapper that:

  • Builds sandbox image if needed
  • Mounts only project directory
  • Disables network (--network none)
  • Sets resource limits (memory, CPU, PIDs)
  • Drops all capabilities

Configuration

Environment Variables

VariableDefaultDescription
RALPH_MAX_ITERATIONS0 (unlimited)Stop after N iterations
RALPH_MODELopusClaude model to use
RALPH_COST_LIMIT50.00Max spend in USD (with cost monitor hook)
ANTHROPIC_API_KEYoptionalAPI key (not needed with Claude Code subscription)

Sandbox Override (Dangerous)

Only for custom sandbox environments you've verified:

bash
RALPH_I_KNOW_WHAT_IM_DOING=sandboxed ./ralph.sh

Best Practices

Prompt Engineering

  1. Be specific - Tell Claude exactly what to do each iteration
  2. Single task focus - "Pick ONE task" prevents context bloat
  3. Require tests - Include testing in the prompt
  4. Track progress - Use IMPLEMENTATION_PLAN.md as shared state

Task Decomposition

Break large tasks into small, atomic pieces:

markdown
## Bad
- [ ] Implement user authentication

## Good
- [ ] Create User model with email, password_hash
- [ ] Add POST /api/register endpoint
- [ ] Add POST /api/login endpoint
- [ ] Add password reset flow
- [ ] Add JWT middleware
- [ ] Write auth tests

Monitoring

bash
# Watch iterations in real-time
tail -f ralph.log

# Check commits
watch -n 5 'git log --oneline -10'

# Monitor resource usage
docker stats

Safety Hooks (Recommended)

Install these hooks for additional safety:

bash
# Block dangerous operations
knowhow hooks install ralph-safety-check

# Track API costs
knowhow hooks install ralph-cost-monitor

Troubleshooting

Ralph won't start

Check sandbox detection output. You need at least 3 checks passing:

  • Container detected
  • Network isolated
  • Non-root user
  • No sensitive path access

Ralph gets stuck on a task

  1. Check ralph.log for errors
  2. Update IMPLEMENTATION_PLAN.md to unblock
  3. Add clarifying notes to RALPH_PROMPT.md

Runaway iterations

Set MAX_ITERATIONS or use the cost monitor hook:

bash
./ralph-sandbox.sh . 20  # Stop after 20 iterations

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ralph Wiggum AI skill do?

Autonomous AI coding loop for unattended development - lets Claude work continuously on tasks while you sleep, with mandatory sandbox enforcement for safety

Why use Ralph Wiggum on TypingMind?

Because you install it once and use it with any model. Ralph Wiggum 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 Wiggum in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jkitchin/knowhow/tree/main/skills/development/ralph-wiggum. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ralph Wiggum?

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 Wiggum?

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

Is the Ralph Wiggum AI skill free?

Yes. It is published on GitHub by jkitchin 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 👇