ralphing
Original:🇺🇸 English
Translated
1 scripts
This skill should be used when setting up or running the Ralph autonomous coding loop that iterates through stories, runs tests, commits, and logs learnings.
3installs
Sourcenateberkopec/dotfiles
Added on
NPX Install
npx skill4agent add nateberkopec/dotfiles ralphingTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Ralphing
Ralph is an autonomous AI coding loop that ships features while you sleep. Each iteration runs in a fresh context window, while memory persists through git history and text files.
When to Use
When the user wants to implement a multi-story feature autonomously, or mentions "ralph", "ralphing", or "autonomous loop".
Workflow
Step 1: Get the PRD
The user provides a PRD file, or you help them create one. Ask:
- Do you have a PRD already, or should we create one together?
- What's the repo path?
- What's the test command? (e.g., ,
bundle exec rake)npm test - How many iterations max? (default: 25)
PRD Format
markdown
# PRD
Branch: `<branch-name>`
## Stories
### US-001: <Story title>
- [ ] <Acceptance criterion>
- [ ] <Acceptance criterion>
### US-002: <Story title>
- [ ] <Acceptance criterion>Guidelines for stories:
- Small: Must fit in one context window
- Explicit criteria: Avoid vague ("Users can log in"), prefer specific checks
- Story order = priority (first = highest)
Note: Ralph is typically run in a git worktree. If already on the correct branch (or detached HEAD), the branch checkout is skipped.
Step 2: Start the Loop
bash
~/.claude/skills/ralphing/assets/ralph.sh start <repo_path> <prd.md> [max_iterations] [test_cmd]This returns a session directory (e.g., ) and runs the loop in the background.
/tmp/ralph/ABC123-...Step 3: Monitor Progress
Poll the session status periodically:
bash
~/.claude/skills/ralphing/assets/ralph.sh status <ralph_dir>This outputs:
- :
status,running, orcompletefailed - : current/max iterations
iteration - Full contents of
progress.txt
Keep polling until status is or .
completefailedHow the Loop Works
- copies PRD, generates prompt, checks out branch (if needed), and spawns background process
start - Background loop: agent implements story -> commits -> runs tests
- If tests fail, reverts commit and retries (progress.txt preserved)
- Exits when agent signals or max iterations reached
<promise>COMPLETE</promise> - Parent agent polls to observe progress without blocking
status
Resources
- - the loop script (start/status commands)
assets/ralph.sh - - prompt template (uses
assets/prompt.mdplaceholder)<RALPH_DIR>