ralph

An autonomous execution loop for a clearly defined coding task. It lets an agent work through repeated build-and-check cycles with stated limits and safety stops.

In plain words
What is it for?
Use it for well-defined tasks that need several rounds of implementation and verification, while retaining the ability to stop the process.
Why use it?
It reduces the need to supervise every small step while keeping limits on iterations, repeated failures, destructive actions, and deployment.

Skill for Claude CodeCodex

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 skills/ozmasterai/torus-framework/ralph
Any agent
npx skills add OZmasterAI/Torus-Framework --skill ralph
Clone the repo
git clone --depth 1 https://github.com/OZmasterAI/Torus-Framework

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 748 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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 $0.00000 $0.00748
Opus 5 $0.00000 $0.00374
Sonnet 5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

Measured 2d ago against content hash ebd94b99ec84, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

ralph scanned grade C 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 2d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **No destructive actions**: Gate 2 still enforced — no rm -rf, force push, reset --hard
dormant/skills/standalone/ralph/SKILL.md · 66 lines

How it starts

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

/ralph — Autonomous Execution Loop

When to use

When the user says "ralph", "autonomous", "auto-pilot", or wants extended unattended execution on a well-defined task.

Safety Circuit Breakers (non-negotiable)

Before entering the loop, state these limits to the user:

  • Max iterations: 10 build-verify cycles (then stop and report)
  • Error ceiling: 3 consecutive failures on the same step triggers a full stop
  • No destructive actions: Gate 2 still enforced — no rm -rf, force push, reset --hard
  • No deploys: Autonomous mode NEVER deploys. Use /deploy manually.
  • Memory saves: Save to memory every 3 iterations or after any significant discovery
  • User can interrupt: Remind the user they can stop you at any time

The Autonomous Loop

Phase 0: SETUP

  1. Confirm the task is clearly defined. If ambiguous, ask for clarification BEFORE entering the loop.
  2. search_knowledge("[task description]") — check for relevant history
  3. State your plan and circuit breaker limits to the user
  4. Get explicit user approval: "Starting autonomous mode. I'll work through up to 10 iterations. Ready?"

Phase 1: PLAN (iteration 0)

  1. Enter Plan Mode, explore the codebase, write the plan
  2. Break the task into ordered sub-tasks (numbered checklist)
  3. Exit Plan Mode for user approval
  4. Save plan to memory

Phase 2: EXECUTE (iterations 1-N)

For each sub-task in order:

  1. Check: Is this sub-task still relevant? (Prior steps may have changed things)
  2. Build: Implement the sub-task
  3. Test: Run relevant tests or verification 3b. Visual Verify (if UI task): Run /browser verify <url> — screenshot must confirm correctness before marking done
  4. Record: If tests pass, mark sub-task done. If tests fail:
    • Increment failure counter
    • record_attempt("[error]", "[strategy]") — log the attempt
    • Try an alternative approach
    • If 3 consecutive failures: STOP (see Phase 3)
  5. Save: Every 3 iterations: remember_this("[progress so far]", "ralph autonomous", "type:learning")
  6. Next: Move to next sub-task

Read the full file on GitHub · 66 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. 2d ago First seen · 66 lines · 0 tokens per session scan C ebd94b99ec84

Subscribe to this mod's changes

ralph is a skill published in the GitHub repository OZmasterAI/Torus-Framework (5 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 748 tokens. A static security scan graded it C with 1 finding (recursive force delete). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens