Skip to main content
ClaudeWave
Skill2.9k repo starsupdated 17d ago

review-pr

This Claude Code skill runs an automated code review workflow against a GitHub pull request by executing the `ralph.reviewer.yml` orchestration loop, which checks out the PR in an isolated environment, runs tests, analyzes the diff, and generates a structured review report. Use it when you need to perform code review automation, verify PR quality, or generate comprehensive review documentation for a specific pull request number or URL.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator /tmp/review-pr && cp -r /tmp/review-pr/.claude/skills/review-pr ~/.claude/skills/review-pr
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Review PR

Run the `ralph.reviewer.yml` orchestration loop against a pull request. The loop checks out the PR in an isolated worktree, runs tests, reviews the diff, and produces a structured report.

## Usage

```
/review-pr <PR number or URL>
```

Accepts: `207`, `#207`, or `https://github.com/.../pull/207`

## Execution

### 1. Parse the PR argument

Extract the PR number from the argument. Strip `#` prefix or extract from URL path.

### 2. Run the reviewer loop

```bash
ralph run -H ralph.reviewer.yml -p "Review PR #<N>"
```

**Bash tool settings:**
- `timeout: 600000` (10 minutes)
- `run_in_background: true`

Use `TaskOutput` with `block: true` to wait for completion.

### 3. Display the report

Read and print `.ralph/REVIEW-REPORT.md` to the conversation.

If the report file doesn't exist (loop failed before the synthesizer hat), check for and display whatever intermediate files exist:
1. `.ralph/review-scope.md` — what was scoped
2. `.ralph/review-verification.md` — test results
3. `.ralph/review-findings.md` — review findings

### 4. Verify cleanup

Check that the review worktree was removed:

```bash
ls -d .worktrees/review-<N> 2>/dev/null
```

- If gone: cleanup succeeded, no action needed.
- If still present: **warn the user** but do NOT force-remove. Say what's there and let them decide.

Also note the presence of intermediate files (`.ralph/review-scope.md`, etc.) — they're useful for debugging but the user may want to clean them up later.

## Error Handling

| Situation | Action |
|-----------|--------|
| Ralph exits non-zero | Display error output. Suggest re-running with `RALPH_DIAGNOSTICS=1` |
| Report file missing | Display intermediate files that do exist (scope, verification, findings) |
| PR argument missing | Ask the user for the PR number |
| PR argument unparseable | Ask the user to provide a bare number, `#N`, or full GitHub URL |

## What This Skill Does NOT Do

- Does NOT validate the PR exists (the scoper hat handles that)
- Does NOT modify any source code (read-only review)
- Does NOT post comments to GitHub
- Does NOT own worktree cleanup (verifies only)
- Does NOT enable diagnostics by default
code-assistSkill

Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.

ralph-e2e-verifierSubagent

Use this agent when you need to run the Ralph orchestrator end-to-end test suite, analyze diagnostic outputs, and generate comprehensive reports of findings. This includes validating backend connectivity, orchestration loop behavior, event parsing, hat collections, memory systems, and error handling. Invoke this agent after making changes to core orchestration logic, before releases, or when debugging integration issues.\\n\\nExamples:\\n\\n<example>\\nContext: User has made changes to the event parsing logic and wants to verify nothing is broken.\\nuser: \"I just modified the event parsing in ralph-core, can you verify everything still works?\"\\nassistant: \"I'll use the ralph-e2e-verifier agent to run the full E2E test suite and analyze the results.\"\\n<Task tool invocation to launch ralph-e2e-verifier>\\n</example>\\n\\n<example>\\nContext: User is preparing a release and needs validation.\\nuser: \"We're preparing to release v0.5.0, please run the E2E tests\"\\nassistant: \"I'll launch the ralph-e2e-verifier agent to run comprehensive E2E tests across all backends and generate a release readiness report.\"\\n<Task tool invocation to launch ralph-e2e-verifier>\\n</example>\\n\\n<example>\\nContext: User notices orchestration issues and wants diagnostics analyzed.\\nuser: \"Ralph seems to be selecting the wrong hats, can you investigate?\"\\nassistant: \"I'll use the ralph-e2e-verifier agent to run E2E tests with diagnostics enabled and analyze the hat selection decisions.\"\\n<Task tool invocation to launch ralph-e2e-verifier>\\n</example>

ralph-loop-runnerSubagent

Use this agent when you need to execute a Ralph orchestration loop end-to-end and verify its completion. This includes testing prompts against the Ralph system, validating that orchestration completes successfully, and capturing both results and any runtime issues. Examples:\\n\\n<example>\\nContext: User wants to test if a prompt works correctly with Ralph orchestration.\\nuser: \"Test if Ralph can handle the prompt 'create a hello world function'\"\\nassistant: \"I'll use the ralph-loop-runner agent to execute this prompt through Ralph and verify completion.\"\\n<Task tool call to ralph-loop-runner agent>\\n</example>\\n\\n<example>\\nContext: User is debugging why a Ralph run failed.\\nuser: \"Run this spec through Ralph and tell me what went wrong\"\\nassistant: \"Let me use the ralph-loop-runner agent to execute this and capture any runtime problems.\"\\n<Task tool call to ralph-loop-runner agent>\\n</example>\\n\\n<example>\\nContext: User wants to validate Ralph behavior after code changes.\\nuser: \"I just modified the event parser, can you run a test loop?\"\\nassistant: \"I'll use the ralph-loop-runner agent to run a complete orchestration loop and verify the changes work correctly.\"\\n<Task tool call to ralph-loop-runner agent>\\n</example>

code-task-generatorSkill

Generates structured .code-task.md files from descriptions or PDD implementation plans. Auto-detects input type, creates properly formatted tasks with Given-When-Then acceptance criteria.

evaluate-presetsSkill

Use when testing Ralph's hat collection presets, validating preset configurations, or auditing the preset library for bugs and UX issues.

find-code-tasksSkill

Lists all code tasks in the repository with their status, dates, and metadata. Useful for getting an overview of pending work or finding specific tasks.

pddSkill

Transforms a rough idea into a detailed design document with implementation plan. Follows Prompt-Driven Development — iterative requirements clarification, research, design, and planning.

playwriterSkill

Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.