ralph-hats

ralph-hats is a skill for Claude Code, Codex from mikeyobrien/ralph-orchestrator. It costs 59 tokens per session (631 once invoked), scanned A, original, MIT.

A workflow for creating and managing Ralph hat collections, which are groups of roles that route work through an event-driven process. It also checks and visualizes how those roles connect.

In plain words
What is it for?
Use it to create, inspect, validate, explain, or improve files in .ralph/hats/, including their event flow and role configuration.
Why use it?
It helps reveal broken routing, unclear responsibilities, and completion problems before a multi-role Ralph run is used.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the ralph-orchestrator plugin — 3 skills shipped together

Good fit Use it to create, inspect, validate, explain, or improve files in .ralph/hats/, including their event flow and role configuration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mikeyobrien/ralph-orchestrator/ralph-hats
About the project

Ralph Orchestrator is a framework that repeatedly runs AI-agent tasks until they finish or reach an iteration limit. Developers use it to coordinate autonomous coding work through command-line, web-dashboard, and MCP-server interfaces, with state managed per workspace. The catalogue entries provide agent skills, agents, instructions, and plugins for operating Ralph.

mikeyobrien/ralph-orchestrator · 3,133 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mikeyobrien/ralph-orchestrator --skill ralph-hats
Clone the repo
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator

Made for: Claude Code, Codex.

Or install ralph-orchestrator, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ralph-hats

README.md
[![agentmods](https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/ralph-hats/github.svg)](https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/ralph-hats)
Your own site
<a href="https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/ralph-hats"><img src="https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/ralph-hats/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ralph-hats

Your own site · 80×15
<a href="https://agentmods.dev/skills/mikeyobrien/ralph-orchestrator/ralph-hats"><img src="https://agentmods.dev/badge/skills/mikeyobrien/ralph-orchestrator/ralph-hats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00631
Opus 5 $0.00030 $0.00316
Sonnet 5 $0.00012 $0.00126
Haiku 4.5 $0.00006 $0.00063

Measured 13d ago against content hash ee0e58d59ab0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ralph-hats scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ralph-hats/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 66 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 66 lines · 59 tokens per session scan A ee0e58d59ab0

Subscribe to this mod's changes

ralph-hats is a skill published in the GitHub repository mikeyobrien/ralph-orchestrator (3,133 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 631 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.