ralph-script
Original:🇺🇸 English
Translated
1 scripts
Add a Ralph Wiggum autonomous loop to the current project. Creates ralph-loop.sh and prompt.md files that enable Claude to autonomously work through a PLAN.md task list. Use when the user says "/ralph-script", "add ralph loop", "set up ralph script", "add autonomous loop", or wants to bootstrap the Ralph Wiggum loop files into a project. Supports a --force flag to skip interactive checks.
12installs
Added on
NPX Install
npx skill4agent add petestewart/claude-skills ralph-scriptTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Ralph Script
Add and to the current project from bundled templates.
ralph-loop.shprompt.mdWorkflow
1. Parse arguments
Check if the user passed . If so, set and skip all interactive checks in step 2.
--forceFORCE=true2. Check referenced files
The ralph loop references these files at runtime:
| File | How it's used | Required format |
|---|---|---|
| Loop continues while | Must contain |
| Read for troubleshooting context | Any markdown |
| Read for troubleshooting context | Any markdown |
| Read for troubleshooting context | Any markdown |
For each file, check if it exists in the project root.
If a file is missing (and not ): Warn the user. List all missing files in a single message. Do not offer to create them — just note they will need to exist before running the loop.
--forceIf PLAN.md exists: Read it and verify it contains style checkboxes. If it uses a different task format (numbered lists, markers, other patterns), use AskUserQuestion to ask:
- [ ]TODO:- "PLAN.md uses [detected format] instead of checkboxes. The ralph-loop.sh script checks for
- [ ]to determine if tasks remain. Should I: (a) update the script's grep pattern to match your format, or (b) leave as-is (you'll convert PLAN.md yourself)?"- [ ] - If (a): note the needed grep pattern change for step 3.
If prompt.md references files that don't exist (and not ): Optionally ask whether to remove those references from the generated prompt.md. Only ask if 2+ referenced troubleshooting files are missing — if just one is missing, simply warn.
--force3. Copy templates
Copy the template files from this skill's assets directory into the project root:
- →
assets/ralph-loop.sh./ralph-loop.sh - →
assets/prompt.md./prompt.md
If either file already exists in the project, use AskUserQuestion to confirm overwrite (unless ).
--forceApply any modifications determined in step 2 (e.g., adjusted grep pattern).
Make executable:
ralph-loop.shbash
chmod +x ralph-loop.sh4. Report
Print a summary:
- Files created
- Any warnings about missing referenced files
- How to run:
./ralph-loop.sh - Remind that is optional but provides colored output with context usage tracking
jq