ralphmad-loop

ralphmad-loop is a command for Claude Code from hieutrtr/ralphmad. It costs 10 tokens per session (1,649 once invoked), scanned A, original, Apache-2.0.

A command that runs a selected BMAD workflow, a structured software-development process, repeatedly until it reports completion.

In plain words
What is it for?
Use it for product briefs, requirements documents, user-experience design, architecture, sprint planning, implementation work, and test planning.
Why use it?
It removes the need to guide each workflow step by hand or keep restarting it. You can also set a maximum number of attempts.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 ralphmad plugin — 4 commands, 1 hook 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 hieutrtr/ralphmad
Claude Code
/plugin install ralphmad

Made for: Claude Code.

Or install ralphmad, the plugin that ships this one along with the rest of its 4 commands, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/hieutrtr/ralphmad/ralphmad-loop.svg)](https://agentmods.dev/commands/hieutrtr/ralphmad/ralphmad-loop)
Your own site
<a href="https://agentmods.dev/commands/hieutrtr/ralphmad/ralphmad-loop"><img src="https://agentmods.dev/badge/commands/hieutrtr/ralphmad/ralphmad-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,649 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.00010 $0.01649
Opus 5 $0.00005 $0.00825
Sonnet 5 $0.00002 $0.00330
Haiku 4.5 $0.00001 $0.00165

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

Security

Grade A, and why

ralphmad-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/commands/ralphmad-loop.md · 141 lines

How it starts

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

RalphMAD — BMAD Workflow Runner

You are the RalphMAD orchestrator. Follow these steps exactly:

Step 1: Parse Arguments

The first argument is the workflow name. Extract it from: $ARGUMENTS

Valid workflow names: product-brief, prd-create, ux-design, architecture, shard-architecture, epics-stories, implementation-gaps, test-design, testarch-framework, testarch-ci, sprint-planning, testarch-test-design-epic, epic-dev, correct-course

Also extract any --max-iterations N if provided (overrides the config default).

If no valid workflow name is found, display the list of valid workflows with their descriptions and exit.

Step 2: Load Workflow Registry

Read the file: ${CLAUDE_PLUGIN_ROOT}/templates/ralphmad-config.yaml

Find the entry matching the workflow name. Extract:

  • template — the template filename
  • bmad_workflow — the BMAD workflow command to invoke
  • promise — the completion promise string
  • persona — the persona to adopt
  • phase — which SDLC phase this belongs to
  • prerequisites — list of artifact types that must exist
  • produces — what artifact this workflow creates
  • max_iterations — default max iterations (can be overridden by CLI arg)

Step 3: Load Project Config

Read: _bmad/bmm/config.yaml from the current project root.

Extract:

  • project_name — the project name
  • user_name — the user's name
  • planning_artifacts — path to planning artifacts (replace {project-root} with .)
  • implementation_artifacts — path to implementation artifacts (replace {project-root} with .)
  • output_folder — base output path (replace {project-root} with .)

If this file doesn't exist, STOP and tell the user: "This project is not BMAD-enabled. Create _bmad/bmm/config.yaml first. You can use /bmad:bmm:workflows:install to set up BMAD."

Step 4: Check Prerequisites

For each item in the workflow's prerequisites list:

  1. Look up the artifact discovery config in ralphmad-config.yaml under artifact_discovery
  2. Determine the search directory (planning_artifacts or implementation_artifacts)
  3. Use Glob to scan for files matching the artifact's patterns
  4. If ANY prerequisite artifact is missing, STOP and report:
    • Which artifacts are missing
    • Which workflow should be run first to produce them
    • Example: "Missing: prd. Run /ralphmad-loop:ralphmad-loop prd-create first."

Read the full file on GitHub · 141 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 · 141 lines · 10 tokens per session scan A 687481050580

Subscribe to this mod's changes

ralphmad-loop is a command published in the GitHub repository hieutrtr/ralphmad (39 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,649 once invoked, about $0.0001 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.