ralph-loop

ralph-loop is a skill for Claude Code from kitchen-engineer42/joharnessburg. It costs 53 tokens per session (2,066 once invoked), scanned A, original, MIT.

An iterative workflow for advancing a project one planned phase at a time. Each cycle reads PLAN.md, completes the next unfinished unit, records the result, and decides whether to continue or stop.

In plain words
What is it for?
Use it to run successive project phases, coordinate individual work units or subagents, update PLAN.md, and pause at clear phase boundaries.
Why use it?
It prevents long projects from drifting away from their plan or attempting too much work at once. Progress remains tied to explicit completion criteria.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the john plugin — 28 skills, 5 commands, 5 agents, 3 hooks 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 kitchen-engineer42/joharnessburg
Claude Code
/plugin install john

Made for: Claude Code.

Or install john, the plugin that ships this one along with the rest of its 28 skills, 5 commands, 5 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/ralph-loop.svg)](https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/ralph-loop)
Your own site
<a href="https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/ralph-loop"><img src="https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/ralph-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00053 $0.02066
Opus 5 $0.00026 $0.01033
Sonnet 5 $0.00011 $0.00413
Haiku 4.5 $0.00005 $0.00207

Measured 6d ago against content hash 10031cf97b64, 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 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 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.

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.

plugins/joharnessburg/skills/ralph-loop/SKILL.md · 129 lines

How it starts

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

ralph-loop

The loop is simple. The discipline is the work.

Every iteration of substantive work in a John session takes the same shape:

  1. Read <project>/PLAN.md. Re-read. Don't trust your memory of it from earlier in the session — context drifts, plans get edited by the user between iterations, and compaction may have happened.
  2. Find the next incomplete unit of work. Usually the next phase whose "Done criteria" aren't met. Within a phase, the next work unit in its subagent matrix.
  3. Plan exactly that unit. Not the whole project. Not the next two phases. The single next unit.
  4. Do the work. Inline for things that fit one context window. Via subagent for things that don't or that benefit from parallelism — see [[subagent-dispatch]].
  5. Update PLAN.md. Mark the unit done. Append decisions to the Log section. If something blocked you, write it as an open question for the user.
  6. Stop or loop. Stop at phase boundaries (clean compaction points, low risk of midway corruption). Loop within a phase if there's clearly more work and you're below ~50% context utilization.

That's it. The rest of this skill is failure modes and nuance.

Templates may override this pattern. The active template can define its own iteration model — substitute different phases, run a different loop shape, override what counts as "one unit." If a template ships loop instructions in project_addon.md, the active provider appendix, or a sibling skill, follow them. This skill is John's default; templates shape the variation. Always check PLAN.md plus the provider memory file (CLAUDE.md or AGENTS.md) before assuming the default applies.

Why this loop

Three reasons it works for John:

  • PLAN.md is the durable contract. When context compacts, the session restarts, or the user opens a fresh John-equipped session tomorrow, PLAN.md carries state forward. The loop's first step makes that contract real.
  • One unit per iteration prevents drift. Trying to plan-then-execute three things at once is where agents lose coherence. One unit, finish it, write it down, move on.
  • The Log section converts "I got stuck" from session-ending failure into a checkpoint. Writing the blocker out is more valuable than burning context retrying.

Read the full file on GitHub · 129 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 · 129 lines · 53 tokens per session scan A 10031cf97b64

Subscribe to this mod's changes

ralph-loop is a skill published in the GitHub repository kitchen-engineer42/joharnessburg (9 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 2,066 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-31.

Related

Other skills, from other repositories