ralph-loop

ralph-loop is a command for coding agents from eddiebelaval/squire. It costs 17 tokens per session (824 once invoked), scanned A, original, MIT.

A work-verification command that checks whether recent development changes actually work before they are marked complete. It chooses checks based on what changed, such as pages, APIs, components, databases, builds, or links.

In plain words
What is it for?
Use it after implementing a feature, before committing significant changes, or between phases of a larger task to run relevant checks.
Why use it?
It catches missing tests, broken pages, build errors, and other obvious problems before unfinished work is treated as done.

Command

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.

agentmods
npx agentmods add commands/eddiebelaval/squire/ralph-loop
Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

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/commands/eddiebelaval/squire/ralph-loop.svg)](https://agentmods.dev/commands/eddiebelaval/squire/ralph-loop)
Your own site
<a href="https://agentmods.dev/commands/eddiebelaval/squire/ralph-loop"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/ralph-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 824 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 $0.00017 $0.00824
Opus 5 $0.00009 $0.00412
Sonnet 5 $0.00003 $0.00165
Haiku 4.5 $0.00002 $0.00082

Measured yesterday against content hash afaa361c1e7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

commands/ralph-loop.md · 136 lines

How it starts

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

Ralph Loop - Work Verification

Named after Ralph Wiggum — catches the obvious mistakes before they embarrass you.

Purpose

Implements a feedback loop that confirms work was executed properly. Run after completing a chunk of work to verify it's actually working before moving on.

When to Use

  • After completing a feature or set of changes
  • Before marking a task as complete
  • Before committing significant changes
  • After each phase of a multi-phase implementation

Process

1. Identify What Changed

Check git diff for modified files and categorize them:

  • Pages/Routes — New or modified page components
  • API Routes — Backend endpoints
  • Components — UI components
  • Database — Migrations, schema changes
  • Config — Configuration files, environment

2. Run Appropriate Checks

Context Verification Method
New pages/routes Navigate with Playwright, check 200 status, no console errors
API routes Call endpoints, verify response shape
Database changes Run migration, verify schema
Components Check TypeScript, run relevant tests
Builds npm run build, verify no errors
Links Check all hrefs resolve
Types npm run typecheck or npx tsc --noEmit

3. Report Results

RALPH LOOP VERIFICATION
=======================

Context: [what was worked on]
Files Changed: [count]

Checks Performed:
  [x] TypeScript compilation
  [x] Build succeeds
  [x] Routes accessible
  [ ] Console errors (FAILED - see below)

Result: PASS / FAIL

Issues Found:
  - [specific issue with file:line if applicable]

Suggested Fixes:
  - [actionable fix]

4. Fix or Escalate

  • Auto-fix simple issues: Missing imports, type errors with obvious fixes
  • Report complex issues: For user decision or further investigation

Usage

After completing work:

/ralph-loop

With specific scope:

/ralph-loop pages
/ralph-loop api
/ralph-loop build
/ralph-loop types

Read the full file on GitHub · 136 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. yesterday First seen · 136 lines · 17 tokens per session scan A afaa361c1e7a

Subscribe to this mod's changes

ralph-loop is a command published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 20d ago), licensed MIT. It adds 17 tokens to every session and 824 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-09-03.

Related

Other commands, from other repositories

verify

Grade work that already exists and decide whether it can merge. Runs the project's current unit, integration, and E2E suites plus security scanning and type checking, scores every dimension 0-10, and returns a merge verdict with a VERIFIED-vs-CLAIMED evidence manifest. Writes no test files and edits no source. Use…

yonatangross/orchestkit · 92 tokens

expect

Diff-aware AI browser testing — reads the git diff, maps changes to affected pages via the route map, generates a targeted test plan, and executes it via agent-browser (Rust daemon + CDP, ARIA-tree-first) with pass/fail reporting. Use when testing UI changes, verifying PRs before merge, or running regression checks on…

yonatangross/orchestkit · 73 tokens

paul:verify

Guide manual user acceptance testing of recently built features.

ChristopherKahler/paul · 14 tokens

cover

Generate tests that do not exist yet. Analyzes coverage gaps, then writes and runs new test files across three tiers (unit, integration via testcontainers, Playwright E2E), one test-generator agent per tier, healing failures for up to 3 iterations. Use when code has no tests or when raising coverage after…

yonatangross/orchestkit · 95 tokens

spec-check

Audit GWT acceptance test specs for implementation leakage. Optionally provide a specific file path.

swingerman/engineer · 21 tokens

drift

Detectar divergencias entre specs Gherkin e implementación (spec drift). Usa cuando el usuario dice "spec drift", "drift detection", "spec vs código", "conformance check", "spec deviation", "código no matchea specs", "implementation diverged", "spec vs implementation", "verificar specs". Compara features implementadas…

doncheli/don-cheli-sdd · 81 tokens