ralph

Re-run agent tasks across turns until a completion promise is detected.

69|11|Updated May 16, 2026
One-click install
npx skills add https://github.com/NeverSight/NeverC --skill ralph-neversight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ralph
Source: https://github.com/NeverSight/NeverC/tree/main/.agents/skills/ralph
Command: npx skills add https://github.com/NeverSight/NeverC --skill ralph-neversight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Ralph removes the need for manual multi-turn repetition by repeatedly re-running the same agent task with a fresh context until a verifiable completion signal appears.

Core Features & Use Cases

  • Self-referential completion loop: Uses an AfterAgent-style hook to continue executing the original prompt across turns until a completion promise is detected.
  • Safety controls: Enforces a configurable maximum iteration cap and provides a cancellation command to stop runaway loops.
  • Platform-aware operation: Works natively on Gemini-CLI/Claude Code/OpenCode, and includes a Codex-specific setup helper when native hooks are not guaranteed.

Use cases include long-running implementation work that often stops early, iterative refactors that need repeated verify-debug cycles, and TDD workflows where you want the agent to keep going until tests pass and a completion token is emitted.

Quick Start

Run /ralph "Refactor the authentication module using a test-driven workflow, and output <promise>DONE</promise> only after all tests pass" --completion-promise="DONE" and the loop will keep iterating until it sees the completion promise.

Frequently Asked Questions about ralph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate multi-turn agent loops until a coding task is complete?

Automating multi-turn agent loops requires an AfterAgent hook that re-executes the original prompt with fresh context until a verifiable completion promise is detected, eliminating manual repetition.

What is a completion promise in test-driven development workflows?

A completion promise is a specific XML tag or token emitted by the agent to signal that iterative TDD cycles and refactoring tasks are fully verified and finished.

How do I set up autonomous agent repetition for Codex environments?

Setting up autonomous agent repetition for Codex involves running provided setup scripting to prepare the environment, as native hooks are not guaranteed on that platform.

Does multi-turn agent repetition work with Gemini-CLI and Claude Code?

Multi-turn agent repetition works natively with Gemini-CLI, Claude Code, and OpenCode, applying platform-aware operation to maintain stable context and auditability across long-running workflows.

How can I stop runaway self-correction loops during long-running refactoring?

Stopping runaway self-correction loops requires using a configurable maximum iteration cap to enforce safety limits, alongside a dedicated cancellation command to manually halt execution.