ralph
Original:🇺🇸 English
Translated
1 scripts
Set up and run Ralph Wiggum loop - autonomous AI coding with clean slate iterations, PRD-driven features, and CI quality gates. Use for long-running autonomous coding tasks.
15installs
Sourcekv0906/cc-skills
Added on
NPX Install
npx skill4agent add kv0906/cc-skills ralphTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Ralph Wiggum Loop Skill
Autonomous AI coding pattern that runs agents in iterations with clean context, working on PRD-driven features while maintaining CI green.
Commands
| Command | Action |
|---|---|
| Show help menu |
| Create Ralph infrastructure |
| Build custom PRD interactively |
| Execute the autonomous loop |
/ralph setup
/ralph setupCreate all Ralph files in the current directory.
Steps:
-
Read and copy templates from this skill'sfolder:
templates/- templates/ralph-loop.sh →
./ralph-loop.sh - templates/prd.json →
./prd.json - templates/progress.txt →
./progress.txt - templates/README-RALPH.md →
./README-RALPH.md
- templates/ralph-loop.sh →
-
Make script executable:
chmod +x ralph-loop.sh -
Detect project context and customize:
- Check for → determine package manager (pnpm/npm/yarn)
package.json - Check for → TypeScript project
tsconfig.json - Update test commands in ralph-loop.sh accordingly
- Check for
-
Show completion message with next steps
/ralph init
/ralph initGuide user through creating a custom PRD interactively.
Questions to ask:
- Project name?
- What features do you want to build? (collect 3-5 user stories)
- For each story:
- Title?
- Description?
- Acceptance criteria? (3-5 specific, testable criteria)
Output: Generate with user's input. Offer to create other Ralph files if not present.
prd.json/ralph run
/ralph runExecute the Ralph loop.
Pre-flight checks:
- Verify exists
ralph-loop.sh - Verify exists
prd.json - Show summary:
- Total user stories
- Incomplete stories (where )
passes: false - Max iterations configured
- Ask for confirmation
- Execute:
./ralph-loop.sh
/ralph
(no args)
/ralphShow help menu:
Ralph Wiggum Loop - Autonomous AI Coding
Commands:
/ralph setup - Create Ralph infrastructure in this directory
/ralph init - Create a new PRD from scratch
/ralph run - Run the Ralph loop
What would you like to do?Key Principles
- Clean slate each iteration - Fresh context, no baggage
- One feature at a time - Prevents scope creep
- CI must stay green - Tests and types pass every commit
- Progress tracking - Append to progress.txt each iteration
- Clear stop condition - when all stories pass
<promise>COMPLETE</promise> - Safety limit - Max iterations prevents infinite loops
PRD Quality Checklist
Good user stories are:
- ✅ Specific and scoped (completable in one iteration)
- ✅ Clear acceptance criteria (testable, unambiguous)
- ✅ Properly prioritized (1 = highest)
- ✅ Has initially
"passes": false
Bad user stories are:
- ❌ Too vague ("build the UI")
- ❌ Too large (touches many systems)
- ❌ Unclear criteria ("make it nice")