Claude Code Plugin
Claude Code Plugin
Section titled “Claude Code Plugin”Ralph provides a Claude Code plugin with skills to generate and convert PRDs for autonomous execution.
Installation
Section titled “Installation”-
Add the plugin from marketplace
/plugin marketplace add wiggumdev/ralph -
Install the plugin
/plugin install ralph@ralph-marketplace -
Verify installation
/pluginsYou should see
ralphin the list of installed plugins.
Available Skills
Section titled “Available Skills”| Skill | Description |
|---|---|
ralph-prd | Generate a new PRD from scratch with guided clarifying questions |
ralph-tasks | Convert existing PRD documents to Ralph’s prd.json format |
ralph-prd
Section titled “ralph-prd”Generate a Product Requirements Document from a feature description.
/ralph-prdOr trigger naturally with phrases like:
- “create a ralph prd”
- “write ralph prd for [feature]”
- “plan this feature with ralph”
- “ralph requirements for [feature]“
How It Works
Section titled “How It Works”- Describe your feature — Tell Claude what you want to build
- Answer clarifying questions — Claude asks 3-5 questions with lettered options (respond with “1A, 2C, 3B”)
- Review the PRD — Claude generates structured requirements
- Save to
.plans/prd.json— Ready for Ralph to execute
Example
Section titled “Example”User: /ralph-prd I want to add user authentication to my app
Claude: I'll help create a PRD for user authentication. A few questions:
1. What authentication method? A. Email/password only B. OAuth providers (Google, GitHub) C. Both email and OAuth D. Magic link (passwordless)
2. What's the scope? A. Login/logout only B. Full auth (login, signup, password reset) C. Full auth + profile management D. Other: [specify]
3. Where should auth state live? A. JWT tokens (stateless) B. Server sessions C. Both (hybrid)
User: 1C, 2B, 3A
Claude: [Generates PRD and saves to .plans/prd.json]ralph-tasks
Section titled “ralph-tasks”Convert an existing PRD document to Ralph’s JSON format.
/ralph-tasksOr trigger naturally with phrases like:
- “convert this prd”
- “turn this into ralph format”
- “create prd.json from this”
How It Works
Section titled “How It Works”- Provide the PRD — Paste markdown or reference a file
- Claude converts — Parses requirements into structured JSON
- Save to
.plans/prd.json— Ready for Ralph to execute
Example
Section titled “Example”User: /ralph-tasks Convert this PRD:
## User Dashboard- Show user stats- Display recent activity- Allow profile editing
Claude: [Converts to prd.json format with proper acceptance criteria]PRD Format
Section titled “PRD Format”Both skills output to .plans/prd.json using this structure:
[ { "id": "user-auth", "category": "Authentication", "title": "User Login", "description": "Users can log in with email and password", "passes": false, "acceptance": [ "Login form validates email format", "Invalid credentials show error message", "Successful login redirects to dashboard", "Verify in browser using dev-browser skill" ], "priority": "high", "dependencies": [], "technicalNotes": "Use bcrypt for password hashing", "testStrategy": "Unit tests for validation, integration test for auth flow" }]Required Fields
Section titled “Required Fields”| Field | Description |
|---|---|
category | Feature grouping (e.g., “Authentication”, “API”) |
title | Concise feature name |
description | Detailed behavior description |
passes | Completion status (starts false) |
acceptance | Array of verifiable criteria |
Optional Fields
Section titled “Optional Fields”| Field | Description |
|---|---|
id | Unique identifier for dependencies |
priority | critical, high, medium, low |
dependencies | Array of feature IDs that must complete first |
technicalNotes | Implementation hints |
testStrategy | Testing guidance |
suggestedFiles | Files likely needing changes |
outOfScope | Explicit exclusions |
Best Practices
Section titled “Best Practices”Writing Good Acceptance Criteria
Section titled “Writing Good Acceptance Criteria”For UI features:
"acceptance": [ "Form validates required fields on blur", "Submit button disabled while loading", "Success toast appears after save", "Verify in browser using dev-browser skill"]For API features:
"acceptance": [ "Returns 401 for invalid tokens", "Rate limits to 100 requests/minute", "Verify with unit tests"]Keep Features Small
Section titled “Keep Features Small”Each PRD item should be completable in one Ralph iteration. If a feature is too large, break it into smaller pieces:
// Too big{ "title": "User Authentication System" }
// Better - split into:{ "title": "Login Form UI", "id": "auth-login-ui" }{ "title": "Login API Endpoint", "id": "auth-login-api", "dependencies": ["auth-login-ui"] }{ "title": "Password Reset Flow", "id": "auth-reset", "dependencies": ["auth-login-api"] }Running with Ralph
Section titled “Running with Ralph”After generating a PRD:
# Validate the PRDralph check
# Start autonomous executionralph runRalph reads .plans/prd.json and works through each feature, marking passes: true as criteria are met.