ezos26/claude-skills/ralph
Claude Code and agent skill by ezos26/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Ralph 2.0 — Autonomous phased build system. Reads a PRD, generates scoped briefs, dispatches worker agents per phase, runs find→fix→verify gates between phases, checkpoints to disk for cross-session continuity. Usage: /ralph2 [prd-path]
Install
npx vskill@latest install ezos26/claude-skills/ralphSKILL.md
Ralph 2.0 — Phased Autonomous Build System
Orchestrator-driven build system that treats context windows as managed resources. Each phase gets a fresh worker with a scoped brief. Quality gates run between every phase. State checkpoints to disk so sessions can resume cleanly.
When to Use
- Building a multi-phase feature from a PRD
- Any task too large for a single context window
- When you need verified, incremental progress with no accumulated context degradation
Trigger Phrases
/ralph2/ralph2 [prd-path]- "run ralph 2"
- "build this with ralph"
Input Detection
Parse user input for:
- PRD path: explicit path, or auto-detect by globbing
docs/**/*PRD*,docs/**/*prd*,**/*plan*PRD* - Resume: if
.ralph/state.yamlexists in the project root, offer to resume
If no PRD found, ask the user.
Overview
Stage 0: Ground Truth
Before generating any briefs, build a grounded understanding of the codebase. This prevents briefs from referencing files that don't exist or patterns that have changed.
0A: Read Project Context
Read these files (skip if missing):
CLAUDE.md— project constraints, dev commandsAGENTS.md— patterns, conventions, tech stackpackage.json— dependencies, scripts, workspace structure- The PRD file — full implementation plan
Extract:
- Quality gate commands: typecheck, lint, test, build (detect from package.json scripts + CLAUDE.md)
- Project conventions: import patterns, naming, file organization
- Known constraints: isolation rules, API contracts, deployment concerns
0B: Codebase Scanner
Run targeted searches to build a map of what actually exists:
Write the result to .ralph/codebase-map.md:
0C: Initialize State
Create .ralph/state.yaml:
Stage 1: Decompose PRD into Phase Briefs
Read the PRD. For each phase/section, generate a self-contained brief.
Brief Generation Rules
- One brief per phase — each brief maps to one worker agent invocation
- Self-contained — the worker never reads the PRD. Everything it needs is in the brief.
- Grounded — file paths come from codebase-map.md (verified to exist), not assumed
- Bounded — clear "done when" criteria the gate can check deterministically
- Context-aware — if Phase 2 depends on Phase 1, the Phase 2 brief states what Phase 1 produced
Brief Template
Write each brief to .ralph/briefs/{N}-{slug}.md:
Update State
After generating all briefs, update .ralph/state.yaml:
Complexity scoring:
- Simple (schema-only, config-only, single file): typecheck gate only
- Medium (2-3 files, clear patterns): find→fix→verify gate
- Complex (4+ files, cross-cutting, business logic): find→fix→verify gate
Present Plan to User
Before executing, show the user:
Wait for user confirmation before executing.
Stage 2: Execute Phases
For each phase in order:
Step 2.1: Dispatch Worker
Launch a general-purpose agent with the phase brief as its prompt.
The worker:
- Reads referenced files
- Makes the changes described in the brief
- Does NOT run typecheck or tests — that's the gate's job
- Returns a summary of what it changed
After the worker completes, note which files were changed.
Step 2.2: Deterministic Gate
Run quality checks BEFORE spending tokens on AI audit:
If typecheck fails:
- Read the error output
- Fix the errors directly (orchestrator fixes these — they're deterministic)
- Re-run typecheck
- Max 3 attempts, then escalate to user
Also run lint and test if available. These are hard gates — must pass.
Phase-specific commands: After standard gates pass, run any phase-specific verification commands from the PRD. Common examples:
| Phase type | Command to run | Why | |
|---|---|---|---|
| Schema/migration | {db:generate command} (e.g. pnpm db:generate) | Schema changes WITHOUT a migration = deploy blocker | |
| New CSS classes referenced | Grep the stylesheet to verify all referenced classes exist | Missing classes = silent rendering failures | |
| New env vars added | Verify they appear in both env validation AND .env.example | Missing vars = runtime crash in deploy | |
| New Trigger.dev jobs | Verify task ID strings match between trigger file and worker dispatch | Mismatched IDs = jobs never fire |
The PRD often lists these in its "Verify" sections — execute them, don't skip them. This is the #1 source of deploy blockers when omitted.
If phase complexity is `simple` and deterministic gates pass → skip to Step 2.6 (commit).
Step 2.3: Audit — FIND Only
Launch 2 Explore agents in parallel (run_in_background: true). These agents only read and report. They do NOT write code.
Agent 1: Integration Auditor
Agent 2: Gotcha Hunter
Parallel Product Builds — Extra Audit Scope
When the PRD builds a second product type alongside an existing one (e.g., "sale readiness" alongside "activation"), both audit agents must also verify:
- Email templates: Does the notification use a product-appropriate template or template model? Reusing activation email metrics (e.g.,
keep_count/drop_count) for a different product type will confuse customers. - Display names: Every user-visible string derived from enum values (tier names, strategy labels, status messages) must have a display name mapping — raw enum values like
portfolio_deepmust NOT appear in PDFs, emails, or UI. - PDF sections: If the new product has different per-item fields than the existing product, verify all fields are surfaced consistently (e.g., don't show
reasonin 3 of 4 section types but omit it from the 4th). - Shared pipelines: If the new product reuses an existing pipeline (e.g., data collection), verify that product-specific parameters (tiers, limits, feature flags) are mapped correctly — not silently cast with
as. - DB migrations: Verify that schema changes have corresponding migration files generated.
Step 2.4: Fix — Dedicated Fix Agent
After both audit agents report back, consolidate all findings.
If zero findings from both agents → skip to Step 2.6 (commit).
Otherwise, launch a single general-purpose agent with the consolidated findings:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ralph/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ezos26/claude-skills/ralph)