A Claude Code skill for generating Product Requirements Documents and running the Ralph autonomous implementation loop.
Ralph is an autonomous coding workflow that:
- Reads your PRD (Product Requirements Document)
- Implements one task at a time
- Runs tests to verify the implementation
- Commits working code automatically
- Repeats until all tasks are complete
| Component | Description |
|---|---|
SKILL.md |
The PRD generator skill for Claude Code |
ralph.sh |
The autonomous implementation loop script |
- Claude Code installed and configured
- A project directory where you want to use Ralph
Run this command in your project directory:
curl -fsSL https://raw.githubusercontent.com/mykcryptodev/ralph-prd/master/install.sh | bashThis installs:
.claude/skills/prd/SKILL.md- the PRD generator skillralph.sh- the autonomous loop script
Run the same install command to update to the latest version.
To remove Ralph from your project:
rm -rf .claude/skills/prd ralph.shAny PRD.md or progress.txt files are not affected.
Use the /prd command or just ask Claude to "create a prd":
/prd add user authentication
Or simply describe what you want to build:
create a prd for a REST API for managing tasks
The skill will:
- Ask clarifying questions if needed
- Generate a structured
PRD.mdin your project root - Create a
progress.txtfile for tracking learnings
After the PRD is created, start Ralph:
./ralph.shRalph will iterate through each user story in your PRD, implementing them one at a time until all tasks are marked complete.
You can optionally specify a maximum number of iterations:
./ralph.sh 25 # Run up to 25 iterations (default is 50)When you use the /prd command, these files are created in your project:
| File | Description |
|---|---|
PRD.md |
The Product Requirements Document with user stories and acceptance criteria |
progress.txt |
Tracks learnings and iteration history for Ralph |
ralph.sh |
Executable script that runs the autonomous implementation loop |
Each iteration of Ralph:
- Reads PRD.md - Finds the first incomplete task (marked
[ ]) - Checks progress.txt - Reviews learnings from previous iterations
- Implements the task - Makes the necessary code changes
- Runs tests - Verifies the implementation works
- On success:
- Marks the task complete (
[x]) in PRD.md - Commits the changes
- Logs what worked in progress.txt
- Marks the task complete (
- On failure:
- Does NOT mark the task complete
- Does NOT commit broken code
- Logs what went wrong in progress.txt
This continues until all tasks are complete or the max iteration limit is reached.
PRDs generated by this skill follow this structure:
# PRD: [Feature Name]
## Introduction
[What this feature does and why it matters]
## Goals
- [Primary and secondary goals]
## User Stories
### US-001: [Story Title]
**Description:** As a [user], I want [capability] so that [benefit].
**Acceptance Criteria:**
- [ ] [Testable criterion]
- [ ] [Another criterion]
- [ ] Typecheck passes (if applicable)
## Non-Goals
- [Things explicitly out of scope]
## Technical Considerations
- [Architecture notes, dependencies, constraints]- Keep user stories small - Each should be completable in one iteration
- Order stories by dependency - Put foundational work first
- Make acceptance criteria testable - Ralph uses these to verify success
- Review the PRD before running Ralph - Adjust anything that seems off
Make the script executable:
chmod +x ralph.shCheck progress.txt - it contains learnings from failed attempts. You may need to:
- Simplify the acceptance criteria
- Break the task into smaller steps
- Add technical context to the PRD
If /prd is not available:
- Verify the skill is installed: check
.claude/skills/prd/SKILL.mdexists in your project - Restart Claude Code after installation
- Reinstall if needed: run the install command again
MIT