ralph-loop-init

ralph-loop-init is a skill for Claude Code from TechDufus/oh-my-claude. It costs 64 tokens per session (4,696 once invoked), scanned A, original, MIT.

A setup tool that turns an approved plan into Ralph Loop files. Ralph Loop repeatedly gives an AI one implementation task, checks the result, records progress, and moves to the next task.

In plain words
What is it for?
Use it to initialize a Ralph Loop from an approved plan with files such as prd.json, loop.py, CLAUDE.md, and progress.txt.
Why use it?
It removes the manual work of preparing progress tracking, iteration instructions, quality rules, and the files needed to run a multi-step implementation loop.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is uv run .ralph/loop.py.

Part of the oh-my-claude plugin — 12 skills, 1 command, 7 agents, 8 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TechDufus/oh-my-claude
Claude Code
/plugin install oh-my-claude

Made for: Claude Code.

Or install oh-my-claude, the plugin that ships this one along with the rest of its 12 skills, 1 command, 7 agents, 8 hooks, 2 MCP servers.

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-loop-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/techdufus/oh-my-claude/ralph-loop-init.svg)](https://agentmods.dev/skills/techdufus/oh-my-claude/ralph-loop-init)
Your own site
<a href="https://agentmods.dev/skills/techdufus/oh-my-claude/ralph-loop-init"><img src="https://agentmods.dev/badge/skills/techdufus/oh-my-claude/ralph-loop-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00064 $0.04696
Opus 5 $0.00032 $0.02348
Sonnet 5 $0.00013 $0.00939
Haiku 4.5 $0.00006 $0.00470

Measured 6d ago against content hash 6408b7255b78, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ralph-loop-init scanned grade A with 1 finding 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 6d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run([
plugins/oh-my-claude/skills/ralph-loop-init/SKILL.md · 764 lines

How it starts

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

Ralph Loop Init Skill

Transform approved plans into executable ralph loop infrastructure.

What is Ralph Loop?

Ralph Loop is an autonomous execution system that runs Claude (or compatible tools) in a loop to complete multi-step implementation work. It transforms a PRD into:

  1. prd.json - Machine-readable stories with progress tracking
  2. loop.py - Python UV script that orchestrates iterations with rich output
  3. CLAUDE.md - Per-iteration instructions for the AI
  4. progress.txt - Human-readable execution log
  5. guardrails.md - Quality gates and constraints

Each iteration: read one story, implement it, run quality gates, commit, update progress, exit. The loop script handles the next iteration.

When This Skill Activates

Category Trigger Phrases
Initialize /ralph-loop-init <plan-path>, /ralph-init <plan-path>
Setup setup ralph loop, generate ralph loop
From plan create ralph loop from .claude/plans/...

Workflow

Phase 1: Plan Selection

Identify the approved plan to transform.

If path provided:

/ralph-loop-init .claude/plans/user-authentication.md

Read the plan at the specified path.

If no path provided:

/ralph-loop-init

List available plans in .claude/plans/ (excluding drafts/) and ask user to select one.

Validation:

  • Plan file must exist
  • Plan must have "## Implementation Steps" section
  • Plan should be in .claude/plans/ (not drafts/)

Phase 2: Pre-flight Check

Before generating files, check for existing ralph loop infrastructure.

if [ -d ".ralph" ]; then
    # Existing ralph loop detected
fi

If .ralph/ exists:

Present options to user:

Existing ralph loop detected at .ralph/

Options:
1. "overwrite" - Delete existing .ralph/ and create fresh
2. "resume" - Keep existing, show current progress
3. "cancel" - Abort initialization

Which would you like?

Handle response:

User Says Action
"overwrite", "fresh", "start over" Delete .ralph/, proceed with generation
"resume", "continue", "keep" Show progress from existing prd.json, do not regenerate
"cancel", "abort", "stop" Exit skill

Read the full file on GitHub · 764 lines

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. 6d ago First seen · 764 lines · 64 tokens per session scan A 6408b7255b78

Subscribe to this mod's changes

ralph-loop-init is a skill published in the GitHub repository TechDufus/oh-my-claude (176 stars, last pushed 1mo ago), licensed MIT. It adds 64 tokens to every session and 4,696 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.