ralph-loop

ralph-loop is a skill for Claude Code from saitarrun/Devforge-ai. It costs 39 tokens per session (2,024 once invoked), scanned A, original, Apache-2.0.

A self-checking work loop for software build tasks. It defines acceptance checks, retries for individual work slices, health checks, and limits that stop repeated failures.

In plain words
What is it for?
Use it to structure build and implementation phases around independently verifiable units of work and defined completion checks.
Why use it?
It helps an automated coding process detect failed work, retry targeted parts, and surface a problem instead of looping indefinitely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devforge-ai plugin — 48 skills, 17 commands, 10 agents shipped together

Good fit Use it to structure build and implementation phases around independently verifiable units of work and defined completion checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saitarrun/devforge-ai/ralph-loop
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 saitarrun/Devforge-ai --skill ralph-loop
Clone the repo
git clone --depth 1 https://github.com/saitarrun/Devforge-ai

Made for: Claude Code.

Or install devforge-ai, the plugin that ships this one along with the rest of its 48 skills, 17 commands, 10 agents.

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/saitarrun/devforge-ai/ralph-loop/github.svg)](https://agentmods.dev/skills/saitarrun/devforge-ai/ralph-loop)
Your own site
<a href="https://agentmods.dev/skills/saitarrun/devforge-ai/ralph-loop"><img src="https://agentmods.dev/badge/skills/saitarrun/devforge-ai/ralph-loop/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-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/saitarrun/devforge-ai/ralph-loop"><img src="https://agentmods.dev/badge/skills/saitarrun/devforge-ai/ralph-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,024 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.
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.00039 $0.02024
Opus 5 $0.00019 $0.01012
Sonnet 5 $0.00008 $0.00405
Haiku 4.5 $0.00004 $0.00202

Measured 8d ago against content hash 7314e4c2c3df, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 8d 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-loop/SKILL.md · 196 lines

How it starts

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

Ralph Loop Skill

A reusable self-diagnosing, self-correcting execution loop for the Build phase. Loaded by sdlc-build.md and sdlc-implement.md. Keeps token windows bounded by pinning only essential context on retries and routing targeted re-work rather than re-running everything.


Concepts

Term Definition
DoD Definition of Done — the acceptance criteria for a slice, taken from its scope.json entry
Slice One independently verifiable unit of work (a row in scope.json.slices[])
Inner loop Per-slice retry logic; runs inside the Build phase for each slice
Outer loop Per-phase retry logic; runs once after qa-engineer's E2E pass
Sentinel Lightweight health check that runs before the verification gateway to catch drift early
Circuit breaker Hard limit on retries; surfaces failure to user rather than looping forever
Fresh context Stripped-down context bundle assembled for each retry — no prior attempt reasoning

Inner Loop (per-slice)

Runs for every slice in scope.json.slices[], in order.

┌─────────────────────────────────────────────────────┐
│  SLICE N  ─  inner loop                             │
│                                                     │
│  1. Load DoD from scope.json slice entry            │
│  2. Assemble context bundle (see below)             │
│  3. SENTINEL CHECK ──► drift? → flag user, abort    │
│  4. fullstack-engineer executes slice               │
│  5. VERIFICATION GATEWAY                            │
│       run: typecheck + slice-scoped tests           │
│       PASS ──► append to implementation-log.md      │
│               advance to next slice                 │
│       FAIL ──► retry_count += 1                     │
│               retry_count ≤ 2? ──► reassemble       │
│                                     fresh context   │
│                                     goto step 3     │
│               retry_count > 2? ──► CIRCUIT BREAKER  │
│                                     surface to user │
└─────────────────────────────────────────────────────┘

Read the full file on GitHub · 196 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. 8d ago First seen · 196 lines · 39 tokens per session scan A 7314e4c2c3df

Subscribe to this mod's changes

ralph-loop is a skill published in the GitHub repository saitarrun/Devforge-ai (5 stars, last pushed 28d ago), licensed Apache-2.0. It adds 39 tokens to every session and 2,024 once invoked, about $0.0002 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 skills, from other repositories

zapier-demo

Walk a new user through setting up their first Zapier action and running it live — the smallest possible win. Asks what app they use, recommends one read action to enable, guides them to mcp.zapier.com to add it, then demonstrates it working in the same chat. Use when the user asks "show me how Zapier works", "set up…

zapier/zapier-mcp · 121 tokens

zapier-status

Check the health of your Zapier MCP setup. Three modes — health check (dashboard view), audit (find waste and duplicates), diagnose (systematic troubleshooting). Use when asking "is my MCP working?", "check my tools", "audit my setup", "what's broken?", or "zapier status".

zapier/zapier-mcp · 66 tokens

zapier-explore

Explore what Zapier MCP can do for the user — interview them about their role and the apps they live in, suggest specific use cases as on-demand prompts, then walk them through enabling the actions to make those use cases real. The natural next step after zapier-demo. Use when the user asks "what else can Zapier do…

zapier/zapier-mcp · 130 tokens

zapier-onboard

Onboard a new user to Zapier MCP — introduce what it can do, walk through authentication, and route into the right flow based on the state of their setup. Use when getting started, troubleshooting connection issues, or when the user asks "what is Zapier MCP", "how do I get started with Zapier", "set me up", "what can…

zapier/zapier-mcp · 92 tokens

agentic-data-science-competition

AI Agent-driven Kaggle competition workflow. Learn from real competition experience: score stabilization patterns, submission troubleshooting, kernel workflows, GPU task delegation, and the spec-driven development approach that achieved top leaderboard positions. Use when: working on any Kaggle competition, analyzing…

Mirannonarbitrable290/agentic-kaggle-skill · 76 tokens

work

Dispatch a tracker ticket into an isolated worktree and drive it autonomously to an open pull request, then stop for review. Pass interactive to brainstorm the ticket with a human before planning it, or a sentence of editorial direction as a rider. Use when asked to work a ticket end-to-end.

mikestankavich/claude-ship-workflow · 0 tokens