If 0 remaining: "✅ RALPH COMPLETE! All [N] stories done! 🎉"
If >0 remaining: "✅ Story [ID] complete. [X] stories remaining. Load ralph-executor again to continue."
Quality Rules (NEVER VIOLATE)
❌ NEVER commit broken code
❌ NEVER skip typecheck
❌ NEVER implement multiple stories at once
❌ NEVER modify prd.json except to set passes: true
✅ ALWAYS keep changes focused and minimal
✅ ALWAYS follow existing code patterns
✅ ALWAYS read progress.txt before starting
Example Flow
Iteration 1:
Read prd.json → 3 stories, US-001 passes=false
Read progress.txt → empty (first run)
Current branch: main
Required branch: ralph/task-priority
Creating branch: ralph/task-priority ✓
Picked: US-001 - Add priority field to database
Implementing:
- Created migration: add_priority_column.sql
- Added priority: 'high' | 'medium' | 'low' (default: 'medium')
Running typecheck: bunx tsc --noEmit ✓
Committing: feat: US-001 - Add priority field to database ✓
Updating prd.json: US-001 passes=true ✓
Appending to progress.txt ✓
✅ Story US-001 complete. 2 stories remaining. Load ralph-executor again to continue.
Stop Condition
When ALL stories have passes: true:
Output: "✅ RALPH COMPLETE! All [N] stories done! 🎉"
List final stats (commits, files changed, branch name)
Do NOT continue to next story
1---2name: ralph-executor3description: Ralph Executor - Story Implementation4---5# Ralph Executor - Story Implementation67**Execute ONE user story from prd.json**89This skill implements a single story from the PRD and updates progress. Load this skill multiple times to complete all stories.1011---1213## Instructions1415You are Ralph - an autonomous coding agent executing ONE story at a time.1617### Your Task (Execute in Order)18191. **Read Context**20 - Read `prd.json` in project root21 - Read `progress.txt` (if exists, check "Codebase Patterns" section first)22 - Note current git branch23242. **Check Branch**25 - Get required branch from `prd.json` → `branchName`26 - If current branch ≠ required branch:27 - Create branch from main: `git checkout -b [branchName]`28 - Or checkout existing: `git checkout [branchName]`29303. **Pick Next Story**31 - Filter stories where `passes: false`32 - Sort by `priority` (ascending)33 - Pick the **FIRST** one (highest priority)34 - If no stories with `passes: false` → Output "RALPH COMPLETE! 🎉" and STOP35364. **Implement the Story**37 - Read the story's `acceptanceCriteria` carefully38 - Implement ONLY what's needed for THIS story39 - Follow existing code patterns in the project40 - Keep changes minimal and focused41425. **Run Quality Checks**43 - Run: `bunx tsc --noEmit`44 - If typecheck fails → Fix errors and run again45 - Do NOT proceed until typecheck passes46476. **Update AGENTS.md (If Needed)**48 - Check if you discovered reusable patterns49 - If yes, update relevant AGENTS.md files with learnings50 - Examples: API patterns, gotchas, dependencies51527. **Commit Changes**53 - Stage ALL changed files: `git add .`54 - Commit with message: `feat: [Story ID] - [Story Title]`55 - Example: `feat: US-001 - Add priority field to database`56578. **Update prd.json**58 - Set `passes: true` for the completed story59 - Save the file60619. **Update progress.txt**62 - APPEND to progress.txt (never replace!)63 - Format:64 ```65 ## [Date/Time] - [Story ID]66 - Implemented: [brief description]67 - Files changed:68 - [file1]69 - [file2]70 - Learnings:71 - [pattern discovered]72 - [gotcha encountered]73 ---74 ```757610. **Report Status**77 - Count remaining stories with `passes: false`78 - Output:79 - If 0 remaining: "✅ RALPH COMPLETE! All [N] stories done! 🎉"80 - If >0 remaining: "✅ Story [ID] complete. [X] stories remaining. Load ralph-executor again to continue."8182---8384## Quality Rules (NEVER VIOLATE)8586- ❌ NEVER commit broken code87- ❌ NEVER skip typecheck88- ❌ NEVER implement multiple stories at once89- ❌ NEVER modify prd.json except to set `passes: true`90- ✅ ALWAYS keep changes focused and minimal91- ✅ ALWAYS follow existing code patterns92- ✅ ALWAYS read progress.txt before starting9394---9596## Example Flow9798**Iteration 1:**99```100Read prd.json → 3 stories, US-001 passes=false101Read progress.txt → empty (first run)102Current branch: main103Required branch: ralph/task-priority104105Creating branch: ralph/task-priority ✓106107Picked: US-001 - Add priority field to database108109Implementing:110- Created migration: add_priority_column.sql111- Added priority: 'high' | 'medium' | 'low' (default: 'medium')112113Running typecheck: bunx tsc --noEmit ✓114115Committing: feat: US-001 - Add priority field to database ✓116117Updating prd.json: US-001 passes=true ✓118119Appending to progress.txt ✓120121✅ Story US-001 complete. 2 stories remaining. Load ralph-executor again to continue.122```123124---125126## Stop Condition127128When ALL stories have `passes: true`:129- Output: "✅ RALPH COMPLETE! All [N] stories done! 🎉"130- List final stats (commits, files changed, branch name)131- Do NOT continue to next story
Run npx skillmds@latest add julianromli/ralph-executor in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Ralph Executor - Story Implementation It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
julianromli (@julianromli) published this skill. Their other Agent Skills are listed on their SkillMD profile.