ralph-wiggum
Skill42 starsChanged 17 days agoMITView on GitHub
Autonomous AI coding loop for unattended development - lets Claude work continuously on tasks while you sleep, with mandatory sandbox enforcement for safety
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- myths-labs/musetheir own version, first seen Nov 6, 2026
- pfeff/claude-skillstheir own version, first seen Nov 1, 2026
- fstandhartinger/ralph-wiggumtheir own version, first seen Oct 8, 2026
- agrimsingh/ralph-wiggum-cursortheir own version, first seen Oct 8, 2026
- talgacapri/pm-ostheir own version, first seen May 23, 2026
- nbirkner/digital-braintheir own version, first seen Apr 12, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- agrimsingh/ralph-wiggum-cursor★ 496same name
- fstandhartinger/ralph-wiggum★ 301same name
- myths-labs/muse★ 38same name
- pfeff/claude-skills★ 3same name
- ai4brands-design/claude-skills★ 2same name
- nbirkner/digital-brain★ 0same name
- talgacapri/pm-os★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- phd-qualifierSkill
- citation-verifierSkill
- scientific-writingSkill
- brainstormingSkill
- elevenlabsSkill
- image-generationSkill
- presentationsSkill
- video-storytellingSkill
- code-reviewerSkill
- tddSkill
- version-controlSkill
- opentrons-absorbance-readerSkill
- opentrons-gripperSkill
- opentrons-heater-shakerSkill
- opentrons-magnetic-blockSkill
- opentronsSkill
- opentrons-temperature-moduleSkill
- opentrons-thermocyclerSkill
- planningSkill
- claude-lightSkill
- emacs-lispSkill
- fairchemSkill
- idaesSkill
- materials-propertiesSkill
- pycalphadSkill
- pymatgenSkill
- python-aseSkill
- python-best-practicesSkill
- python-jaxSkill
- python-multiobjective-optimizationSkill
- python-optimizationSkill
- python-plottingSkill
- python-regression-statisticsSkill
- vaspSkill
- pycseSkill
- elnSkill
- literature-reviewSkill
- materials-databasesSkill
- scientific-data-extractionSkill
- scientific-reviewerSkill
- scientific-workflowsSkill
- design-of-experimentsSkill
- troubleshootingSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When context fills up, the loop restarts Claude with fresh context.
- Distinctive: line 29
Use Ralph Wiggum mode for:
- Distinctive: line 42
Delete files without confirmation
- Very specific: line 43
Read credentials (~/.ssh, ~/.aws)
- Distinctive: line 51
No access to sensitive paths
- Distinctive: line 212
Only for custom sandbox environments you've verified:
- Very specific: line 225
Track progress: - Use IMPLEMENTATION_PLAN.md as shared state
- Distinctive: line 273
Check sandbox detection output.
- Distinctive: line 277
No sensitive path access
- Very specific: line 281
Check ralph.log for errors
- Very specific: line 282
Update IMPLEMENTATION_PLAN.md to unblock
- Very specific: line 283
Add clarifying notes to RALPH_PROMPT.md
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
# Run the init script to scaffold Ralph files
./ralph-init.shThis creates:
RALPH_PROMPT.md- The prompt fed to Claude each iterationIMPLEMENTATION_PLAN.md- Task tracking fileralph.sh- The main loop scriptralph-sandbox.sh- Docker wrapperDockerfile.ralph- Sandbox container definition
2. Define Your Work
# 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
EOF3. Run Ralph (In Sandbox)
# 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 -104. Review Results
# See what Ralph did
git log --oneline
# Check task completion
cat IMPLEMENTATION_PLAN.md
# Verify tests pass
pytestHow 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:
# 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 continueIMPLEMENTATION_PLAN.md
Persistent task tracking (survives context resets):
## 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
| Variable | Default | Description |
RALPH_MAX_ITERATIONS | 0 (unlimited) | Stop after N iterations |
RALPH_MODEL | opus | Claude model to use |
RALPH_COST_LIMIT | 50.00 | Max spend in USD (with cost monitor hook) |
ANTHROPIC_API_KEY | optional | API key (not needed with Claude Code subscription) |
Sandbox Override (Dangerous)
Only for custom sandbox environments you've verified:
RALPH_I_KNOW_WHAT_IM_DOING=sandboxed ./ralph.shBest Practices
Prompt Engineering
- Be specific - Tell Claude exactly what to do each iteration
- Single task focus - "Pick ONE task" prevents context bloat
- Require tests - Include testing in the prompt
- Track progress - Use IMPLEMENTATION_PLAN.md as shared state
Task Decomposition
Break large tasks into small, atomic pieces:
## 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 testsMonitoring
# Watch iterations in real-time
tail -f ralph.log
# Check commits
watch -n 5 'git log --oneline -10'
# Monitor resource usage
docker statsSafety Hooks (Recommended)
Install these hooks for additional safety:
# Block dangerous operations
knowhow hooks install ralph-safety-check
# Track API costs
knowhow hooks install ralph-cost-monitorTroubleshooting
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
- Check
ralph.logfor errors - Update
IMPLEMENTATION_PLAN.mdto unblock - Add clarifying notes to
RALPH_PROMPT.md
Runaway iterations
Set MAX_ITERATIONS or use the cost monitor hook:
./ralph-sandbox.sh . 20 # Stop after 20 iterationsReferences
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.

