ralph
RALPH — Autonomous PRD Implementation
RALPH (Repeated Autonomous Loop for PRD Handling) implements a PRD stored as GitHub issues — autonomously, with TDD, and a code review gate after every iteration.
The Pipeline
This skill is the execution engine for a 4-step coding workflow:
| Step | Command | What It Does |
|---|---|---|
| 1 | /grill-me |
Stress-test your idea with relentless questions before building |
| 2 | /write-a-prd |
Turn the idea into an engineering spec (PRD) as a GitHub issue |
| 3 | /prd-to-issues |
Break the PRD into vertical-slice sub-issues with dependencies |
| 4 | /ralph |
Implement each sub-issue autonomously with TDD + code review |
Steps 1-3 use skills from Matt Pocock. Install them:
npx skills@latest add mattpocock/skills -s grill-me
npx skills@latest add mattpocock/skills -s write-a-prd
npx skills@latest add mattpocock/skills -s prd-to-issues
Setup
After installing this skill, copy the RALPH scripts to your project root:
mkdir -p ralph
cp .agents/skills/ralph/afk-ralph.sh ralph/
cp .agents/skills/ralph/ralph-once.sh ralph/
cp .agents/skills/ralph/prompt.md ralph/
cp .agents/skills/ralph/review-prompt.md ralph/
chmod +x ralph/*.sh
Requirements
- Claude Code CLI
- GitHub CLI (
gh) — authenticated - Docker Desktop with Sandbox support (AFK mode only)
- Git
Usage
/ralph <issue-number> — Human-in-the-loop (start here)
./ralph/ralph-once.sh 42
Implements one sub-issue from PRD #42, then stops for your review. Run again for the next one. Recommended for your first few iterations.
/ralph <issue-number> afk [max-iterations] — Autonomous
./ralph/afk-ralph.sh 42 20
Runs up to 20 iterations inside a Docker sandbox. Each iteration: implement one sub-issue, run tests, commit, code review, close issue. When all sub-issues are done, pushes the branch and opens a PR.
Instructions
When the user invokes this skill:
- Parse arguments: first is the PRD issue number (required), second is mode (
onceorafk, defaultonce), third is max iterations for afk mode (default 20) - If no issue number is provided, ask for it
- Verify
ralph/directory exists at the project root. If not, guide the user through setup (copy scripts from.agents/skills/ralph/) - For
oncemode (default):./ralph/ralph-once.sh <issue-number> - For
afkmode:./ralph/afk-ralph.sh <issue-number> <max-iterations> - Report the result when complete
How It Works
- Scripts fetch the PRD issue and all sub-issues via
ghCLI - Sub-issues are found by searching for
Parent PRD #<number>in their body - Each iteration: Claude picks one open, unblocked sub-issue and implements it using TDD
- Tests must pass before every commit (auto-detected from project config)
- After committing, a code review gate checks for bugs, logic errors, security issues, and architecture violations
- Claude closes the sub-issue on GitHub with a comment linking the commit
- Loop continues until all sub-issues are closed
Sub-Issue Format
Sub-issues created by /prd-to-issues follow this format:
## Parent PRD
#42
## What to build
Description of the work...
## Acceptance criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Blocked by
- #43
Tips
- Start with
/ralph(once mode). Validate the first iteration before going AFK. - Keep sub-issues small. One logical change per sub-issue prevents context rot.
- Use
/grill-mefirst. The more you think before coding, the better RALPH performs. - Use blocked-by. Declare dependencies so RALPH works in the right order.
More from thecraighewitt/skills
shape
Use when you have a rough product idea and want a complete PRD without sitting through an interactive grilling. Claude walks the full decision tree (edge cases, modules, schema, testing, security), self-answers with software-engineering best practices, streams the Q&A live so you can override, and writes the PRD locally with an option to push as a GitHub issue.
39linkedin-outreach
When the user wants to write LinkedIn connection requests, InMails, DM sequences, build a social selling strategy, or use Sales Navigator for prospecting. Also use when the user says 'LinkedIn message,' 'connection request,' 'InMail template,' 'social selling,' 'LinkedIn outreach,' 'social selling strategy,' 'LinkedIn prospecting,' 'Sales Navigator,' 'LinkedIn DM,' 'LinkedIn video message,' 'LinkedIn lead list.' For email outreach, see cold-email. For multi-channel sequences, see outbound-sequence. For profile research, see lead-research.
20video-analysis
When the user wants to analyze a YouTube video's performance, review retention data, diagnose low CTR, or understand why a video underperformed or overperformed. Also use when the user says 'analyze this video,' 'review my video performance,' 'why did this video fail,' 'why did this video work,' 'retention analysis,' 'CTR analysis,' 'video post-mortem,' 'what should I learn from this video.' For full channel health check, see channel-audit. For improving future ideas based on learnings, see idea-generation.
17forecast
When the user wants to forecast sales revenue, build a commit/upside/best-case forecast, calculate weighted pipeline, predict whether they'll hit their number, or run a forecast call. Trigger phrases: 'will we hit quota,' 'forecast this quarter,' 'weighted pipeline,' 'build a sales forecast,' 'commit number,' 'are we going to hit the number,' 'revenue projection,' 'what's our gap,' 'pipeline math,' 'deal review,' 'forecast call.' For pipeline data that feeds the forecast, see pipeline-review. For comp plans tied to quota, see sales-comp.
17referral-intro
When the user wants to ask for a warm introduction, build a referral program, or systematize their referral channel. Also use when the user says 'get me an intro,' 'ask for a referral,' 'write a forwardable email,' 'warm introduction,' 'partner referral,' 'reference request,' 'intro email,' 'leverage my network,' 'referral program,' 'ask for an intro at dinner,' or 'track referrals in CRM.' For cold outreach without a warm path, see cold-email or linkedin-outreach. For sequencing referral asks into a cadence, see outbound-sequence. For running the meeting after a referral intro is made, see discovery-call.
17win-loss-analysis
When the user wants to analyze why deals were won or lost, find patterns across closed deals, or extract competitive intelligence from deal outcomes. Trigger phrases: 'why did we lose that deal,' 'win-loss review,' 'analyze our closed deals,' 'what are we losing to,' 'deal post-mortem,' 'why do we keep losing to [competitor],' 'deal autopsy,' 'competitive losses,' 'why did we win that deal.' For individual call analysis, see call-debrief. For competitive positioning, see competitive-intel. For buyer understanding, see buyer-persona.
17