ralph
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.
What this skill does
# 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:
| Key | Effect |
|---|---|
| `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 descendants of this container |
Multiple keys combine with AND (space-separated). Examples: `tag=bug-fix priority=high`, `type=quick-fix`, `parentId=89d02e32`.
**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)
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`
---
## 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, ...)
```
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
→ 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 line | Action |
|---|---|
| `Exit reason: queue empty` | Loop succeeded — nothing to do |
| `Exit reason: iteration cap reached` | Re-run with same filter to continue, or raise `--max` |
| `Exit reason: gate failure budget exhausted` | Inspect preserved worktrees; the schema expects notes the iteration agent can't fill autonomously (often `review-checklist`) |
| `Exit reason: error budget exhausted` | Inspect 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:
| Status | Effect on loop |
|---|---|
| `terminal` | Counter ✓; resets gate-failure and error counters; loop continues |
| `gate-blocked` | Counter ⊘; increments consecutive gate-failure counter; loop continues unless budget hit |
| `error` | Counter ✗; increments consecutive error counter; loop continues unless budget hit |
| `skip` | Counter —; no counter changes; loop continues |
| `no-item` | Loop exits cleanly (queue empty) |
The script's own exit code:
| Code | Meaning |
|---|---|
| `0` | Loop completed normally (queue empty, iteration cap, or gate-budget exit) |
| `2` | Loop stopped due to consecutive errors |
| `64` | CLI argument error |
| `70` | Could 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 worktree | `git worktree remove <path>` |
| Check the iteration prompt template | Read `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, budgRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.