ralph-hats
The ralph-hats skill manages the complete lifecycle of Ralph hat workflow collections, enabling users to create, inspect, validate, and improve YAML-based hat configurations stored in `.ralph/hats/`. Use this skill when working with hat file creation, debugging trigger routing and event flow, explaining workflow topology, or refactoring hats for better orchestration patterns and safer event delegation.
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator /tmp/ralph-hats && cp -r /tmp/ralph-hats/skills/ralph-hats ~/.claude/skills/ralph-hatsSKILL.md
# Ralph Hats Use this skill to operate the full Ralph hat lifecycle for user-authored hat collections. ## Use This Skill For - Creating a new hat collection in `.ralph/hats/` - Inspecting an existing hat collection and explaining its topology - Validating trigger routing, event flow, and completion behavior - Improving or refactoring hats for clearer roles and safer routing - Recommending better orchestration patterns for a Ralph workflow ## Core Assumptions - Core runtime config already lives in `ralph.yml` or another `-c` source. - User-authored hats are stored separately and passed with `-H`. - This skill operates public hat collections, not Ralph built-in presets. ## Workflow 1. If a hats file already exists, read it first and explain the current topology before proposing changes. 2. If creating a new workflow, write it to `.ralph/hats/<name>.yml`. 3. Keep the hats file focused on hats-only data. Leave runtime limits and other core config in the main config file. 4. Validate with `ralph hats validate`. 5. Visualize topology with `ralph hats graph` when the event flow is not trivial. 6. Use `ralph hats show <hat>` when you need to inspect one hat's effective configuration. 7. When the user wants stronger confidence, run a targeted `ralph run -c ... -H ... -p "..."` exercise or provide the exact test command. ## Guardrails - Only use hats-file top-level keys that Ralph accepts today: `name`, `description`, `events`, `event_loop`, `hats`. - In a hats file, `event_loop` is only for hats overlay keys such as `starting_event` and `completion_promise`. - Never use `task.start` or `task.resume` as hat triggers. Ralph reserves those for coordination. Use semantic delegated events like `work.start`, `review.start`, or `research.start`. - Each trigger must route to exactly one hat. - Keep `description` populated on every hat. - Prefer `events:` metadata when custom event names would otherwise be opaque. - Do not write user workflows into `presets/` from this skill. ## Output Expectations - When editing or creating hats, produce the file changes and the validation result. - When only inspecting, produce a concise topology summary, the main risks, and concrete improvement options. ## Read These References When Needed - For current hats schema and supported fields: `references/schema.md` - For command recipes and validation workflow: `references/commands.md` - For pattern and file examples: `references/examples.md`
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.
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>
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>
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.
Use when testing Ralph's hat collection presets, validating preset configurations, or auditing the preset library for bugs and UX issues.
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.
Transforms a rough idea into a detailed design document with implementation plan. Follows Prompt-Driven Development — iterative requirements clarification, research, design, and planning.
Browser automation via Playwriter (remorses) using persistent Chrome sessions and the full Playwright Page API.