.cursor/skills/ralph-wiggum/SKILL.md
Implements Geoffrey Huntley's Ralph Wiggum autonomous iteration technique for managing LLM context. Use when working on long-running tasks, when context is getting polluted, or when you need autonomous development with deliberate context rotation. Treats LLM context like memory - rotates to fresh context before pollution builds up, with state persisting in files and git.
npx skillsauth add Vast-Studios/BlizzSCT ralph-wiggumInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
An autonomous AI development technique that treats LLM context like memory, rotating to fresh context before pollution builds up.
The malloc/free Problem:
malloc() (allocates context)free() - context cannot be selectively releasedRalph's Solution: Deliberately rotate to fresh context before pollution builds up. State lives in files and git, not in the LLM's memory.
Use Ralph Wiggum when:
mkdir -p .ralph
Create these files:
.ralph/progress.md - What's been accomplished:
# Progress
## Completed
- [x] Initial setup
- [x] Basic structure created
## In Progress
- [ ] Feature implementation
## Next Steps
- Complete feature tests
.ralph/guardrails.md - Lessons learned (Signs):
# Guardrails (Signs)
## Sign: Check imports before adding
- **Trigger**: Adding a new import statement
- **Instruction**: First check if import already exists in file
- **Added after**: Duplicate import caused build failure
RALPH_TASK.md - Task definition with checkboxes:
---
task: Build feature X
test_command: "npm test"
---
# Task: Feature X
## Success Criteria
1. [ ] Feature works correctly
2. [ ] Tests pass
3. [ ] Documentation updated
## Context
- Use framework Y
- Follow pattern Z
git init
git add .ralph/ RALPH_TASK.md
git commit -m "ralph: initialize task"
Read State (not from previous context):
RALPH_TASK.md for task definition.ralph/progress.md for what's done.ralph/guardrails.md for lessons learnedWork on Unchecked Criteria:
[ ] items in RALPH_TASK.md.ralph/guardrails.mdCommit Progress:
git add -A
git commit -m "ralph: [criterion] - description"
Update State Files:
.ralph/progress.md with accomplishments.ralph/guardrails.mdMonitor Context:
When approaching token limits:
Commit all work:
git add -A
git commit -m "ralph: checkpoint before rotation"
git push # if remote exists
Signal rotation: Output <ralph>ROTATE</ralph>
Next iteration: Start fresh, read state from files/git
When something fails, add a "Sign" to .ralph/guardrails.md:
### Sign: [Brief description]
- **Trigger**: When this situation occurs
- **Instruction**: What to do differently
- **Added after**: Iteration X - what went wrong
Future iterations read guardrails first and follow them.
Task is complete when:
[ ] in RALPH_TASK.md are [x]<ralph>COMPLETE</ralph>test_command specified)Detect when stuck:
<ralph>GUTTER</ralph>When gutter detected:
.ralph/guardrails.md for patternsApproximate tracking:
Monitor and rotate before 80k tokens.
# Iteration 1
# Read RALPH_TASK.md, progress.md, guardrails.md
# Work on first [ ] item
# Commit: git commit -m "ralph: implement feature X"
# Update progress.md
# Token count: ~45k → continue
# Iteration 2 (after rotation)
# Read RALPH_TASK.md, progress.md, guardrails.md (fresh context)
# Read git history to see previous work
# Work on next [ ] item
# Commit: git commit -m "ralph: add tests"
# Update progress.md
# Token count: ~78k → ROTATE signal
# Iteration 3 (fresh context)
# Read state files again
# Continue from git history
# Complete remaining items
# All [x] → COMPLETE
| File | Purpose | Who Uses It |
|------|---------|-------------|
| RALPH_TASK.md | Task definition + success criteria | You define, agent reads |
| .ralph/progress.md | What's been accomplished | Agent writes after work |
| .ralph/guardrails.md | Lessons learned (Signs) | Agent reads first, writes after failures |
| .ralph/activity.log | Tool call log (optional) | For monitoring |
| .ralph/errors.log | Failure log (optional) | For debugging |
Use these XML-like signals in your output:
<ralph>ROTATE</ralph> - Request context rotation<ralph>COMPLETE</ralph> - Task is complete<ralph>GUTTER</ralph> - Agent is stuck, needs intervention<ralph>WARN</ralph> - Approaching token limit, wrap up current workdevelopment
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.