opencode/skills/ralph-prd/SKILL.md
Generate structured prd.json files for autonomous agent loops (Ralph Wiggum pattern). Use when planning bulk/batch tasks, migrations, refactoring campaigns, or any work that can be decomposed into independent items with verification steps.
npx skillsauth add third774/dotfiles ralph-prdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate prd.json files that define scoped work items for autonomous agent execution. Each item has explicit completion criteria and verification steps.
{
"instructions": "<markdown with context, examples, constraints>",
"items": [
{
"id": "<unique identifier>",
"category": "<task category>",
"description": "<what needs to be done>",
"file": "<target file path>",
"steps": [
"<action step>",
"<verification step>"
],
"passes": false,
"skipped": null
}
]
}
| Field | Purpose |
|-------|---------|
| instructions | Markdown embedded in PRD - transformation examples, docs links, constraints |
| id | Unique identifier (typically file path or task name) |
| category | Groups related items |
| description | Human-readable summary |
| steps | Actions + verification commands |
| passes | false initially, true when complete |
| skipped | null or "<reason>" if task cannot be completed |
PRD Generation Progress:
- [ ] Step 1: Define scope (what files/items are affected?)
- [ ] Step 2: Gather input data (lint output, file list, API changes)
- [ ] Step 3: Design item granularity (per-file, per-error, per-component?)
- [ ] Step 4: Define verification steps (type-check, tests, lint)
- [ ] Step 5: Write instructions (examples, constraints, skip conditions)
- [ ] Step 6: Generate items (script or manual)
- [ ] Step 7: Review sample items
Before generating, resolve these with the user:
The instructions field is markdown that the executing agent reads. Include:
skipped: "<reason>" instead of fixingKeep instructions focused. The agent discovers patterns; instructions provide guardrails.
Each item should have at least one verification step. Common patterns:
"steps": [
"Fix all N lint errors for rule-name",
"Run yarn type-check:go - must pass",
"Run yarn test <path> - if test exists"
]
For test detection, check:
__tests__/<filename>.test.{ts,tsx,js,jsx}<filename>.test.{ts,tsx,js,jsx} sibling__tests__/integration/<filename>.test.*Input: JSON array of lint errors grouped by file
const prd = {
instructions: `## Migration Instructions...`,
items: lintErrors.map(entry => ({
id: entry.filePath.replace(REPO_ROOT + '/', ''),
category: 'migration',
description: `Fix violations in ${path.basename(entry.filePath)}`,
file: entry.filePath,
errorCount: entry.errorCount,
steps: [
`Fix all ${entry.errorCount} lint errors`,
'Run yarn type-check:go - must pass',
...(testExists ? [`Run yarn test ${testPath}`] : [])
],
passes: false,
skipped: null
}))
};
// Bad
"steps": ["Fix the issue", "Make sure it works"]
// Good
"steps": ["Fix lint error on line 42", "Run yarn type-check:go - must pass"]
If some items can't be completed (e.g., requires larger refactor), define skip conditions in instructions so agents mark skipped instead of attempting impossible fixes.
Items that touch many files are harder to verify and resume. Prefer one file per item for file-based migrations.
The executing agent shouldn't have to guess conventions. Specify type casting, naming patterns, import sources.
data-ai
Extract captions and transcripts from YouTube videos for agent context. Tries manual subtitles, then auto-generated, then falls back to audio transcription via Whisper. Use when a user provides a YouTube URL and wants to understand, summarize, reference, or search video content.
tools
Official skill for XcodeBuildMCP. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).
development
Write behavior-focused tests following Testing Trophy model with real dependencies, avoiding common anti-patterns like testing mocks and polluting production code. Use when writing new tests, reviewing test quality, or improving test coverage.
data-ai
Create professional Mermaid diagrams with proper styling and visual hierarchy. Use when creating flowcharts, sequence diagrams, state machines, class diagrams, or architecture visualizations.