ralph-abort

ralph-abort is a skill for Claude Code, Codex from jmagly/aiwg. It costs 14 tokens per session (836 once invoked), scanned A, original, MIT.

A command for stopping a running or paused agent loop, with options to keep its file changes or revert loop commits with Git.

In plain words
What is it for?
Aborting Ralph or agent-loop work, optionally reverting the changes made during its iterations, and creating a partial report.
Why use it?
It gives you a controlled way to stop an iteration process that is taking too long or heading in the wrong direction.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Aborting Ralph or agent-loop work, optionally reverting the changes made during its iterations, and creating a partial report.

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

Made for: Claude Code, Codex.

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-abort

README.md
[![agentmods](https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-abort/github.svg)](https://agentmods.dev/skills/jmagly/aiwg/ralph-abort)
Your own site
<a href="https://agentmods.dev/skills/jmagly/aiwg/ralph-abort"><img src="https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-abort/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-abort

Your own site · 80×15
<a href="https://agentmods.dev/skills/jmagly/aiwg/ralph-abort"><img src="https://agentmods.dev/badge/skills/jmagly/aiwg/ralph-abort.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 836 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 60
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00014 $0.00836
Opus 5 $0.00007 $0.00418
Sonnet 5 $0.00003 $0.00167
Haiku 4.5 $0.00001 $0.00084

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

Security

Grade A, and why

ralph-abort 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 9d 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.

agentic/code/addons/agent-loop/skills/ralph-abort/SKILL.md · 142 lines

How it starts

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

Al Abort

Abort a running or paused agent loop.

Usage

/ralph-abort               # Abort, keep changes
/ralph-abort --revert      # Abort and revert all changes
/ralph-abort --force       # Abort even if no active loop

Parameters

--keep-changes (default)

Stop the loop but keep all file changes made during iterations.

--revert

Revert all changes made during the agent loop using git:

  • Identify commits made during loop (prefix: ralph: iteration)
  • Reset to commit before loop started
  • Warning: This discards work

--force

Abort even if state indicates no active loop (for cleanup).

Your Actions

Standard Abort

  1. Read .aiwg/ralph/current-loop.json
  2. Verify there's an active loop
  3. Mark loop as aborted
  4. Generate partial completion report
  5. Confirm to user

Output:

Agent Loop: ABORTED

Task: {task}
Iterations completed: {N}
Duration: {time}

Changes have been kept. To revert:
  git reset --hard HEAD~{N}

Partial report: .aiwg/ralph/completion-{timestamp}.md

With --revert

  1. Read loop state
  2. Find all ralph: iteration commits from this loop
  3. Confirm with user before reverting
  4. Reset git to pre-loop state
  5. Clean up state files

Confirmation prompt:

This will revert {N} commits:
- ralph: iteration 1 - initial attempt
- ralph: iteration 2 - fixed auth
- ralph: iteration 3 - in progress

Files to be reverted:
- src/auth.ts
- test/auth.test.ts

Type 'yes' to confirm revert:

After revert:

Agent Loop: ABORTED + REVERTED

Reverted {N} commits.
Working directory restored to pre-loop state.

State cleaned: .aiwg/ralph/current-loop.json archived

Error Handling

No active loop:

No active agent loop to abort.

Use --force to clean up stale state files if needed.

Git not available:

Git not available for --revert option.

Loop aborted, but changes cannot be reverted automatically.
Manual cleanup may be needed.

Dirty working directory (for --revert):

Cannot revert: uncommitted changes exist.

Options:
1. Commit or stash changes first
2. Use /ralph-abort without --revert to keep current state

Read the full file on GitHub · 142 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. 9d ago First seen · 142 lines · 14 tokens per session scan A bf163e8c2479

Subscribe to this mod's changes

ralph-abort is a skill published in the GitHub repository jmagly/aiwg (210 stars, last pushed yesterday), licensed MIT. It adds 14 tokens to every session and 836 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.