Iterative task completion loop with Definition of Done verification.

MITAuto-check: notesAgent Workflows

Install Ralph

skills CLI
$ npx skills add team-attention/hoyeon --skill ralph -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install team-attention/hoyeon ralph --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/team-attention/hoyeon.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ralph .claude/skills/ralph && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ralph
GitHub stars
173
Token cost
~1.6k tokens
SKILL.md length
613 words
Files
1
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Iterative task completion loop with Definition of Done verification.

  • Works in 2 steps: DoD Collection → Work Execution
  • Tasks that involve Autonomous loops
  • SKILL.md covers Phase 1: DoD Collection, Phase 2: Work Execution and Prompt Hardening
  • Calls jq, npm and tsc

What it does

Ralph is an agent skill from team-attention/hoyeon. Iterative task completion loop with Definition of Done verification. Combines the Ralph Wiggum technique (prompt re-injection via Stop hook) with DoD-based independent verification. Claude proposes DoD criteria, user confirms, then Claude works autonomously. Stop hook re-injects the original prompt and blocks exit until all DoD items are independently verified. "/ralph", "ralph loop", "ralph 루프", "반복 작업", "DoD 루프", "완료 검증 루프", "task loop", "keep going until done"

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Autonomous loops. The repository describes itself as: Requirements-first Harness — derive, verify, execute. The licence is MIT.

When your agent uses it

  • Tasks that involve Autonomous loops

Example prompts

  • “/ralph”
  • “ralph loop”
  • “ralph 루프”
  • “/ralph”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Bash, Write, Edit, Agent, AskUserQuestion

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. DoD Collection
  2. Work Execution

What it can do on your machine

Read from SKILL.md and the folder at commit 7cff032. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Bash
    • Write
    • Edit
    • Agent
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • npm
    • tsc
    • eslint

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ralph loads about 1.6k tokens when it runs. Until then it costs about 118 tokens; SKILL.md has 613 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Glob, Bash, Write, Edit, Agent, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from team-attention/hoyeon at commit 7cff032, republished under its MIT licence (© team-attention). 613 words, ~1,588 tokens.

Download SKILL.mdSave it as .claude/skills/ralph/SKILL.md (or your agent's skills folder).
name
ralph
description
Iterative task completion loop with Definition of Done verification. Combines the Ralph Wiggum technique (prompt re-injection via Stop hook) with DoD-based independent verification. Claude proposes DoD criteria, user confirms, then Claude works autonomously. Stop hook re-injects the original prompt and blocks exit until all DoD items are independently verified. "/ralph", "ralph loop", "ralph 루프", "반복 작업", "DoD 루프", "완료 검증 루프", "task loop", "keep going until done"
allowed-tools
Read, Grep, Glob, Bash, Write, Edit, Agent, AskUserQuestion
validate_prompt
Must contain Phase 1 (DoD Collection) and Phase 2 (Work Execution). Must use AskUserQuestion for DoD confirmation. Must write state via hoyeon-cli session set…

ralph

Iterative task completion loop driven by a user-confirmed Definition of Done. Combines the Ralph Wiggum technique (prompt re-injection on stop) with DoD-based independent verification.

How it works:

  1. You propose DoD criteria based on the user's request
  2. User confirms/modifies via AskUserQuestion
  3. You work on the task
  4. When you try to stop, the Stop hook checks the DoD checklist:
    • If unchecked items remain → blocks exit, re-injects original prompt + remaining items
    • If all items checked → allows exit
  5. Loop continues until all DoD items verified or circuit breaker (max 10 iterations)

Phase 1: DoD Collection

Build a Definition of Done through interactive confirmation before starting work.

Step 1 — Analyze & Propose

Read the user's request carefully. Based on the task, propose 3–7 concrete, verifiable DoD criteria.

Good criteria (binary, independently verifiable):

  • "All unit tests pass (npm test exits 0)"
  • "New function parseConfig() exists in src/config.ts"
  • "No TypeScript errors (tsc --noEmit exits 0)"

Bad criteria (vague, subjective):

  • "Code is clean" → reword to "No lint warnings (eslint . exits 0)"
  • "Works correctly" → reword to specific test or behavior check

Present as a numbered markdown checklist:

Based on your request, here's my proposed Definition of Done:

1. [concrete criterion 1]
2. [concrete criterion 2]
3. [concrete criterion 3]
...

Each item will be independently verified before the task is considered complete.
Step 2 — User Confirmation

Use AskUserQuestion to confirm:

"Here are the proposed DoD criteria. You can:

  • Accept as-is
  • Add criteria (tell me what to add)
  • Remove criteria (tell me which to remove)
  • Modify criteria (tell me what to change)

Also, set max iterations (default: 10) if you want to limit the loop."

Loop until the user accepts. Parse their response for:

  • Additions, removals, or modifications
  • Custom max_iterations (default 10 if not specified)
Step 3 — State Initialization

After user confirms, initialize the loop state and write the DoD file.

Write DoD file — create the checklist as a markdown file:

Bash: SESSION_ID="[session ID from hook]" && mkdir -p "$HOME/.hoyeon/$SESSION_ID/files" && cat > "$HOME/.hoyeon/$SESSION_ID/files/ralph-dod.md" << 'DODEOF'
# Definition of Done

- [ ] [criterion 1]
- [ ] [criterion 2]
- [ ] [criterion 3]
...
DODEOF

Write state — store the original prompt and configuration for the Stop hook:

Bash: SESSION_ID="[session ID from hook]" && PROMPT=$(cat << 'PROMPTEOF'
[The user's ORIGINAL request/prompt — exactly as they typed it, before any processing]
PROMPTEOF
) && hoyeon-cli session set --sid "$SESSION_ID" --json "$(jq -n \
  --arg prompt "$PROMPT" \
  --arg dod_file "$HOME/.hoyeon/$SESSION_ID/files/ralph-dod.md" \
  --arg created_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  '{ralph: {prompt: $prompt, iteration: 0, max_iterations: 10, dod_file: $dod_file, created_at: $created_at}}')"

Replace max_iterations: 10 with the user's chosen value if they specified one.

Display confirmation:

## Ralph Loop Initialized

**Task**: [summary of what you'll do]
**DoD**: [N] criteria
**Max iterations**: [max_iterations]

Starting work. The loop will verify each DoD item independently before allowing completion.

Show full SKILL.md (306 more words)Show less

Phase 2: Work Execution

Now do the actual work. Focus on completing the task to satisfy all DoD criteria.

Rules during work:

  • Do NOT read or modify the DoD file (ralph-dod.md) — it's guarded by the system
  • Do NOT try to check off DoD items yourself — the Stop hook handles verification
  • Focus purely on the task described in the user's original request
  • Work thoroughly — the loop will catch anything you miss

When you believe the work is complete, simply finish your response normally. The Stop hook will:

  1. Check the DoD file for unchecked items
  2. If items remain: block exit, re-inject the original prompt in reason, list remaining items in systemMessage
  3. If all items checked: allow exit

On re-entry (after Stop hook blocks):

  • You will receive the original prompt again as your task
  • The systemMessage will instruct you to spawn a ralph-verifier agent

Verification via separate agent (context isolation):

  1. Spawn ralph-verifier agent with subagent_type="ralph-verifier" in FOREGROUND (do NOT use run_in_background=true)
    • Background spawn causes the main agent to stop → Stop hook fires → loop breaks
    • Pass the DoD file path and original prompt
  2. The verifier runs in a fresh context — no bias from the work phase
  3. Parse the verifier's JSON results:
    • PASS items → change - [ ] to - [x] in the DoD file
    • FAIL items → fix the underlying issue in this iteration
  4. If FAIL items were fixed, the next Stop hook will trigger another verification round

Why a separate agent? The agent that wrote the code should NOT verify its own work. The verifier agent starts clean, reads actual files/tests, and judges objectively.


Prompt Hardening

  • Store the original prompt in state.json via heredoc to prevent shell injection
  • The Stop hook re-injects the prompt via jq JSON construction (safe)
  • DoD file is guarded during work phase — only editable during verification
  • Circuit breaker at max_iterations prevents infinite loops

© team-attention, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ralph of team-attention/hoyeon.

Open the folder on GitHubat commit 7cff032

Compare with similar skills

Ralph next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ralph compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ralph this skillteam-attention/hoyeon173—~1.6kAutomated safety check: NotesMIT
Show Me Your Work Decision Logcursor/plugins10k8 repos~1.6kAutomated safety check: PassNone
Autoresearch Iteration Loopuditgoenka/autoresearch6.5k1 repos~2kAutomated safety check: PassMIT
Install Loop Engineeringcobusgreyling/loop-engineering11k1 repos~648Automated safety check: PassMIT
LoopyForward-Future/loopy3.2k—~3.9kAutomated safety check: PassMIT
AI Performance Improvement Plantanweai/pua20k2 repos~6.9kAutomated safety check: PassMIT

Similar skills

  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    10k GitHub starsUsed in 8 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Autoresearch Iteration Loop

    uditgoenka/autoresearch

    Runs an autonomous modify, verify, keep-or-discard loop against any metric, with subcommands for planning, debugging, fixing, security audits, shipping and more.

    6.5k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed
  • Install Loop Engineering

    cobusgreyling/loop-engineering

    Installs Loop Engineering into a project through the single @cobusgreyling/loop CLI, scaffolding a report-only loop and a readiness score.

    11k GitHub starsUsed in 1 repo~648 tokens
    Agent WorkflowsAuto-check passed
  • Loopy

    Forward-Future/loopy

    Discover, find, compare, audit, repair, adapt, craft, run, debrief, save, and prepare repeatable AI-agent loops for publication.

    3.2k GitHub stars~3.9k tokensUpdated 28 days ago
    Agent WorkflowsAuto-check passed
  • Pushes an agent to exhaust every option, investigate before asking and take initiative beyond the literal request, instead of giving up or waiting passively.

    20k GitHub starsUsed in 2 repos~6.9k tokens
    Agent WorkflowsAuto-check passed
  • LoopX Self Repair

    loopx-project/loopx

    Diagnoses surprising LoopX behavior, such as stale recommendations or tiny progress, assigns it to the responsible layer and repairs it at the lowest durable level.

    6.2k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from team-attention/hoyeon

All 36 skills in this repo
  • Skill Session Analyzer

    team-attention/hoyeon

    This skill should be used when the user asks to "analyze session", "evaluate skill execution", "check session logs", provides a session ID with a skill path, or wants to verify that a skill executed…

    173 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check: notes
  • Browser Work

    team-attention/hoyeon

    Recon-first browser automation. An agent skill from team-attention/hoyeon.

    173 GitHub stars~1.9k tokensUpdated 4 mo ago
    Auto-check passed
  • Check

    team-attention/hoyeon

    This skill should be used when the user wants to verify their changes before pushing, or update the project's rule checklists.

    173 GitHub stars~1.8k tokensUpdated 4 mo ago
    Auto-check: notes
  • Compound

    team-attention/hoyeon

    This skill should be used when the user says "/compound", "compound this", "document learnings", "save what we learned", or after completing a PR.

    173 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check: notes
  • QA

    team-attention/hoyeon

    Systematically QA test any application — web apps, native macOS apps, Electron apps, CLI tools, interactive REPLs, or anything on screen.

    173 GitHub stars~2.6k tokensUpdated 4 mo ago
    Auto-check: notes
  • Tech Decision

    team-attention/hoyeon

    This skill should be used when the user asks about "technical decision", "what to use", "A vs B", "comparison analysis", "library selection", "architecture decision", "which one to use"…

    173 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Ralph

What does Ralph do?

Iterative task completion loop with Definition of Done verification. Ralph is an agent skill from team-attention/hoyeon. Iterative task completion loop with Definition of Done verification.

When should I use Ralph?

Ralph fits situations like: tasks that involve Autonomous loops.

How do I install Ralph in Claude Code?

Run `npx skills add team-attention/hoyeon --skill ralph -a claude-code`. Or copy the skill folder (skills/ralph in team-attention/hoyeon) into .claude/skills/ralph in your project. Claude Code loads it when a task matches its description.

How do I install Ralph in Codex?

Run `npx skills add team-attention/hoyeon --skill ralph -a codex`. Or copy the skill folder (skills/ralph in team-attention/hoyeon) into .agents/skills/ralph in your project. Codex loads it when a task matches its description.

Can I use Ralph in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add team-attention/hoyeon --skill ralph -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ralph, .gemini/skills/ralph, .github/skills/ralph and .opencode/skills/ralph in your project.

What does Ralph need to run?

Going by SKILL.md and its folder, Ralph needs the command-line tools its instructions call (jq, npm, tsc and eslint). Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash, Write, Edit, Agent, AskUserQuestion.

Does Ralph access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ralph safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Ralph use?

Ralph is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ralph use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ralph?

Skills that share tags, products or a category with Ralph: Show Me Your Work Decision Log (cursor/plugins, 10k stars), Autoresearch Iteration Loop (uditgoenka/autoresearch, 6.5k stars), Install Loop Engineering (cobusgreyling/loop-engineering, 11k stars) and Loopy (Forward-Future/loopy, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ralph?

team-attention (a GitHub organization) maintains it in team-attention/hoyeon, which has 173 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on May 21, 2026.

Source: team-attention/hoyeon on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.