Agent skill

Ralph

by jpicklyk in jpicklyk/task-orchestrator

Launcher for the Ralph-style queue drain script — emits the right node ralph-loop.mjs invocation based on the user's filter and bounds.

MITAuto-check passedAgent Workflows

Install Ralph

skills CLI
$ npx skills add jpicklyk/task-orchestrator --skill ralph -a claude-code

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

GitHub CLI
$ gh skill install jpicklyk/task-orchestrator 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/jpicklyk/task-orchestrator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/claude-plugins/task-orchestrator/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
207
Token cost
~6.2k tokens
SKILL.md length
2,902 words
Files
3
Skills in repo
28
Repo updated
First seen
Licence
MIT

At a glance

Launcher for the Ralph-style queue drain script — emits the right node ralph-loop.mjs invocation based on the user's filter and bounds.

  • Works in 5 steps: Resolve the filter → Resolve bounds → Preview the queue → …
  • A user says: drain the backlog
  • SKILL.md covers Step 1 — Resolve the filter, Step 2 — Resolve bounds, Step 3 — Preview the queue and Step 4 — Emit the command, plus 6 more sections
  • Calls claude, node and git

What it does

Ralph is an agent skill from jpicklyk/task-orchestrator. Launcher for the Ralph-style queue drain script — emits the right node ralph-loop.mjs invocation based on the user's filter and bounds. The actual loop runs as a Node script that spawns one claude -p --worktree per iteration; this skill is the configurator, not the loop. Use when a user says: drain the backlog, ralph the queue, run Ralph loop, work the queue, batch through queue items, autonomous queue worker.

Its SKILL.md is about 6.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `iteration-prompt.md` and `iteration-system-prompt.md`).

It sits in Agent Workflows, covering Autonomous loops and Git worktrees. The repository describes itself as: Server-enforced workflow discipline for AI agents. An MCP server providing persistent work items, dependency graphs, quality gates, and actor attribution. Schemas define what… The licence is MIT.

When your agent uses it

  • A user says: drain the backlog
  • Ralph the queue
  • Batch through queue items
  • Autonomous queue worker

Example prompts

  • “/ralph”

Workflow steps

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

  1. Resolve the filter
  2. Resolve bounds
  3. Preview the queue
  4. Emit the command
  5. Post-run handoff

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • claude
    • node
    • git
    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use git and 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 6.2k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 2,902 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 jpicklyk/task-orchestrator at commit 3e83170, republished under its MIT licence (© jpicklyk). 2,902 words, ~6,208 tokens.

Download SKILL.mdSave it as .claude/skills/ralph/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
ralph
description
Launcher for the Ralph-style queue drain script — emits the right `node ralph-loop.mjs` invocation based on the user's filter and bounds. The actual loop runs as a Node script that spawns one `claude -p --worktree` per iteration; this skill is the configurator, not the loop. Use when a user says: drain the backlog, ralph the queue, run Ralph loop, work the queue, batch through queue items, autonomous queue worker.
argument-hint
[optional: filter expression like 'tag=bug-fix' or 'type=quick-fix priority=high']

ralph — Queue Drain Launcher

This skill is a launcher for the Ralph drain script (scripts/ralph-loop.mjs in this plugin). It does not run a loop in the current session. It helps you configure the right invocation, previews what will be processed, and emits the exact command to run.

The actual loop runs as a separate Node process. Each iteration spawns a fresh claude -p in its own git worktree (via Claude Code's -w flag), claims one item from the TO queue, and works it to terminal per the item's schema. Outcome is signaled via a RALPH_OUTCOME: JSON marker that the script parses for circuit-breaker decisions.

Why a separate script, not a slash-command loop? Per Geoff Huntley's canonical Ralph: the value comes from carving off small bits of work into independent context windows. Each iteration is a fresh process — fresh context, fresh worktree, isolated logs, clean exit codes. The skill-as-orchestrator pattern (one session, internal loop) accumulates context within a session and doesn't preserve fresh-context isolation. For autonomous cadence, compose with /loop: /loop 30m node scripts/ralph-loop.mjs --filter "tag=bug-fix".


Step 1 — Resolve the filter

Determine what subset of the queue to drain.

If $ARGUMENTS is non-empty, parse it as a filter expression. Supported keys:

KeyEffect
tag=<value>Items whose tags field contains <value> (substring)
type=<value>Items with this exact type
priority=<value>Items at this priority (high, medium, low)
parentId=<uuid-or-prefix>Only direct children of this container
ancestorId=<uuid-or-prefix>Only items anywhere in this ancestor's subtree, any depth — broader than parentId. Used for the queue preview in Step 3; see the note below Step 1 on where it does and doesn't reach.

Multiple keys combine with AND (space-separated). Examples: tag=bug-fix priority=high, type=quick-fix, parentId=89d02e32, ancestorId=<projectRootId>.

Project-scoped default: when a project rootId is known (the ## Project Scope section of the session context injected by the SessionStart hook, or the project-level config's project.rootId), default the filter to include ancestorId=<rootId> unless the user explicitly asks to drain across all projects (e.g., "ralph everything", "drain across all projects"). This keeps the Step 3 preview scoped to the current project when multiple project roots share one database. A personal root (## Personal Scope, or the user-level config) never defaults the filter: it only anchors new items.

Known limitation — ancestorId is preview-only. The Step 3 preview uses query_items, which supports ancestorId. The actual per-iteration claim (claim_item, driven by iteration-prompt.md) does not support ancestorId — its selector only understands tag, type, priority, and parentId (see that file's filter-key table). So a filter like ancestorId=<projectRootId> will scope what you see in the preview but is silently dropped when translated for the actual drain — iterations will still claim from the whole queue unless the filter also includes a parentId/tag/type that discriminates the project's items. If precise per-project draining matters, prefer tagging or typing items distinctly per project until claim_item gains ancestorId support.

If $ARGUMENTS is empty, ask the user via AskUserQuestion:

◆ Ralph loop — what should I drain?
  1. Bug-fix backlog (tag=bug-fix)
  2. Quick fixes (type=quick-fix)
  3. Tech debt container (parentId=<lookup>)
  4. Anything in queue (no filter)
  5. Custom filter — specify

If the user picks "Tech debt container", search via FTS: query_items(operation="search", query="Tech Debt", limit=5) and use the resulting UUID. (FTS mode triggers when query is present; depth is a list-mode-only filter and is ignored in FTS mode.)


Step 2 — Resolve bounds

Set sensible loop bounds. Show defaults and let the user adjust.

◆ Loop bounds (default in parens):
  Max iterations:           10
  Gate-failure budget:      3 consecutive
  Error budget:             2 consecutive
  Per-iteration USD cap:    $5
  Claim TTL per iteration:  1800s (30 min)
  Model:                    sonnet
  Cleanup on terminal:      smart (remove if no commits/changes; preserve otherwise)
  Resume continuations:     2 per iteration (0 disables)

  Adjust any?  Reply "ok" to use defaults.

If the user adjusts, capture the overrides. Common patterns:

  • High-volume drain: --max 30
  • Low-confidence run: --gate-budget 1 --error-budget 1
  • Architecture-heavy items: --model opus --budget 15
  • Preserve every worktree (debugging-heavy session): --no-cleanup
  • Disable resume-on-marker-less-exit (treat every marker-less clean exit as an immediate error, the old behavior): --max-continuations 0
  • Give a flaky agent more room to find its footing: --max-continuations 4

Step 3 — Preview the queue

Show what the loop will see. Use query_items with the resolved filter to display the first 5 candidates and the total count:

query_items(operation="search", role="queue", claimStatus="unclaimed", limit=10, ...)

Pass ancestorId="<rootId>" in ... when a project rootId (not a personal root) is known (resolved above) and the filter didn't already override scope — this gives an accurate project-scoped preview, subject to the preview-only limitation noted in Step 1.

Display:

◆ Queue preview — filter: tag=bug-fix priority=high
  Total claimable: 7 items
  First 5 by priority:
    ◉ d4fc7b2e  Fix duplicate UUID race in claim_item            (high)
    ◉ 92da8e9a  Gate response includes stale guidance            (high)
    ◉ 0c916953  subagent-start hook double-advance               (high)
    ◉ 00769317  advance_item applied:false contradicts DB        (medium)
    ◉ 2e4c9e77  create_work_tree dependency semantics            (low)

If the count is zero, tell the user nothing matches and stop here. If the count exceeds the iteration cap by a lot, mention that subsequent runs would pick up the rest.


Step 4 — Emit the command

Print the exact command to run. The user copies and pastes it.

◆ Ready to launch. Run this command:

  node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs \
    --filter "tag=bug-fix priority=high" \
    --max 10 \
    --budget 5 \
    --ttl 1800 \
    --model sonnet

  → Spawns one `claude -p --worktree=ralph-...` per iteration
  → Each iteration is fresh context, isolated worktree
  → Logs print live as iterations run
  → An iteration that exits cleanly with no RALPH_OUTCOME marker is resumed
    in place (`claude -p --resume`, same worktree) up to `--max-continuations`
    times (default 2) before it's counted as an error — add
    `--max-continuations <n>` to adjust, or `--max-continuations 0` to disable
  → Final summary lists outcomes and preserved worktrees

  For autonomous cadence (re-run every 30 min until empty):
    /loop 30m node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs --filter "tag=bug-fix priority=high"

  Dry-run first to verify the iteration command:
    node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs --dry-run --filter "tag=bug-fix priority=high"

Adjust the path if the user is in a different working directory — the script lives at claude-plugins/task-orchestrator/scripts/ralph-loop.mjs relative to the project root.

If the user wants the skill to launch the script directly (rather than emit a command), suggest using the Bash tool — but flag the tradeoff:

⚠ Running the script via Bash from this session means the loop output streams
   into our conversation transcript. That works for short drains but burns
   context on long ones. For drains over 5 iterations, prefer running the
   command in a separate terminal so this session stays free for other work.

Step 5 — Post-run handoff

After the script finishes (the user reports back with the summary, or pastes the output), help interpret the outcomes:

Final summary lineAction
Exit reason: queue emptyLoop succeeded — nothing to do
Exit reason: iteration cap reachedRe-run with same filter to continue, or raise --max
Exit reason: gate failure budget exhaustedInspect preserved worktrees; the schema expects notes the iteration agent can't fill autonomously (often review-checklist)
Exit reason: error budget exhaustedInspect last error; likely repo/build/network issue affecting all iterations

For preserved worktrees from gate-blocked or errored iterations:

bash
# inspect
git -C <repo-path> worktree list | grep ralph-

# resume manually with /status-progression on the item ID
# or clean up after inspection
git -C <repo-path> worktree remove ralph-<id>

Outcomes & exit codes (script reference)

The iteration agent emits RALPH_OUTCOME: {...} as its final message. The loop driver maps each status to circuit-breaker behavior:

StatusEffect on loop
terminalCounter ✓; resets gate-failure and error counters; loop continues
gate-blockedCounter ⊘; increments consecutive gate-failure counter; loop continues unless budget hit
errorCounter ✗; increments consecutive error counter; loop continues unless budget hit. A marker-less clean exit is resumed first (claude -p --resume, same worktree) — it only lands here once --max-continuations resumes are exhausted or the remaining per-iteration budget drops below $0.25, and the reason names how many continuations ran
skipCounter —; no counter changes; loop continues
idleMatches exist but none is currently claimable (transient — see decideIdleBackoff); loop sleeps retryAfterMs (clamped, defaulted if missing) and retries, up to --idle-budget consecutive idles, then exits
no-itemLoop exits cleanly (queue empty)

skip includes resource-lease contention. When advance_item rejects a transition into WORK with errorCode: "resource_unavailable" (transient — a shared resource the item declares via a resources: trait is currently held by another item), the iteration prompt releases its claim on that item and emits skip naming the contended key, rather than retrying the same item or treating it as an error. This is deliberate: a resource_unavailable rejection is expected contention, not a failure of this iteration, and the lock is not going to free up within the iteration's own lifetime — the next iteration should pick a different item, not spin against the same lock. See Workflow Guide §11 — Resource Leasing for the full contention/retry model.

The script's own exit code:

CodeMeaning
0Loop completed normally (queue empty, iteration cap, or gate-budget exit)
2Loop stopped due to consecutive errors
64CLI argument error
70Could not read iteration prompt

Composition with other tools

Want to...Compose with
Run Ralph on a schedule/loop 30m node .../ralph-loop.mjs --filter ...
Inspect what's claimable before running/work-summary to see queue contents
Resume a single gate-blocked item from Ralph/status-progression <item-id>
Clean up a preserved worktreegit worktree remove <path>
Check the iteration prompt templateRead skills/ralph/iteration-prompt.md in this plugin

Examples

Example 1: Drain the bug-fix queue

User: "ralph the bug-fix backlog"

$ARGUMENTS = "tag=bug-fix"

Step 1 parses the filter: tag=bug-fix.

Step 2 uses defaults (max=10, budgets=3/2, $5/iter, sonnet).

Step 3 shows 7 claimable items, top 5 by priority.

Step 4 emits:

node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs \
  --filter "tag=bug-fix" \
  --max 10

User runs it. Each iteration spawns a fresh claude -p --worktree=ralph-<id> with the iteration prompt. The agent uses claim_item selector mode to atomically find and claim one item (a single MCP call — no race window), invokes /schema-workflow to drive it through whatever phases its schema declares, commits changes, and exits with the outcome marker.

5 iterations later: 3 terminal, 1 gate-blocked (a required note couldn't be filled — e.g., needed external context the iteration didn't have), 1 errored (test failure unrelated to the fix). Loop exits when consecutive gate failures hit the budget (3) or queue empties — whichever comes first.


Example 2: Scheduled overnight drain

User wants the queue drained periodically.

After Step 4 emits the standard command, suggest:

/loop 1h node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs --filter "tag=bug-fix priority=high"

The /loop skill schedules it. Every hour, the script runs. If the queue is empty, it exits within seconds. If items appear (e.g., from CI or other agents), they get drained on the next tick.


Example 3: One-shot drain of a specific container

User: "ralph everything in tech debt"

Step 1 searches for "Tech Debt", finds container 89d02e32. Filter resolves to parentId=89d02e32.

Step 4 emits:

node claude-plugins/task-orchestrator/scripts/ralph-loop.mjs \
  --filter "parentId=89d02e32" \
  --max 20

Smart cleanup is on by default — worktrees with no commits or uncommitted changes (e.g., from items whose schema only required note-fills) get auto-removed; worktrees with real diffs are preserved for review/push.


Troubleshooting

Problem: the script reports error: could not read iteration prompt

Cause: The script expects iteration-prompt.md at ../skills/ralph/iteration-prompt.md relative to its own location. The repo layout may have shifted, or the script was copied elsewhere.

Solution: Verify both files exist in the plugin layout: claude-plugins/task-orchestrator/scripts/ralph-loop.mjs and claude-plugins/task-orchestrator/skills/ralph/iteration-prompt.md. Don't move them independently.


Problem: every iteration ends with error: iteration agent exited cleanly without RALPH_OUTCOME marker (after N continuation(s))

Cause: The iteration agent isn't following the prompt — it keeps ending its turn without emitting the outcome marker, even after the loop driver resumed it in place (claude -p --resume <session_id>, same worktree) via --max-continuations. The (after N continuation(s)) suffix tells you how many resumes were tried before giving up; without the suffix, no continuation was attempted at all (immediate marker-less exit, or --max-continuations 0). Likely the agent ran out of budget, hit a tool restriction, or ignored the prompt's exit instructions even when explicitly told to continue.

Solution: Run with --dry-run and inspect the prompt that would be sent. If the prompt looks correct, raise --budget (some iterations need more headroom) or raise --max-continuations to give the agent more resume attempts. If it persists across continuations, run one iteration manually with claude -p --worktree=test-1 --append-system-prompt-file skills/ralph/iteration-system-prompt.md "$(cat skills/ralph/iteration-prompt.md)" to debug interactively.


Problem: claim contention — every iteration gets skip or idle because all candidates are already claimed

Cause: Stale claims from a crashed previous run, or another worker is already draining. TTL is the recovery mechanism.

Note: With selector mode, claim_item returns none_eligible (kind=transient, with a retryAfterMs hint and an aggregate excluded breakdown) when queue items match the filter but are all currently claimed (or dependency-blocked, or under a claimed ancestor) — rather than the permanent queue_empty outcome, and rather than an already_claimed error. The iteration treats this as an idle exit, and the loop driver backs off and retries rather than exiting the drain.

Solution: Check query_items(operation="search", claimStatus="claimed") to see who holds claims. If they're all from a crashed ralph-<pid>-<ts> actor, wait for TTL expiry (default 30 min per the loop's settings) or release them via claim_item(releases=[...]) if you know they're stale.


Note: Ralph workers skip sub-items of in-progress features (ancestor-claim filtering)

When a fleet agent claims a feature using the hybrid topology (Scenario D in the Fleet Deployment Guide), the feature's child tasks are automatically protected from Ralph workers with broad selectors. A Ralph drain using role=queue will see none_eligible (transient — reported under excluded.ancestorClaimed) for any candidate whose ancestor is currently claimed by a different agent — this is the correct and desired behavior, not a bug. Ralph workers naturally focus on top-level claimable work; items inside an in-progress orchestration session are shielded. There is no depth-0/no-parent filter today — omitting parentId in a claim_item selector means unrestricted matching across all depths, it does not restrict to top-level items (same limitation as the ancestorId preview-only gap noted in Step 1). If precise top-level-only draining matters, use the workaround: tag or type top-level items distinctly (e.g., tag=top-level or a dedicated type) so the selector can discriminate them without a depth filter.


Problem: the iteration agent dispatches subagents (Agent tool) and that's confusing the loop

Cause: The iteration prompt doesn't forbid subagents, but they add complexity (the iteration agent's worktree is the dispatched subagent's working directory too).

Solution: Subagent dispatch within an iteration is allowed and sometimes useful (e.g., for parallel reads). It's fine as long as the iteration agent collects subagent results, fills notes, and emits the outcome marker as its own final message. If subagents are causing context bloat, edit the iteration prompt to discourage them.


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

Design notes

Why claude -p per iteration, not a slash-command loop. Huntley's canonical Ralph relies on fresh context per iteration. A slash-command loop in a single Claude session accumulates context across iterations, even with compaction — that's the variant Huntley publicly criticized when Anthropic's plugin shipped. The script-driver pattern (this design) preserves fresh context cleanly: each iteration is a new OS process with no memory of previous iterations.

Why a Node script, not bash. Cross-platform — every Claude Code install has Node. Stdlib-only — no npm install, no plugin dependencies. The script uses node:util.parseArgs, node:child_process.spawn, and node:fs/promises. Targets Node 18+ to match Claude Code's own minimum.

Why a dedicated iteration system prompt. Iterations append skills/ralph/iteration-system-prompt.md to the system prompt via claude --append-system-prompt-file, and pin --settings '{"outputStyle":"default"}' so a user's own configured output style (for example an orchestrator or analyst style) never reaches an iteration. Orchestration-shaped chrome — tier classification, delegation tables, plan-mode discipline, the workflow-analyst footer — is wrong for a single-item per-iteration agent. The appended prompt suppresses it and authoritatively encodes per-iteration rules (schema is contract, no auto-memory, no further dispatch, RALPH_OUTCOME marker as final message), while keeping the default Claude Code system prompt and its tool guidance intact.

Why --permission-mode bypassPermissions on each iteration. In claude -p (non-interactive) mode there is no UI prompt to approve MCP or tool calls — unpermitted calls auto-deny and the iteration aborts. Ralph cannot operate autonomously without bypassing the permission gate. The risk surface is bounded by four things working together: (1) the --worktree flag confines file edits to a single isolated tree; (2) the MCP server's own ACL still controls what TO operations are valid; (3) --max-budget-usd caps API spend per iteration; (4) the iteration prompt is tightly schema-scoped — it can't dispatch subagents, can't enter plan mode, and must emit RALPH_OUTCOME as its final message. If a deployment needs stricter permission control, swap the --permission-mode flag in the script for --allowed-tools with an explicit allowlist.

Why smart cleanup is the default. Each iteration's --worktree creates a fresh git worktree under .claude/worktrees/ralph-.... Without active cleanup, long-running deployments (especially scheduled Ralph via /loop) accumulate worktrees indefinitely — both on disk and in git worktree list. The cleanup heuristic checks two things after each terminal (or no-item) outcome: (1) does the worktree have uncommitted changes? (2) does it have commits ahead of origin/main? If neither: remove. If either: preserve, since there's something worth inspecting or pushing. gate-blocked, error, and skip outcomes always preserve regardless — debugging context matters. Pass --no-cleanup to opt out entirely (debugging-heavy sessions, audit-trail needs, etc.). The heuristic intentionally errs toward preservation: if origin/main can't be compared (e.g., upstream missing), the worktree is preserved rather than removed.

Why no PR creation in the script. The end state of an iteration is determined by the item's schema, not by Ralph. A bug-fix schema's review or terminal phase might prescribe pushing and opening a PR; an agent-observation schema's "done" might be just filling a single note. The script doesn't assume a code-change workflow — it just runs iterations and captures outcomes. Workflow logic lives in the schema, where users can configure it per their project.

Why the RALPH_OUTCOME: marker instead of exit codes. An agent inside claude -p doesn't directly control the parent process's exit code (that's Claude Code's harness). Structured stdout output is the cleanest channel — the script regex-matches the marker, parses the JSON, and decides loop control. This also makes outcomes inspectable in iteration logs after the fact.

Why a marker-less clean exit gets resumed instead of immediately counted as an error. Anthropic's own guidance for unattended runs warns that a model left without a human in the loop can end its turn early — trailing off into a status report instead of continuing the work or emitting a terminating signal. Under claude -p that stray turn exits the process outright: no marker means the driver used to have no better option than to call it error, which burns an error-budget slot and leaves the claimed item's TTL to run out before anyone picks it back up, even though the agent may have been seconds from finishing. The loop driver now treats "clean exit, no marker" as recoverable: it resumes the same session (claude -p --resume <session_id>, same worktree — never --worktree, which would spin up a new one) and asks it to either finish the work or emit the marker itself, up to --max-continuations times (default 2) and only while the iteration's remaining --budget stays at or above $0.25. The decision keys on marker absence, never on the outcome's status — an agent that deliberately emits RALPH_OUTCOME {"status":"error"} has already told the driver what happened and is never resumed. Spend across resumes is tracked from each envelope's total_cost_usd, which reports the resumed conversation's running total rather than just the new turn's cost, so the driver takes the latest reading rather than summing across resumes. Exhausting the continuations (or the budget floor) without ever seeing a marker still ends in the same error outcome as before, with the reason naming how many continuations were tried.

Why TTL=1800 default (not the documented 900). Default TTL is 15 minutes. A non-trivial iteration (read context, fill notes, do code work, run tests, commit, advance) can exceed that. 1800s gives 30-minute headroom without requiring a heartbeat. For longer iterations, raise --ttl further; the cap is 86400 (24 hours).

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

Files

SKILL.md and 2 other files in claude-plugins/task-orchestrator/skills/ralph of jpicklyk/task-orchestrator.

  • SKILL.md
  • iteration-prompt.md
  • iteration-system-prompt.md

Open the folder on GitHubat commit 3e83170

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 skilljpicklyk/task-orchestrator207—~6.2kAutomated safety check: PassMIT
Rebuild Branchplatformplatform/PlatformPlatform441—~2.1kAutomated safety check: NotesMIT
Spec-Driven Development v2LichAmnesia/lich-skills234—~3.1kAutomated safety check: PassMIT
ULW Loopcode-yeongyu/oh-my-openagent70k—~3.2kAutomated safety check: PassCustom licence
Autodev Paralleljh941213/my-cc-harness126—~1.3kAutomated safety check: NotesNone
Autodev Paralleljh941213/my-cc-harness126—~958Automated safety check: NotesNone

Similar skills

  • Rebuild Branch

    platformplatform/PlatformPlatform

    Rebuild a stale branch by cherry-picking each commit onto a fresh branch off main, using a ralph-loop to validate each commit (build, test, format, lint, optional e2e) before moving on.

    441 GitHub stars~2.1k tokensUpdated 14 days ago
    Agent WorkflowsAuto-check: notes
  • Spec-Driven Development v2

    LichAmnesia/lich-skills

    Organizes long-running agent work into a Project, Sprint and Task hierarchy with per-task state files, isolated worktrees, review loops and script-checked rules.

    234 GitHub stars~3.1k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • ULW Loop

    code-yeongyu/oh-my-openagent

    Runs a long task as a checkpointed goal loop: it creates goals, mirrors each step into a todo list, gathers evidence per criterion and lands every goal before the next.

    70k GitHub stars~3.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Autodev Parallel

    jh941213/my-cc-harness

    Parallel version of the Ralph Loop. An agent skill from jh941213/my-cc-harness.

    126 GitHub stars~1.3k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check: notes
  • Autodev Parallel

    jh941213/my-cc-harness

    Ralph Loop 병렬 버전. An agent skill from jh941213/my-cc-harness.

    126 GitHub stars~958 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check: notes
  • 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 9 repos~1.6k tokens
    Agent WorkflowsAuto-check passed

More from jpicklyk/task-orchestrator

All 28 skills in this repo
  • Task Orchestrator Server Setup

    jpicklyk/task-orchestrator

    Walks through how to launch and reach the MCP Task Orchestrator server container: transport, REST API, port publishing, config mounts and config-sync.

    207 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Run Wave

    jpicklyk/task-orchestrator

    Resolves ready MCP work items into a run plan, shows it to you, then executes it through the Workflow tool or direct subagent dispatch, with post-run verification.

    207 GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • Adopt Project Scope Migration

    jpicklyk/task-orchestrator

    Migrates an existing unscoped Task Orchestrator database to the project-scoping convention in place, creating one project anchor root and re-parenting work trees under it after a mandatory dry run.

    207 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Bulk Task Completion

    jpicklyk/task-orchestrator

    Completes or cancels a whole feature subtree, a named list of items, or a batch of stale work items at once, previewing the impact and warning before force-completing anything active.

    207 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Task Orchestrator Item Creator

    jpicklyk/task-orchestrator

    Creates an MCP work item from conversation context, anchoring it under the right container, inferring type and priority and pre-filling the required notes.

    207 GitHub stars~4k tokensUpdated today
    Auto-check passed
  • Work Item Dependency Manager

    jpicklyk/task-orchestrator

    Views, creates, deletes and diagnoses BLOCKS, IS_BLOCKED_BY and RELATES_TO links between MCP work items, including why an item cannot start.

    207 GitHub stars~3.5k tokensUpdated today
    Auto-check passed

Categories

Questions about Ralph

What does Ralph do?

Launcher for the Ralph-style queue drain script — emits the right node ralph-loop.mjs invocation based on the user's filter and bounds. Ralph is an agent skill from jpicklyk/task-orchestrator.mjs invocation based on the user's filter and bounds.

When should I use Ralph?

Ralph fits situations like: A user says: drain the backlog; ralph the queue; batch through queue items; autonomous queue worker.

How do I install Ralph in Claude Code?

Run `npx skills add jpicklyk/task-orchestrator --skill ralph -a claude-code`. Or copy the skill folder (claude-plugins/task-orchestrator/skills/ralph in jpicklyk/task-orchestrator) 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 jpicklyk/task-orchestrator --skill ralph -a codex`. Or copy the skill folder (claude-plugins/task-orchestrator/skills/ralph in jpicklyk/task-orchestrator) 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 jpicklyk/task-orchestrator --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 (claude, node, git and npm).

Does Ralph access the network?

SKILL.md contains no URLs. Its commands use git and 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 no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. 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 6.2k tokens (SKILL.md is roughly 25k 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: Rebuild Branch (platformplatform/PlatformPlatform, 441 stars), Spec-Driven Development v2 (LichAmnesia/lich-skills, 234 stars), ULW Loop (code-yeongyu/oh-my-openagent, 70k stars) and Autodev Parallel (jh941213/my-cc-harness, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ralph?

jpicklyk (a GitHub user) maintains it in jpicklyk/task-orchestrator, which has 207 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 8, 2026.

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